Skip to content

Commit

Permalink
fix: don't delete vnics if on_demand is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkProminic committed Nov 27, 2023
1 parent 70c1596 commit e7d0b8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vagrant-zones/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ def network(uii, state)
@machine.config.vm.networks.each do |adaptertype, opts|
case adaptertype.to_s
when 'public_network'
zonenicdel(uii, opts) if state == 'delete'
zonenicdel(uii, opts) if state == 'delete' && !config.on_demand_vnics
zonecfgnicconfig(uii, opts) if state == 'config'
zoneniccreate(uii, opts) if state == 'create' && !config.on_demand_vnics
zonenicstpzloginsetup(uii, opts, config) if state == 'setup' && config.setup_method == 'zlogin'
when 'private_network'
zonenicdel(uii, opts) if state == 'delete'
zonenicdel(uii, opts) if state == 'delete' && !config.on_demand_vnics
zonedhcpentriesrem(uii, opts) if state == 'delete'
zonenatclean(uii, opts) if state == 'delete'
etherstubdelhvnic(uii, opts) if state == 'delete'
Expand Down

0 comments on commit e7d0b8d

Please sign in to comment.