feature #817: Fixes host uniqueness

(cherry picked from commit 9a493620b1)
This commit is contained in:
Ruben S. Montero committed 2011-09-22 23:51:08 +02:00
1 parent 3edd8a7780
commit cd28f57abe
2 files changed
+2 -5

No files matched your search

-3
View File
@@ -69,8 +69,6 @@ module OZones
#When more rules are added the class constant HOST_ACL_FIRST_ID
#must be modified
###############################################################
puts get_host_acls_str(group_id)
rule_str.concat(self.get_host_acls_str(group_id))
end
@@ -84,7 +82,6 @@ module OZones
# Grant permissions to use the vdc hosts
host_list.split(',').each{|hostid|
puts hostid
rule_str << "@#{group_id} HOST/##{hostid} USE"
}
+2 -2
View File
@@ -372,11 +372,11 @@ class OzonesServer
all_hosts = ""
zone.vdcs.all.each{|vdc|
if vdc.hosts != nil and !vdc.hosts.empty? and vdc.id != vdc_id
all_hosts << vdc.hosts
all_hosts << ',' << vdc.hosts
end
}
all_hosts = all_hosts.split(",")
all_hosts = all_hosts.split(',')
host_list.split(",").each{|host|
return false if all_hosts.include?(host)