2015-05-20 17:22:49 +00:00
|
|
|
_cac_exec() {
|
2015-05-20 17:07:33 +00:00
|
|
|
if test -z "${cac_via-}"; then
|
2015-05-20 17:22:49 +00:00
|
|
|
(exec "$@")
|
2015-05-20 17:07:33 +00:00
|
|
|
else
|
2015-05-20 17:22:49 +00:00
|
|
|
ssh -q "$cac_via" -t "$@"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
cac_listservers() {
|
|
|
|
_cac_exec \
|
|
|
|
curl -fsS \
|
2015-05-20 17:18:55 +00:00
|
|
|
-G \
|
|
|
|
--data-urlencode key="$cac_key" \
|
|
|
|
--data-urlencode login="$cac_login" \
|
|
|
|
'https://panel.cloudatcost.com/api/v1/listservers.php'
|
2015-05-20 17:07:33 +00:00
|
|
|
}
|
2015-05-20 17:15:12 +00:00
|
|
|
|
|
|
|
cac_listtasks() {
|
2015-05-20 17:22:49 +00:00
|
|
|
_cac_exec \
|
2015-05-20 17:15:12 +00:00
|
|
|
curl -fsS \
|
2015-05-20 17:18:55 +00:00
|
|
|
-G \
|
|
|
|
--data-urlencode key="$cac_key" \
|
|
|
|
--data-urlencode login="$cac_login" \
|
|
|
|
'https://panel.cloudatcost.com/api/v1/listtasks.php'
|
2015-05-20 17:15:12 +00:00
|
|
|
}
|