mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
(cherry picked from commit f4dc20b187)
This commit is contained in:
1 parent
01653bdcf1
commit
54c0ae12ff
1 file changed
+7
-2
@@ -140,8 +140,12 @@ class SunstoneServer < CloudServer
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [500, rc.to_json]
|
||||
else
|
||||
resource.info
|
||||
return [201, resource.to_json]
|
||||
rc = resource.info
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [201, "{\"#{kind.upcase}\": {\"ID\": \"#{resource.id}\"}}"]
|
||||
else
|
||||
return [201, resource.to_json]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -219,6 +223,7 @@ class SunstoneServer < CloudServer
|
||||
return [404, resource.to_json]
|
||||
end
|
||||
rc = resource.perform_action(action_json)
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [500, rc.to_json]
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user