vagrant-zones 0.1.101 → 0.1.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +18 -0
- data/Gemfile +1 -1
- data/lib/vagrant-zones/action/package.rb +18 -10
- data/lib/vagrant-zones/action/restart.rb +1 -0
- data/lib/vagrant-zones/action/shutdown.rb +1 -0
- data/lib/vagrant-zones/action.rb +1 -0
- data/lib/vagrant-zones/driver.rb +7 -0
- data/lib/vagrant-zones/version.rb +1 -1
- data/locales/en.yml +3 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 199dc637182518fb306265b19efe0d193621a2122ac05239b10cd7373783ca90
|
4
|
+
data.tar.gz: 7bcbbf9ef88e301dd6319e8c0e8179ef437e32b39f3020173af4517c89a03110
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f52fa426012f1d8a4bb1eba1759e5ce0618f43830669df61bf5074f77c4c7f055d8f3b6eafe32b52675a8e4d47d3f85c2a5c8ca1a96a7feeb9bc6a58d6005bc
|
7
|
+
data.tar.gz: 44fceee141650ee9b86b794e3980a8941f986f602a5a30827503186cced99caa974761ec450fe4a443ebf615eacc803ca219fa8d43b405deaa7639e2ba50c4e6
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.103](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.102...v0.1.103) (2025-09-19)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* add metric to windows nat interfaces ([4d37895](https://github.com/STARTcloud/vagrant-zones/commit/4d378953869a4c7983baa58b5a518398207db01d))
|
9
|
+
* linting ([03be1ce](https://github.com/STARTcloud/vagrant-zones/commit/03be1cecdb656d30dcf2d998231c68da94f85c5e))
|
10
|
+
* linting ([fbda546](https://github.com/STARTcloud/vagrant-zones/commit/fbda546b652248ade68abcc0d4f8a15a330e62e7))
|
11
|
+
|
12
|
+
## [0.1.102](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.101...v0.1.102) (2025-06-01)
|
13
|
+
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
* rubocop ([b46dfe4](https://github.com/STARTcloud/vagrant-zones/commit/b46dfe4093191c4868fdfe77d73e454856e4fb85))
|
18
|
+
* Vagrantfile addition ([aa59866](https://github.com/STARTcloud/vagrant-zones/commit/aa59866fe98b85cc5655f2a1b6495120e28cdb90))
|
19
|
+
* Vagrantfile addition ([f6ca043](https://github.com/STARTcloud/vagrant-zones/commit/f6ca0438c2a94201c75405a6925e8178f7252180))
|
20
|
+
|
3
21
|
## [0.1.101](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.100...v0.1.101) (2025-05-09)
|
4
22
|
|
5
23
|
|
data/Gemfile
CHANGED
@@ -20,7 +20,7 @@ group :plugins do
|
|
20
20
|
gem 'rspec-mocks', '~> 3.10', '>= 3.10.0'
|
21
21
|
gem 'rubocop', '~> 1.0'
|
22
22
|
gem 'rubocop-rake', '~> 0.6', '>= 0.6.0'
|
23
|
-
gem 'rubocop-rspec', '~>
|
23
|
+
gem 'rubocop-rspec', '~> 3.7'
|
24
24
|
gem 'ruby-progressbar', '~> 1.11', '>= 1.11.0'
|
25
25
|
gem 'strings-ansi', '~> 0.2.0'
|
26
26
|
end
|
@@ -68,16 +68,24 @@ module VagrantPlugins
|
|
68
68
|
end
|
69
69
|
|
70
70
|
## Create a Vagrantfile or load from Users Defined File
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
71
|
+
if env['package.vagrantfile']
|
72
|
+
# Use the custom Vagrantfile provided by the user
|
73
|
+
custom_vagrantfile = env['package.vagrantfile']
|
74
|
+
raise Vagrant::Errors::PackageIncludeMissing, file: custom_vagrantfile unless File.exist?(custom_vagrantfile)
|
75
|
+
|
76
|
+
FileUtils.cp(custom_vagrantfile, "#{Dir.pwd}/_tmp_package/Vagrantfile", preserve: true)
|
77
|
+
else
|
78
|
+
# Use the default Vagrantfile content
|
79
|
+
vagrantfile_content = <<~'CODE'
|
80
|
+
require 'yaml'
|
81
|
+
require File.expand_path("#{File.dirname(__FILE__)}/core/Hosts.rb")
|
82
|
+
settings = YAML::load(File.read("#{File.dirname(__FILE__)}/Hosts.yml"))
|
83
|
+
Vagrant.configure("2") do |config|
|
84
|
+
Hosts.configure(config, settings)
|
85
|
+
end
|
86
|
+
CODE
|
87
|
+
File.write("#{Dir.pwd}/_tmp_package/Vagrantfile", vagrantfile_content)
|
88
|
+
end
|
81
89
|
|
82
90
|
info_content_hash = {
|
83
91
|
'boxname' => boxname,
|
data/lib/vagrant-zones/action.rb
CHANGED
@@ -8,6 +8,7 @@ module VagrantPlugins
|
|
8
8
|
# Run actions against the machine
|
9
9
|
module Action # rubocop:disable Metrics/ModuleLength
|
10
10
|
include Vagrant::Action::Builtin
|
11
|
+
|
11
12
|
@logger = Log4r::Logger.new('vagrant_zones::action')
|
12
13
|
|
13
14
|
# This action is called to bring the box up from nothing.
|
data/lib/vagrant-zones/driver.rb
CHANGED
@@ -22,6 +22,7 @@ module VagrantPlugins
|
|
22
22
|
# This class does the heavy lifting of the zone provider
|
23
23
|
class Driver
|
24
24
|
include Vagrant::Util::Retryable
|
25
|
+
|
25
26
|
attr_accessor :executor
|
26
27
|
|
27
28
|
def initialize(machine)
|
@@ -1342,6 +1343,7 @@ module VagrantPlugins
|
|
1342
1343
|
ip = ipaddress(uii, opts)
|
1343
1344
|
vnic_name = vname(uii, opts)
|
1344
1345
|
defrouter = opts[:gateway].to_s
|
1346
|
+
metric = opts[:metric] || 100
|
1345
1347
|
uii.info(I18n.t('vagrant_zones.configure_win_interface_using_vnic'))
|
1346
1348
|
sleep(60)
|
1347
1349
|
|
@@ -1399,6 +1401,11 @@ module VagrantPlugins
|
|
1399
1401
|
|
1400
1402
|
# Configure the interface with IP, mask, and gateway
|
1401
1403
|
cmd = %(netsh interface ipv4 set address name="#{vnic_name}" static #{ip} #{opts[:netmask]} #{defrouter})
|
1404
|
+
# Add metric setting for NAT networks
|
1405
|
+
if opts[:nictype] == 'nat' || opts[:provisional]
|
1406
|
+
metric_cmd = %(netsh interface ipv4 set interface "#{vnic_name}" metric=#{metric})
|
1407
|
+
zlogin(uii, metric_cmd)
|
1408
|
+
end
|
1402
1409
|
uii.info(I18n.t('vagrant_zones.win_applied_static')) if zlogin(uii, cmd)
|
1403
1410
|
|
1404
1411
|
# Configure DNS if provided
|
data/locales/en.yml
CHANGED
@@ -16,7 +16,7 @@ en:
|
|
16
16
|
Invalid bhyve configuration detected
|
17
17
|
console_failed: |-
|
18
18
|
Failed to access console
|
19
|
-
|
19
|
+
netplan_failed: |-
|
20
20
|
Failed to apply the netplan configuration inside the VM
|
21
21
|
console_failed_exit: |-
|
22
22
|
Exiting
|
@@ -184,7 +184,7 @@ en:
|
|
184
184
|
Starting the zone
|
185
185
|
joyent_image_uuid_verified: |-
|
186
186
|
Joyent image UUID has been verified ==>
|
187
|
-
|
187
|
+
lx_zone_dataset_info: |-
|
188
188
|
LX zone dataset ==>
|
189
189
|
setting_dns_server: |-
|
190
190
|
Setting nameserver ==>
|
@@ -327,5 +327,4 @@ en:
|
|
327
327
|
win_applied_dns1: |-
|
328
328
|
- Set Primary DNS
|
329
329
|
win_applied_dns2: |-
|
330
|
-
- Set Secondary DNS
|
331
|
-
|
330
|
+
- Set Secondary DNS
|
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.103
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|