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:
parent
4a186ea046
commit
06084ebaf7
@ -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]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user