vagrant-zones 0.1.100 → 0.1.102
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 +17 -0
- data/lib/vagrant-zones/action/package.rb +18 -10
- data/lib/vagrant-zones/driver.rb +17 -31
- 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: 3dcaf86e540128ea22ea6922155447dbc00bee6d2f32ed8aa5c71eaa5563b4b7
|
4
|
+
data.tar.gz: 388ac4b26fac9bfcddbd671970ecacbb16e10923764f8073a0645b77c64ff800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a10de93c1513727b5292e21276e01d94e9867c15ea3befc09967df48a8ed82e1f812e2ea3e35ec45b614f0c8f163917b3c97d33c1f2a718f04f195ac0dd8fcc8
|
7
|
+
data.tar.gz: 82b695f7702fafec3ac023d0b1682712f06e334b2c0f502b4fd63ab94e234b7726c0ce8fbef3291570905c0c2eb7ec9fd262336d7ffc0a477fa59bed35186fe9
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.102](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.101...v0.1.102) (2025-06-01)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* rubocop ([b46dfe4](https://github.com/STARTcloud/vagrant-zones/commit/b46dfe4093191c4868fdfe77d73e454856e4fb85))
|
9
|
+
* Vagrantfile addition ([aa59866](https://github.com/STARTcloud/vagrant-zones/commit/aa59866fe98b85cc5655f2a1b6495120e28cdb90))
|
10
|
+
* Vagrantfile addition ([f6ca043](https://github.com/STARTcloud/vagrant-zones/commit/f6ca0438c2a94201c75405a6925e8178f7252180))
|
11
|
+
|
12
|
+
## [0.1.101](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.100...v0.1.101) (2025-05-09)
|
13
|
+
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
* windows zoneniczloginsetup ([c0eef21](https://github.com/STARTcloud/vagrant-zones/commit/c0eef2157555d668d0a55dddfcbdb2ea419a623d))
|
18
|
+
* windows zoneniczloginsetup ([68581e3](https://github.com/STARTcloud/vagrant-zones/commit/68581e37c4c9dd7353ccdfabdc7a5937f5c6a555))
|
19
|
+
|
3
20
|
## [0.1.100](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.99...v0.1.100) (2025-05-09)
|
4
21
|
|
5
22
|
|
@@ -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/driver.rb
CHANGED
@@ -1358,48 +1358,35 @@ module VagrantPlugins
|
|
1358
1358
|
# Normalize the MAC address to uppercase with hyphens (Windows format)
|
1359
1359
|
normalized_mac = mac.split(':').map { |segment| segment.rjust(2, '0') }.join('-').upcase
|
1360
1360
|
|
1361
|
-
#
|
1362
|
-
|
1363
|
-
|
1364
|
-
# Use the bash command with sed to wrap adapter name with VZWI markers
|
1365
|
-
## DO NOT EVER ADJUST THIS COMMAND, WE MUST USE THIS EXACT COMMAND TO GET THE DATA FROM THE MACHINE
|
1366
|
-
## DO NOT ADJUST THE COMMAND, IT IS IMPORTANT THAT WE DO NOT EVER ADJUST THIS COMMAND
|
1367
|
-
## DO NOT ADJUST THE COMMAND
|
1368
|
-
## DO NOT ADJUST THE COMMAND!!!!!!!!!! SERIOUSLY
|
1369
|
-
getmac_cmd = %(bash -c "getmac /v /FO csv /NH | grep "#{normalized_mac}" | awk -F, '{print $1}' | sed 's/"/VZWI/g'")
|
1361
|
+
# rubocop:disable Style/RedundantStringEscape
|
1362
|
+
getmac_cmd = %(bash -c "getmac /v /FO csv /NH | grep \\\"#{normalized_mac}\\\" | awk -F, '{print $1}' | sed 's/\\\"/VZWI/g'")
|
1363
|
+
# rubocop:enable Style/RedundantStringEscape
|
1370
1364
|
raw_output = zlogin(uii, getmac_cmd)
|
1371
|
-
|
1372
|
-
uii.info("Raw adapter result: #{raw_output.inspect}")
|
1373
|
-
|
1374
|
-
if raw_output.is_a?(String)
|
1375
|
-
hex_display = raw_output.bytes.map { |b| format('\\x%02X', b) }.join
|
1376
|
-
uii.info("Hex representation: #{hex_display}")
|
1377
|
-
elsif raw_output.is_a?(Array)
|
1378
|
-
# Handle array case
|
1379
|
-
hex_display = raw_output.join.bytes.map { |b| format('\\x%02X', b) }.join
|
1380
|
-
uii.info("Hex representation (array joined): #{hex_display}")
|
1381
|
-
end
|
1382
|
-
|
1383
|
-
# Use the strings-ansi gem to sanitize the raw output
|
1384
1365
|
adapter_name = nil
|
1385
1366
|
|
1386
1367
|
# First sanitize the raw output to remove all ANSI escape sequences
|
1387
1368
|
raw_output_str = raw_output.is_a?(Array) ? raw_output.join : raw_output.to_s
|
1388
1369
|
sanitized_output = Strings::ANSI.sanitize(raw_output_str)
|
1389
1370
|
|
1390
|
-
# Debug the sanitized output
|
1391
|
-
uii.info("Sanitized output: #{sanitized_output.inspect}")
|
1392
|
-
|
1393
1371
|
# Find VZWI markers in the sanitized output
|
1394
1372
|
sanitized_output.split(/[\r\n]+/).each do |line|
|
1395
1373
|
next unless line.include?('VZWI')
|
1396
1374
|
|
1397
|
-
|
1375
|
+
# Find all positions of "VZWI" in the string
|
1376
|
+
positions = []
|
1377
|
+
pos = -1
|
1378
|
+
while (pos = line.index('VZWI', pos + 1))
|
1379
|
+
positions << pos
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
# If we have at least 2 occurrences, extract between the last pair
|
1383
|
+
if positions.length >= 2
|
1384
|
+
# Get the last two VZWI positions
|
1385
|
+
last_pair_start = positions[-2]
|
1386
|
+
last_pair_end = positions[-1]
|
1398
1387
|
|
1399
|
-
|
1400
|
-
|
1401
|
-
adapter_name = ::Regexp.last_match(1)
|
1402
|
-
uii.info("Extracted adapter name from sanitized output: '#{adapter_name}'")
|
1388
|
+
# Extract between these positions (adding 4 to skip "VZWI")
|
1389
|
+
adapter_name = line[(last_pair_start + 4)...last_pair_end]
|
1403
1390
|
end
|
1404
1391
|
break
|
1405
1392
|
end
|
@@ -1407,7 +1394,6 @@ module VagrantPlugins
|
|
1407
1394
|
# Only proceed if we got a valid adapter name
|
1408
1395
|
if adapter_name && !adapter_name.empty?
|
1409
1396
|
# Rename the adapter to the VNIC name
|
1410
|
-
uii.info("Using extracted adapter name '#{adapter_name}' for rename")
|
1411
1397
|
rename_adapter = %(netsh interface set interface name="#{adapter_name}" newname="#{vnic_name}")
|
1412
1398
|
uii.info(I18n.t('vagrant_zones.win_applied_rename_adapter')) if zlogin(uii, rename_adapter)
|
1413
1399
|
|
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.102
|
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-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|