File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
scripts/vm/hypervisor/external/provisioner Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -99,6 +99,14 @@ status() {
9999 echo ' {"status": "success", "power_state": "poweron"}'
100100}
101101
102+ statuses () {
103+ parse_json " $1 " || exit 1
104+ # This external system can not return an output like the following:
105+ # {"status":"success","power_state":{"i-3-23-VM":"poweroff","i-2-25-VM":"poweron"}}
106+ # CloudStack can fallback to retrieving the power state of the single VM using the "status" action
107+ echo ' {"status": "error", "message": "Not supported"}'
108+ }
109+
102110action=$1
103111parameters_file=" $2 "
104112wait_time=" $3 "
@@ -138,6 +146,9 @@ case $action in
138146 status)
139147 status " $parameters "
140148 ;;
149+ statuses)
150+ statuses " $parameters "
151+ ;;
141152 * )
142153 echo ' {"error":"Invalid action"}'
143154 exit 1
You can’t perform that action at this time.
0 commit comments