vagrant-zones 0.1.94 → 0.1.96
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/CHANGELOG.md +21 -0
- data/lib/vagrant-zones/command/console.rb +3 -4
- data/lib/vagrant-zones/command/guest_power_controls.rb +3 -4
- data/lib/vagrant-zones/command/zfssnapshot.rb +3 -4
- data/lib/vagrant-zones/command/zone.rb +3 -5
- data/lib/vagrant-zones/driver.rb +23 -33
- data/lib/vagrant-zones/provider.rb +1 -1
- data/lib/vagrant-zones/version.rb +1 -1
- data/vagrant-zones.gemspec +5 -5
- 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: '08790ff565fafcf9be7f4019efe4d7cf0096e37accf7d8c463afeb7adab1ed14'
|
4
|
+
data.tar.gz: ae393608d7eb853c88262466d6b571249a6d1a80133818c92cdf269c38e0bccb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73cd100176065cb79599347a5183167904f8db71fe4651db60f72dd67d87d98d62ffad433db78c09c75020c5611137103573ad7e338e68ea46d6fb5a95a1c751
|
7
|
+
data.tar.gz: 7ba74192089545507add98990cd383c8f44b5ba7ecc4d5011613f8c9067b6ee2d41aaa805d564724e38382710a1ac25f728581d13e96e43ed1873319c99be3ab
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.1.96](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.95...v0.1.96) (2024-08-17)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* linting ([86dc089](https://github.com/STARTcloud/vagrant-zones/commit/86dc089c8c2b3b1740fb4ef4eb315f2b2e2dd94a))
|
9
|
+
* linting ([04d665d](https://github.com/STARTcloud/vagrant-zones/commit/04d665d09e68473093a31d86e33065d7f0b698ca))
|
10
|
+
|
11
|
+
## [0.1.95](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.94...v0.1.95) (2024-08-17)
|
12
|
+
|
13
|
+
|
14
|
+
### Bug Fixes
|
15
|
+
|
16
|
+
* linting ([d39015c](https://github.com/STARTcloud/vagrant-zones/commit/d39015c0faba337c8b197e9b35e79f4d1549daba))
|
17
|
+
* linting ([14f34e2](https://github.com/STARTcloud/vagrant-zones/commit/14f34e2c4c10e716924de77d2000618ed249b0d0))
|
18
|
+
* linting ([e908e4d](https://github.com/STARTcloud/vagrant-zones/commit/e908e4dce96a872890201cb67fadbd1fa7a69a02))
|
19
|
+
* linting ([d62952d](https://github.com/STARTcloud/vagrant-zones/commit/d62952de42a07b637a95d6433d0a5d9279b74deb))
|
20
|
+
* linting ([1403f3e](https://github.com/STARTcloud/vagrant-zones/commit/1403f3e24ca50c6878de684ec8770c1542c2798f))
|
21
|
+
* linting ([43d7ecd](https://github.com/STARTcloud/vagrant-zones/commit/43d7ecd08425149f1c262a4af83cf447b2ebd5be))
|
22
|
+
* updating vlans ([1749012](https://github.com/STARTcloud/vagrant-zones/commit/1749012ad76ec05c61ba49e66cf389f09531cfb2))
|
23
|
+
|
3
24
|
## [0.1.94](https://github.com/STARTcloud/vagrant-zones/compare/v0.1.93...v0.1.94) (2024-01-09)
|
4
25
|
|
5
26
|
|
@@ -21,7 +21,7 @@ module VagrantPlugins
|
|
21
21
|
require File.expand_path('webvnc_console', __dir__)
|
22
22
|
WebVNCConsole
|
23
23
|
end
|
24
|
-
super
|
24
|
+
super
|
25
25
|
end
|
26
26
|
|
27
27
|
def execute
|
@@ -48,9 +48,8 @@ module VagrantPlugins
|
|
48
48
|
subopts.separator 'Available subcommands:'
|
49
49
|
# Add the available subcommands as separators in order to print them
|
50
50
|
# out as well.
|
51
|
-
keys =
|
52
|
-
|
53
|
-
keys.sort.each do |key|
|
51
|
+
keys = @subcommands.map { |(key, _value)| key.to_s }.sort
|
52
|
+
keys.each do |key|
|
54
53
|
subopts.separator " #{key}"
|
55
54
|
end
|
56
55
|
subopts.separator 'For help on any individual subcommand run `vagrant zone console <subcommand> -h`'
|
@@ -17,7 +17,7 @@ module VagrantPlugins
|
|
17
17
|
require File.expand_path('shutdown_guest', __dir__)
|
18
18
|
ShutdownGuest
|
19
19
|
end
|
20
|
-
super
|
20
|
+
super
|
21
21
|
end
|
22
22
|
|
23
23
|
def execute
|
@@ -42,9 +42,8 @@ module VagrantPlugins
|
|
42
42
|
subopts.separator 'Available subcommands:'
|
43
43
|
# Add the available subcommands as separators in order to print them
|
44
44
|
# out as well.
|
45
|
-
keys =
|
46
|
-
|
47
|
-
keys.sort.each do |key|
|
45
|
+
keys = @subcommands.map { |(key, _value)| key.to_s }.sort
|
46
|
+
keys.each do |key|
|
48
47
|
subopts.separator " #{key}"
|
49
48
|
end
|
50
49
|
subopts.separator ''
|
@@ -25,7 +25,7 @@ module VagrantPlugins
|
|
25
25
|
require File.expand_path('configure_snapshots', __dir__)
|
26
26
|
ConfigureSnapshots
|
27
27
|
end
|
28
|
-
super
|
28
|
+
super
|
29
29
|
end
|
30
30
|
|
31
31
|
def execute
|
@@ -51,9 +51,8 @@ module VagrantPlugins
|
|
51
51
|
subopts.separator 'Available subcommands:'
|
52
52
|
# Add the available subcommands as separators in order to print them
|
53
53
|
# out as well.
|
54
|
-
keys =
|
55
|
-
|
56
|
-
keys.sort.each do |key|
|
54
|
+
keys = @subcommands.map { |(key, _value)| key.to_s }.sort
|
55
|
+
keys.each do |key|
|
57
56
|
subopts.separator " #{key}"
|
58
57
|
end
|
59
58
|
subopts.separator ''
|
@@ -28,7 +28,7 @@ module VagrantPlugins
|
|
28
28
|
require File.expand_path('console', __dir__)
|
29
29
|
Console
|
30
30
|
end
|
31
|
-
super
|
31
|
+
super
|
32
32
|
end
|
33
33
|
|
34
34
|
def execute
|
@@ -54,10 +54,8 @@ module VagrantPlugins
|
|
54
54
|
|
55
55
|
# Add the available subcommands as separators in order to print them
|
56
56
|
# out as well.
|
57
|
-
keys =
|
58
|
-
|
59
|
-
|
60
|
-
keys.sort.each do |key|
|
57
|
+
keys = @subcommands.map { |(key, _value)| key.to_s }.sort
|
58
|
+
keys.each do |key|
|
61
59
|
subopts.separator " #{key}"
|
62
60
|
end
|
63
61
|
|
data/lib/vagrant-zones/driver.rb
CHANGED
@@ -625,16 +625,16 @@ module VagrantPlugins
|
|
625
625
|
vnic_name = vname(uii, opts)
|
626
626
|
uii.info(I18n.t('vagrant_zones.nat_vnic_setup'))
|
627
627
|
uii.info(" #{vnic_name}")
|
628
|
-
|
628
|
+
zonecfg_cmd = "#{@pfexec} zonecfg -z #{@machine.name} "
|
629
629
|
cie = config.cloud_init_enabled
|
630
630
|
case config.brand
|
631
631
|
when 'lx'
|
632
632
|
shrtstr1 = %(set allowed-address=#{allowed_address}; add property (name=gateway,value="#{defrouter}"); )
|
633
633
|
shrtstr2 = %(add property (name=ips,value="#{allowed_address}"); add property (name=primary,value="true"); end;)
|
634
|
-
execute(false, %(#{
|
634
|
+
execute(false, %(#{zonecfg_cmd}set global-nic=auto; #{shrtstr1} #{shrtstr2}"))
|
635
635
|
when 'bhyve'
|
636
|
-
execute(false, %(#{
|
637
|
-
execute(false, %(#{
|
636
|
+
execute(false, %(#{zonecfg_cmd}"add net; set physical=#{vnic_name}; end;")) unless cie
|
637
|
+
execute(false, %(#{zonecfg_cmd}"add net; set physical=#{vnic_name}; set allowed-address=#{allowed_address}; end;")) if cie
|
638
638
|
end
|
639
639
|
end
|
640
640
|
|
@@ -724,16 +724,12 @@ module VagrantPlugins
|
|
724
724
|
def zoneniccreate(uii, opts)
|
725
725
|
mac = macaddress(uii, opts)
|
726
726
|
vnic_name = vname(uii, opts)
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
uii.info(I18n.t('vagrant_zones.creating_vnic'))
|
734
|
-
uii.info(" #{vnic_name}")
|
735
|
-
execute(false, "#{@pfexec} dladm create-vnic -l #{opts[:bridge]} -m #{mac} -v #{vlan} #{vnic_name}")
|
736
|
-
end
|
727
|
+
uii.info(I18n.t('vagrant_zones.creating_vnic'))
|
728
|
+
uii.info(" #{vnic_name}")
|
729
|
+
command = "#{@pfexec} dladm create-vnic -l #{opts[:bridge]} -m #{mac}"
|
730
|
+
command += " -v #{opts[:vlan]}" unless opts[:vlan].nil? || (opts[:vlan]).zero?
|
731
|
+
command += " #{vnic_name}"
|
732
|
+
execute(false, command)
|
737
733
|
end
|
738
734
|
|
739
735
|
# This helps us create all the datasets for the zone
|
@@ -1029,10 +1025,8 @@ module VagrantPlugins
|
|
1029
1025
|
execute(false, %(#{zcfg}"add attr; set name=password; set value=#{ccip}; set type=string; end;")) unless ccip.nil?
|
1030
1026
|
|
1031
1027
|
cclir = config.dns
|
1032
|
-
dservers = []
|
1033
|
-
|
1034
|
-
dservers.append(ns['nameserver'])
|
1035
|
-
end
|
1028
|
+
dservers = cclir['dns'].map { |ns| ns['nameserver'] }
|
1029
|
+
|
1036
1030
|
uii.info(I18n.t('vagrant_zones.setting_cloud_resolvers')) unless dservers.nil?
|
1037
1031
|
uii.info(" #{dservers}") unless dservers.nil?
|
1038
1032
|
execute(false, %(#{zcfg}"add attr; set name=resolvers; set value=#{dservers}; set type=string; end;")) unless dservers.nil?
|
@@ -1051,28 +1045,24 @@ module VagrantPlugins
|
|
1051
1045
|
config = @machine.provider_config
|
1052
1046
|
uii.info(I18n.t('vagrant_zones.vnic_setup'))
|
1053
1047
|
uii.info(" #{vnic_name}")
|
1054
|
-
|
1048
|
+
zonecfg_cmd = "#{@pfexec} zonecfg -z #{@machine.name} "
|
1055
1049
|
cie = config.cloud_init_enabled
|
1056
1050
|
aa = config.allowed_address
|
1057
1051
|
case config.brand
|
1058
1052
|
when 'lx'
|
1059
1053
|
shrtstr1 = %(set allowed-address=#{allowed_address}; add property (name=gateway,value="#{defrouter}"); )
|
1060
1054
|
shrtstr2 = %(add property (name=ips,value="#{allowed_address}"); add property (name=primary,value="true"); end;)
|
1061
|
-
execute(false, %(#{
|
1055
|
+
execute(false, %(#{zonecfg_cmd}set global-nic=auto; #{shrtstr1} #{shrtstr2}"))
|
1062
1056
|
when 'bhyve'
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
execute(false, %(#{strt}"add net; set physical=#{vnic_name}; end;")) unless cie
|
1073
|
-
execute(false, %(#{strt}"add net; set physical=#{vnic_name}; set allowed-address=#{allowed_address}; end;")) if cie && aa
|
1074
|
-
execute(false, %(#{strt}"add net; set physical=#{vnic_name}; end;")) if cie && !aa
|
1075
|
-
end
|
1057
|
+
vlan_option = opts[:vlan].nil? || opts[:vlan].zero? ? '' : "set vlan-id=#{opts[:vlan]}; "
|
1058
|
+
base_cmd = if config.on_demand_vnics
|
1059
|
+
%(#{zonecfg_cmd}"add net; set physical=#{vnic_name}; #{vlan_option}set global-nic=#{opts[:bridge]}; )
|
1060
|
+
else
|
1061
|
+
%(#{zonecfg_cmd}"add net; set physical=#{vnic_name}; )
|
1062
|
+
end
|
1063
|
+
execute(false, %(#{base_cmd}end;)) unless cie
|
1064
|
+
execute(false, %(#{base_cmd}set allowed-address=#{allowed_address}; end;)) if cie && aa
|
1065
|
+
execute(false, %(#{base_cmd}end;)) if cie && !aa
|
1076
1066
|
end
|
1077
1067
|
end
|
1078
1068
|
|
data/vagrant-zones.gemspec
CHANGED
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.required_ruby_version = '>= 2.7.0'
|
31
31
|
spec.required_rubygems_version = '>= 1.3.6'
|
32
|
-
spec.
|
33
|
-
spec.
|
34
|
-
spec.
|
35
|
-
spec.
|
36
|
-
spec.
|
32
|
+
spec.add_dependency 'i18n', '~> 1.0'
|
33
|
+
spec.add_dependency 'iniparse', '~> 1.0'
|
34
|
+
spec.add_dependency 'log4r', '~> 1.1'
|
35
|
+
spec.add_dependency 'netaddr', '~> 2.0', '>= 2.0.4'
|
36
|
+
spec.add_dependency 'ruby_expect', '~> 1.7', '>= 1.7.5'
|
37
37
|
end
|
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.96
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Gilbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|