From 04d665d09e68473093a31d86e33065d7f0b698ca Mon Sep 17 00:00:00 2001 From: Mark Gilbert <50398495+MarkProminic@users.noreply.github.com> Date: Sat, 17 Aug 2024 16:58:18 -0500 Subject: [PATCH] fix: linting --- lib/vagrant-zones/driver.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/vagrant-zones/driver.rb b/lib/vagrant-zones/driver.rb index 25d6e85..406c2bb 100644 --- a/lib/vagrant-zones/driver.rb +++ b/lib/vagrant-zones/driver.rb @@ -625,16 +625,16 @@ def natnicconfig(uii, opts) vnic_name = vname(uii, opts) uii.info(I18n.t('vagrant_zones.nat_vnic_setup')) uii.info(" #{vnic_name}") - strt = "#{@pfexec} zonecfg -z #{@machine.name} " + zonecfg = "#{@pfexec} zonecfg -z #{@machine.name} " cie = config.cloud_init_enabled case config.brand when 'lx' shrtstr1 = %(set allowed-address=#{allowed_address}; add property (name=gateway,value="#{defrouter}"); ) shrtstr2 = %(add property (name=ips,value="#{allowed_address}"); add property (name=primary,value="true"); end;) - execute(false, %(#{strt}set global-nic=auto; #{shrtstr1} #{shrtstr2}")) + execute(false, %(#{zonecfg}set global-nic=auto; #{shrtstr1} #{shrtstr2}")) when 'bhyve' - execute(false, %(#{strt}"add net; set physical=#{vnic_name}; end;")) unless cie - execute(false, %(#{strt}"add net; set physical=#{vnic_name}; set allowed-address=#{allowed_address}; end;")) if cie + execute(false, %(#{zonecfg}"add net; set physical=#{vnic_name}; end;")) unless cie + execute(false, %(#{zonecfg}"add net; set physical=#{vnic_name}; set allowed-address=#{allowed_address}; end;")) if cie end end @@ -1045,20 +1045,20 @@ def zonecfgnicconfig(uii, opts) config = @machine.provider_config uii.info(I18n.t('vagrant_zones.vnic_setup')) uii.info(" #{vnic_name}") - strt = "#{@pfexec} zonecfg -z #{@machine.name} " + zonecfg = "#{@pfexec} zonecfg -z #{@machine.name} " cie = config.cloud_init_enabled aa = config.allowed_address case config.brand when 'lx' shrtstr1 = %(set allowed-address=#{allowed_address}; add property (name=gateway,value="#{defrouter}"); ) shrtstr2 = %(add property (name=ips,value="#{allowed_address}"); add property (name=primary,value="true"); end;) - execute(false, %(#{strt}set global-nic=auto; #{shrtstr1} #{shrtstr2}")) + execute(false, %(#{zonecfg}set global-nic=auto; #{shrtstr1} #{shrtstr2}")) when 'bhyve' vlan_option = opts[:vlan].nil? || opts[:vlan].zero? ? '' : "set vlan-id=#{opts[:vlan]}; " base_cmd = if config.on_demand_vnics - %(#{strt}"add net; set physical=#{vnic_name}; #{vlan_option}set global-nic=#{opts[:bridge]}; ) + %(#{zonecfg}"add net; set physical=#{vnic_name}; #{vlan_option}set global-nic=#{opts[:bridge]}; ) else - %(#{strt}"add net; set physical=#{vnic_name}; ) + %(#{zonecfg}"add net; set physical=#{vnic_name}; ) end execute(false, %(#{base_cmd}end;)) unless cie execute(false, %(#{base_cmd}set allowed-address=#{allowed_address}; end;)) if cie && aa