diff options
-rw-r--r-- | Makefile | 0 | ||||
-rwxr-xr-x | cac | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index e69de29..0000000 --- a/Makefile +++ /dev/null @@ -392,6 +392,28 @@ __cac_cli__build() {( esac )} +#? cac delete SERVERSPEC +#? Delete / terminate server to add resources. +#? +__cac_cli__delete() {( + server=$(__cac_cli__getserver "$1") + sid=$(echo $server | jq -r .sid) + + reply=$(_cac_post_api_v1 cloudpro/delete sid="$sid") + + case $(echo $reply | jq -r .status) in + ok) + echo $reply | jq -r . >&2 + __cac_cli__update + ;; + *) + echo bad reply: >&2 + echo $reply | jq -r . >&2 + exit 23 + ;; + esac +)} + #? #? SERVERSPEC is a query like "mode:Safe", "sdate:08/04/2015", etc. |