mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-25 06:03:36 +03:00
Bug #2620: Add various checks prior group creation
This commit is contained in:
parent
c4434a3bd3
commit
a270a1aa12
@ -85,6 +85,19 @@ module OpenNebula
|
||||
"Group Name not defined, aborting group create operation"
|
||||
end
|
||||
|
||||
if group_hash[:user][:name] and !group_hash[:admin_group]
|
||||
return -1,
|
||||
"Admin user defined but not admin group, " +
|
||||
"aborting group create operation"
|
||||
end
|
||||
|
||||
if group_hash[:user] and group_hash[:user][:name] and
|
||||
!group_hash[:user][:password]
|
||||
return -1,
|
||||
"Admin user password not defined, " +
|
||||
"aborting group create operation"
|
||||
end
|
||||
|
||||
rc_alloc = self.allocate(group_hash[:name])
|
||||
|
||||
if OpenNebula.is_error?(rc_alloc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user