1
0
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:
Tino Vazquez 2014-01-10 18:48:39 +01:00
parent c4434a3bd3
commit a270a1aa12

View File

@ -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)