summaryrefslogtreecommitdiffstats
path: root/lib/cac.sh
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-05-20 20:19:35 +0200
committertv <tv@shackspace.de>2015-05-20 20:19:35 +0200
commit223db8286233fa8bd77f546c6f3200877ed2512b (patch)
tree64ecb991226fb7cc74661359e05fb0ccbb323668 /lib/cac.sh
parent31dd668d39e0305ca86ad50c25ae98329e3ffe1f (diff)
lib/cac.sh: implement missing API calls
Diffstat (limited to 'lib/cac.sh')
-rw-r--r--lib/cac.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/cac.sh b/lib/cac.sh
index 40b2760c2..d2108d360 100644
--- a/lib/cac.sh
+++ b/lib/cac.sh
@@ -37,3 +37,40 @@ cac_listservers() {
cac_listtasks() {
_cac_get_api_v1 listtasks
}
+
+cac_listtemplates() {
+ _cac_get_api_v1 listtemplates
+}
+
+cac_console() {
+ _cac_post_api_v1 console sid="$1"
+}
+
+cac_powerop() {
+ _cac_post_api_v1 powerop sid="$1" action="$2"
+}
+
+cac_renameserver() {
+ _cac_post_api_v1 renameserver sid="$1" name="$2"
+}
+
+cac_rnds() {
+ _cac_post_api_v1 rdns sid="$1" hostname="$2"
+}
+
+cac_runmode() {
+ _cac_post_api_v1 rdns sid="$1" mode="$2"
+}
+
+# default os=26 is CentOS-7-64bit
+cac_cloudpro_build() {
+ _cac_post_api_v1 cloudpro/build cpu="$1" ram="$2" storage="$3" os="${4-26}"
+}
+
+cac_cloudpro_delete() {
+ _cac_post_api_v1 cloudpro/delete sid="$1"
+}
+
+cac_cloudpro_resources() {
+ _cac_get_api_v1 cloudpro/resources
+}