Bug #2154: Fix Role::info return type

This commit is contained in:
Carlos Martín committed 2013-07-05 17:39:03 +02:00
1 parent 81ed1688c1
commit 3aff2efde0
2 files changed
+7 -5

No files matched your search

+2 -4
View File
@@ -137,15 +137,13 @@ class Strategy
case role.state()
when Role::STATE['RUNNING']
if OpenNebula.is_error?(rc)
role.set_state(Role::STATE['WARNING'])
elsif role_nodes_warning?(role)
if OpenNebula.is_error?(rc) || role_nodes_warning?(role)
role.set_state(Role::STATE['WARNING'])
end
role.update_cardinality()
when Role::STATE['WARNING']
if !role_nodes_warning?(role)
if !OpenNebula.is_error?(rc) && !role_nodes_warning?(role)
role.set_state(Role::STATE['RUNNING'])
end
+5 -1
View File
@@ -222,7 +222,11 @@ module OpenNebula
@body['nodes'] = new_nodes
return success
if !success
return OpenNebula::Error.new()
end
return nil
end
# Deploys all the nodes in this role