You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseMissingParamError,'No operating systems provided to obtain.'ifos_string.empty?
40
40
41
-
response=conn.post"vm/#{os_string}"
41
+
response=conn.post"vm/#{os_string}"unlessondemand
42
+
response ||= conn.post"ondemandvm/#{os_string}"
42
43
43
44
res_body=JSON.parse(response.body)
44
45
45
46
ifres_body['ok']
46
47
res_body
47
48
elsifresponse.status == 401
48
49
raiseAuthError,"HTTP #{response.status}: The token provided could not authenticate to the pooler.\n#{res_body}"
50
+
elsifresponse.status == 403
51
+
raise"HTTP #{response.status}: Failed to obtain VMs from the pooler at #{url}/vm/#{os_string}. Request exceeds the configured per pool maximum. #{res_body}"
49
52
else
50
-
raise"HTTP #{response.status}: Failed to obtain VMs from the pooler at #{url}/vm/#{os_string}. #{res_body}"
53
+
raise"HTTP #{response.status}: Failed to obtain VMs from the pooler at #{url}/vm/#{os_string}. #{res_body}"unlessondemand
54
+
raise"HTTP #{response.status}: Failed to obtain VMs from the pooler at #{url}/ondemandvm/#{os_string}. #{res_body}"
0 commit comments