From 8abe2b0ecf35ca5b7425abfd7fb7410432c76009 Mon Sep 17 00:00:00 2001 From: Daniel Clavijo Coca Date: Tue, 19 Mar 2019 12:41:41 -0600 Subject: [PATCH] #3058: Patch nic detach --- src/vmm_mad/remotes/lib/lxd/container.rb | 5 +++-- src/vmm_mad/remotes/lxd/reboot | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vmm_mad/remotes/lib/lxd/container.rb b/src/vmm_mad/remotes/lib/lxd/container.rb index c319c53cbc5..c74f7ea2a41 100644 --- a/src/vmm_mad/remotes/lib/lxd/container.rb +++ b/src/vmm_mad/remotes/lib/lxd/container.rb @@ -181,7 +181,7 @@ def stop(options = { :timeout => 120 }) # Remove nic from ovs-switch if needed @one.get_nics.each do |nic| del_bridge_port(nic) # network driver matching implemented here - end + end end def restart(options = {}) @@ -218,7 +218,8 @@ def detach_nic(mac) device.include?('eth') && config['hwaddr'] == mac end - update + # Removes nic from ovs-switch if needed + update if del_bridge_port(@one.get_nic_by_mac(mac)) end #--------------------------------------------------------------------------- diff --git a/src/vmm_mad/remotes/lxd/reboot b/src/vmm_mad/remotes/lxd/reboot index 280fc6682c6..a6fb2dfb056 100755 --- a/src/vmm_mad/remotes/lxd/reboot +++ b/src/vmm_mad/remotes/lxd/reboot @@ -23,7 +23,7 @@ require 'container' require_relative '../../scripts_common' # ------------------------------------------------------------------------------ -# Action Arguments, STDIN includes XML description of the OpenNebula VM +# Action Arguments, STDIN doesn't include XML description of the OpenNebula VM # ------------------------------------------------------------------------------ vm_name = ARGV[0]