1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #667: Improve ACL CLI error handling

(cherry picked from commit beba090a3fe6d2ee3721cd65afa16ddb8b5dc8a4)
This commit is contained in:
Tino Vázquez 2011-07-05 19:03:55 +02:00
parent 4a186ea046
commit 06084ebaf7

View File

@ -111,7 +111,9 @@ module OpenNebula
end
resources[0].split("+").each{ |resource|
next if !RESOURCES[resource.upcase]
if !RESOURCES[resource.upcase]
raise "Resource #{resource} malformed."
end
@content[:resources] += RESOURCES[resource.upcase]
}
@ -127,7 +129,7 @@ module OpenNebula
rights = rights.split("+")
rights.each{ |right|
next if !RIGHTS[right.upcase]
raise "Right #{right} malformed." if !RIGHTS[right.upcase]
@content[:rights] += RIGHTS[right.upcase]
}