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

Bug #3846: Already existing rules in security group driver

This commit is contained in:
goberle 2015-06-24 10:15:16 +02:00
parent ce82a2d25a
commit 76ad12303c

View File

@ -57,8 +57,11 @@ module VNMMAD
# Global Bootstrap
SGIPTables.global_bootstrap
attach_nic_id = @vm['TEMPLATE/NIC[ATTACH="YES"]/NIC_ID']
# Process the rules
@vm.nics.each do |nic|
next if attach_nic_id && attach_nic_id != nic[:nic_id]
next if nic[:security_groups].nil?
SGIPTables.nic_pre(@vm, nic)
@ -95,9 +98,7 @@ module VNMMAD
attach_nic_id = @vm['TEMPLATE/NIC[ATTACH="YES"]/NIC_ID']
@vm.nics.each do |nic|
if attach_nic_id && attach_nic_id != nic[:nic_id]
next
end
next if attach_nic_id && attach_nic_id != nic[:nic_id]
SGIPTables.nic_deactivate(@vm, nic)
end