From e35f04c33a0679cc55018caf1360a00bd9bfdb10 Mon Sep 17 00:00:00 2001 From: goberle Date: Fri, 12 Jun 2015 14:54:04 +0200 Subject: [PATCH] Feature #3666: move get_bridges to activate/deactivate method. --- src/vnm_mad/remotes/lib/vlan.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vnm_mad/remotes/lib/vlan.rb b/src/vnm_mad/remotes/lib/vlan.rb index 04b7231fde..c6cf1e35c3 100644 --- a/src/vnm_mad/remotes/lib/vlan.rb +++ b/src/vnm_mad/remotes/lib/vlan.rb @@ -27,15 +27,13 @@ module VNMMAD @locking = true super(vm_tpl, xpath_filter, deploy_id, hypervisor) - - lock - @bridges = get_bridges - unlock end # Activate the driver and creates bridges and tags devices as needed. def activate lock + + @bridges = get_bridges process do |nic| @nic = nic @@ -77,6 +75,8 @@ module VNMMAD # Deactivate the driver and delete bridges and tags devices as needed. def deactivate lock + + @bridges = get_bridges attach_nic_id = @vm['TEMPLATE/NIC[ATTACH="YES"]/NIC_ID']