feat: add unfreeze_on_demand to remaining 35 SDKs
Updated awk, bash, clojure, cobol, cpp, crystal, csharp, dart, dotnet, d, elixir, erlang, fortran, fsharp, groovy, haskell, julia, kotlin, lisp, lua, nim, objective-c, ocaml, perl, php (sync+async), powershell, prolog, raku, r, scheme, swift, tcl, v, and zig SDKs: - Add set_unfreeze_on_demand function (PATCH /services/:id) - Add --unfreeze-on-demand flag for service creation - Add --set-unfreeze-on-demand command for existing services
This commit is contained in:
parent
e58adcd5fe
commit
7e56327056
35 changed files with 1047 additions and 104 deletions
|
|
@ -341,6 +341,15 @@
|
|||
(json (format nil "{\"vcpu\":~a}" vcpu)))
|
||||
(curl-patch api-key (format nil "/services/~a" id) json)
|
||||
(format t "~aService resized to ~a vCPU, ~a GB RAM~a~%" *green* vcpu ram *reset*))))
|
||||
((string= action "unfreeze-on-demand")
|
||||
(if (or (null service-type) (string= service-type ""))
|
||||
(progn
|
||||
(format *error-output* "~aError: --unfreeze-on-demand requires true or false~a~%" *red* *reset*)
|
||||
(uiop:quit 1))
|
||||
(let* ((enabled (string= service-type "true"))
|
||||
(json (format nil "{\"unfreeze_on_demand\":~a}" (if enabled "true" "false"))))
|
||||
(curl-patch api-key (format nil "/services/~a" id) json)
|
||||
(format t "~aService unfreeze_on_demand set to ~a: ~a~a~%" *green* (if enabled "true" "false") id *reset*))))
|
||||
((string= action "execute")
|
||||
(when (and id bootstrap)
|
||||
(let* ((json (format nil "{\"command\":\"~a\"}" (escape-json bootstrap)))
|
||||
|
|
@ -700,6 +709,11 @@
|
|||
(fifth args)
|
||||
nil)))
|
||||
(service-cmd "resize" id nil nil nil nil vcpu nil nil nil)))
|
||||
((and (> (length args) 3) (string= (second args) "--unfreeze-on-demand"))
|
||||
;; --unfreeze-on-demand ID true|false: id is third, value is fourth
|
||||
(let ((id (third args))
|
||||
(value (fourth args)))
|
||||
(service-cmd "unfreeze-on-demand" id nil nil nil nil value nil nil nil)))
|
||||
((and (> (length args) 3) (string= (second args) "--execute"))
|
||||
(service-cmd "execute" (third args) nil nil (fourth args) nil nil nil nil nil))
|
||||
((and (> (length args) 3) (string= (second args) "--dump-bootstrap"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue