vagrant-zones 0.1.83 → 0.1.84
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/vagrant-zones/action/network_cleanup.rb +26 -0
- data/lib/vagrant-zones/action.rb +2 -0
- data/lib/vagrant-zones/config.rb +2 -1
- data/lib/vagrant-zones/driver.rb +17 -5
- data/lib/vagrant-zones/plugin.rb +1 -3
- data/lib/vagrant-zones/version.rb +1 -1
- data/locales/en.yml +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce01cac168233025a31a5c278f6355411796b26718d760d2ed076643af1b486c
|
4
|
+
data.tar.gz: 4f3318fc4e57712bce3a076a5786329ff49d9203ada2df45a6874b8013e8f144
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 660ab29d0b22a305f365ec65871ad00207044e343c7b93f091580398332f39e31c7f7d851f75a2ef312984b30e5b844fd53e2350c111ad1ede7518ad88e400bf
|
7
|
+
data.tar.gz: a598f65dd8cf0efb3aa104fb44b995732b664d900b17208cf934bfa4fec9179777bd829d991a4f9661a05308f583fde9093d01682fbf5024dd38026ce855b7a0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.84](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.83...v0.1.84) (2023-12-14)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* adding removal of zonecfg provisional network after startup ([8885044](https://github.com/STARTcloud/vagrant-zones/commit/88850440213a7ffce82463b02dab56c8c9d05d69))
|
9
|
+
* disable parallel by default ([98de187](https://github.com/STARTcloud/vagrant-zones/commit/98de187ab53a123a95d489a4bd8f7383d1b788ca))
|
10
|
+
* enable parallel builds #dangerwillrobinson ([5bf2cea](https://github.com/STARTcloud/vagrant-zones/commit/5bf2ceaf3adaf42553afe7a38ab9c2a665d7ff21))
|
11
|
+
* remove unneccessary lines from zonenicdel ([39fef96](https://github.com/STARTcloud/vagrant-zones/commit/39fef96b85445c472595154ebb59db8f190a30c4))
|
12
|
+
* remove unneccessary lines from zonenicdel ([227ab2c](https://github.com/STARTcloud/vagrant-zones/commit/227ab2cdb06eb8a414b2f13e567f6be70ac8613c))
|
13
|
+
* renenable parallel ([38c2bf2](https://github.com/STARTcloud/vagrant-zones/commit/38c2bf27e905f8a4099532fa3d193d3825d4ab95))
|
14
|
+
* some rubocop warnings ([88b00c4](https://github.com/STARTcloud/vagrant-zones/commit/88b00c465a3926aa0ce4dc8881592fd755dfd5dc))
|
15
|
+
* typo ) ([b385505](https://github.com/STARTcloud/vagrant-zones/commit/b385505757ac5e078522add1e3e44b99c9369417))
|
16
|
+
* windows multiple nameservers ([430be2d](https://github.com/STARTcloud/vagrant-zones/commit/430be2d868be34a9724b454ff571006c7632df7a))
|
17
|
+
* windows namservers ([b271ae1](https://github.com/STARTcloud/vagrant-zones/commit/b271ae1dbb436750cb4b074f99d10f5922c0ee0c))
|
18
|
+
|
3
19
|
## [0.1.83](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.82...v0.1.83) (2023-12-12)
|
4
20
|
|
5
21
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'log4r'
|
4
|
+
require 'securerandom'
|
5
|
+
require 'digest/md5'
|
6
|
+
|
7
|
+
module VagrantPlugins
|
8
|
+
module ProviderZone
|
9
|
+
module Action
|
10
|
+
# This is use to define the network
|
11
|
+
class NetworkingCleanup
|
12
|
+
def initialize(app, _env)
|
13
|
+
@logger = Log4r::Logger.new('vagrant_zones::action::import')
|
14
|
+
@app = app
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(env)
|
18
|
+
@machine = env[:machine]
|
19
|
+
@driver = @machine.provider.driver
|
20
|
+
@driver.network(env[:ui], 'delete_provisional')
|
21
|
+
@app.call(env)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/vagrant-zones/action.rb
CHANGED
@@ -27,6 +27,7 @@ module VagrantPlugins
|
|
27
27
|
b2.use WaitTillBoot
|
28
28
|
b2.use Setup
|
29
29
|
b2.use WaitTillUp
|
30
|
+
b2.use NetworkingCleanup
|
30
31
|
b2.use Provision
|
31
32
|
b2.use SetHostname
|
32
33
|
b2.use SyncedFolders
|
@@ -186,6 +187,7 @@ module VagrantPlugins
|
|
186
187
|
autoload :Network, action_root.join('network')
|
187
188
|
autoload :Setup, action_root.join('setup')
|
188
189
|
autoload :Start, action_root.join('start')
|
190
|
+
autoload :NetworkingCleanup, action_root.join('network_cleanup')
|
189
191
|
autoload :IsCreated, action_root.join('is_created')
|
190
192
|
autoload :NotCreated, action_root.join('not_created')
|
191
193
|
autoload :CreateSnapshots, action_root.join('create_zfs_snapshots')
|
data/lib/vagrant-zones/config.rb
CHANGED
@@ -7,7 +7,7 @@ module VagrantPlugins
|
|
7
7
|
# This is used define the variables for the project
|
8
8
|
class Config < Vagrant.plugin('2', :config)
|
9
9
|
# rubocop:disable Layout/LineLength
|
10
|
-
attr_accessor :brand, :autoboot, :setup_method, :safe_restart, :allowed_address, :safe_shutdown, :boxshortname, :kernel, :debug, :debug_boot, :private_network, :winalcheck, :winlcheck, :lcheck, :alcheck, :snapshot_script, :diskif, :netif, :cdroms, :disk1path, :disk1size, :cpus, :cpu_configuration, :boot, :complex_cpu_conf, :memory, :vagrant_user, :vagrant_user_private_key_path, :setup_wait, :on_demand_vnics, :clean_shutdown_time, :dhcp4, :vagrant_user_pass, :firmware_type, :vm_type, :partition_id, :shared_disk_enabled, :shared_dir, :acpi, :os_type, :console, :consolehost, :consoleport, :console_onboot, :hostbridge, :sshport, :rdpport, :override, :additional_disks, :cloud_init_resolvers, :cloud_init_enabled, :cloud_init_dnsdomain, :cloud_init_password, :cloud_init_sshkey, :cloud_init_conf, :dns, :box, :vagrant_cloud_creator, :winbooted_string, :booted_string, :zunlockbootkey, :zunlockboot, :xhci_enabled, :login_wait
|
10
|
+
attr_accessor :brand, :autoboot, :setup_method, :safe_restart, :allowed_address, :post_provision_boot, :safe_shutdown, :boxshortname, :kernel, :debug, :debug_boot, :private_network, :winalcheck, :winlcheck, :lcheck, :alcheck, :snapshot_script, :diskif, :netif, :cdroms, :disk1path, :disk1size, :cpus, :cpu_configuration, :boot, :complex_cpu_conf, :memory, :vagrant_user, :vagrant_user_private_key_path, :setup_wait, :on_demand_vnics, :clean_shutdown_time, :dhcp4, :vagrant_user_pass, :firmware_type, :vm_type, :partition_id, :shared_disk_enabled, :shared_dir, :acpi, :os_type, :console, :consolehost, :consoleport, :console_onboot, :hostbridge, :sshport, :rdpport, :override, :additional_disks, :cloud_init_resolvers, :cloud_init_enabled, :cloud_init_dnsdomain, :cloud_init_password, :cloud_init_sshkey, :cloud_init_conf, :dns, :box, :vagrant_cloud_creator, :winbooted_string, :booted_string, :zunlockbootkey, :zunlockboot, :xhci_enabled, :login_wait
|
11
11
|
|
12
12
|
# rubocop:enable Layout/LineLength
|
13
13
|
|
@@ -16,6 +16,7 @@ module VagrantPlugins
|
|
16
16
|
@brand = 'bhyve'
|
17
17
|
@additional_disks = UNSET_VALUE
|
18
18
|
@autoboot = true
|
19
|
+
@post_provision_boot = false
|
19
20
|
@kernel = UNSET_VALUE
|
20
21
|
@boxshortname = UNSET_VALUE
|
21
22
|
@cdroms = nil
|
data/lib/vagrant-zones/driver.rb
CHANGED
@@ -321,6 +321,7 @@ module VagrantPlugins
|
|
321
321
|
when 'public_network'
|
322
322
|
zonenicdel(uii, opts) if state == 'delete' && !config.on_demand_vnics
|
323
323
|
zonecfgnicconfig(uii, opts) if state == 'config'
|
324
|
+
zonecfgnicconfigdelete(uii, opts) if state == 'delete_provisional' && config.on_demand_vnics
|
324
325
|
zoneniccreate(uii, opts) if state == 'create' && !config.on_demand_vnics
|
325
326
|
zonenicstpzloginsetup(uii, opts, config) if state == 'setup' && config.setup_method == 'zlogin'
|
326
327
|
when 'private_network'
|
@@ -1075,6 +1076,14 @@ module VagrantPlugins
|
|
1075
1076
|
end
|
1076
1077
|
end
|
1077
1078
|
|
1079
|
+
## zonecfg function for for Networking
|
1080
|
+
def zonecfgnicconfigdelete(uii, opts)
|
1081
|
+
vnic_name = vname(uii, opts)
|
1082
|
+
uii.info(I18n.t('vagrant_zones.vnic_conf_del'))
|
1083
|
+
uii.info(" #{vnic_name}")
|
1084
|
+
execute(false, "#{@pfexec} zonecfg -z #{@machine.name} remove net physical=#{vnic_name}") if opts[:provisional]
|
1085
|
+
end
|
1086
|
+
|
1078
1087
|
# This helps us set the zone configurations for the zone
|
1079
1088
|
def zonecfg(uii)
|
1080
1089
|
name = @machine.name
|
@@ -1327,7 +1336,6 @@ module VagrantPlugins
|
|
1327
1336
|
def zoneniczloginsetup_windows(uii, opts, _mac)
|
1328
1337
|
ip = ipaddress(uii, opts)
|
1329
1338
|
vnic_name = vname(uii, opts)
|
1330
|
-
servers = dnsservers(uii, opts) unless opts[:dns].nil?
|
1331
1339
|
defrouter = opts[:gateway].to_s
|
1332
1340
|
uii.info(I18n.t('vagrant_zones.configure_win_interface_using_vnic'))
|
1333
1341
|
sleep(60)
|
@@ -1336,13 +1344,17 @@ module VagrantPlugins
|
|
1336
1344
|
## to set the proper VNIC name if using multiple adapters
|
1337
1345
|
rename_adapter = %(netsh interface set interface name = "Ethernet" newname = "#{vnic_name}")
|
1338
1346
|
cmd = %(netsh interface ipv4 set address name="#{vnic_name}" static #{ip} #{opts[:netmask]} #{defrouter})
|
1339
|
-
dns1 = %(netsh int ipv4 set dns name="#{vnic_name}" static #{servers[0]['nameserver']} primary validate=no) unless opts[:dns].nil?
|
1340
|
-
dns2 = %(netsh int ipv4 add dns name="#{vnic_name}" #{servers[1]['nameserver']} index=2 validate=no) unless opts[:dns].nil?
|
1341
|
-
|
1342
1347
|
uii.info(I18n.t('vagrant_zones.win_applied_rename_adapter')) if zlogin(uii, rename_adapter)
|
1343
1348
|
uii.info(I18n.t('vagrant_zones.win_applied_static')) if zlogin(uii, cmd)
|
1349
|
+
return unless opts[:dns].nil?
|
1350
|
+
|
1351
|
+
ip_addresses = dnsservers(uii, opts).map { |hash| hash['nameserver'] }
|
1352
|
+
dns1 = %(netsh int ipv4 set dns name="#{vnic_name}" static #{ip_addresses[0]} primary validate=no)
|
1344
1353
|
uii.info(I18n.t('vagrant_zones.win_applied_dns1')) if zlogin(uii, dns1)
|
1345
|
-
|
1354
|
+
ip_addresses[1..].each_with_index do |dns, index|
|
1355
|
+
additional_nameservers = %(netsh int ipv4 add dns name="#{vnic_name}" #{dns} index="#{index + 2}" validate=no)
|
1356
|
+
uii.info(I18n.t('vagrant_zones.win_applied_dns2')) if zlogin(uii, additional_nameservers)
|
1357
|
+
end
|
1346
1358
|
end
|
1347
1359
|
|
1348
1360
|
def zlogin_win_boot(uii)
|
data/lib/vagrant-zones/plugin.rb
CHANGED
@@ -20,9 +20,7 @@ module VagrantPlugins
|
|
20
20
|
require_relative 'config'
|
21
21
|
Config
|
22
22
|
end
|
23
|
-
|
24
|
-
## provider(:zone, parallel: true) do
|
25
|
-
provider(:zone) do
|
23
|
+
provider(:zone, parallel: false) do
|
26
24
|
require_relative 'provider'
|
27
25
|
Provider
|
28
26
|
end
|
data/locales/en.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-zones
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.84
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/vagrant-zones/action/import.rb
|
133
133
|
- lib/vagrant-zones/action/is_created.rb
|
134
134
|
- lib/vagrant-zones/action/network.rb
|
135
|
+
- lib/vagrant-zones/action/network_cleanup.rb
|
135
136
|
- lib/vagrant-zones/action/not_created.rb
|
136
137
|
- lib/vagrant-zones/action/package.rb
|
137
138
|
- lib/vagrant-zones/action/prepare_nfs_valid_ids.rb
|