vagrant-subutai 7.0.3 → 7.0.4
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 +17 -1
- data/README.md +1 -1
- data/lib/vagrant-subutai/blueprint/variables_controller.rb +4 -4
- data/lib/vagrant-subutai/cleanup.rb +4 -4
- data/lib/vagrant-subutai/command.rb +3 -1
- data/lib/vagrant-subutai/configs/configs.rb +1 -0
- data/lib/vagrant-subutai/create_disk.rb +2 -1
- data/lib/vagrant-subutai/packer/subutai_config.rb +38 -2
- data/lib/vagrant-subutai/packer/subutai_disk.rb +6 -2
- data/lib/vagrant-subutai/packer/subutai_validation.rb +7 -1
- data/lib/vagrant-subutai/rest/bazaar.rb +19 -0
- data/lib/vagrant-subutai/subutai_commands.rb +3 -2
- data/lib/vagrant-subutai/util/terminal.rb +9 -0
- data/lib/vagrant-subutai/version.rb +1 -1
- data/test/both_disk.yml +2 -0
- data/test/disk_size.yml +1 -1
- data/test/hyperv.yml +2 -0
- data/test/kvm.yml +2 -0
- data/test/parallels.yml +2 -0
- data/test/subutai-validation-0.yml +6 -1
- data/test/subutai_config_test.rb +70 -0
- data/test/subutai_disk.yml +1 -0
- data/test/subutai_disk_test.rb +9 -0
- data/test/virtualbox.yml +2 -0
- data/test/vmware.yml +2 -0
- data/vagrant-subutai.gemspec +1 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a2394ca615158b7425e48e1af5bf04e38ce0ed0
|
4
|
+
data.tar.gz: e08f157a811c92024bed3bebb5780f12247068c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4a1cb66709f0ed8fddfc11a2056401e859d974c654532261c1ea82615bf257ab4394de474f8ddf96deae92ab36cfefc4a67665971d79611b184bde09d7991e5
|
7
|
+
data.tar.gz: 526a8f25d8b647b49d5f57f1d20e7c43b1e51603d59067f8e5d0b42deee610b86351267f1da262d60e95a5931e79c6fa95415af2c26784be4b0f027c9b59aa92
|
data/CHANGELOG.md
CHANGED
@@ -74,4 +74,20 @@ BUG FIXES:
|
|
74
74
|
|
75
75
|
BUG FIXES:
|
76
76
|
- [hyperv, vmware_desktop] fixed delete virtual disk file after destroy VM
|
77
|
-
- user configuration validation
|
77
|
+
- user configuration validation
|
78
|
+
|
79
|
+
## 7.0.4 (June 26, 2018)
|
80
|
+
|
81
|
+
BUG FIXES:
|
82
|
+
- Blueprint provisioning template not found fixed
|
83
|
+
|
84
|
+
FEATURES:
|
85
|
+
|
86
|
+
- Added new bridge configuration property by specific hypervisor
|
87
|
+
- User configuration added new keys:
|
88
|
+
- SUBUTAI_DISK
|
89
|
+
- BRIDGE_VIRTUALBOX
|
90
|
+
- BRIDGE_PARALLELS
|
91
|
+
- BRIDGE_VMWARE
|
92
|
+
- BRIDGE_KVM
|
93
|
+
- BRIDGE_HYPERV
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ COMMANDS:
|
|
43
43
|
update - update Subutai management, container or Resource host
|
44
44
|
vxlan - VXLAN tunnels operation
|
45
45
|
register - register Subutai PeerOS to Bazaar
|
46
|
-
|
46
|
+
unregister - unregister Subutai PeerOS from Bazaar
|
47
47
|
fingerprint - shows fingerprint Subutai Console
|
48
48
|
open - open the Subutai PeerOS in browser
|
49
49
|
blueprint - run blueprint provisioning
|
@@ -208,7 +208,7 @@ module VagrantSubutai
|
|
208
208
|
node = {}
|
209
209
|
node['hostname'] = container.hostname
|
210
210
|
node['quota'] = {'containerSize' => container.container_size}
|
211
|
-
node['templateId'] = Rest::
|
211
|
+
node['templateId'] = Rest::Bazaar.template_id(container.name, container.owner)
|
212
212
|
node['resourceHostId'] = rh_id
|
213
213
|
node['peerId'] = peer_id
|
214
214
|
nodes << node
|
@@ -222,7 +222,7 @@ module VagrantSubutai
|
|
222
222
|
node = {}
|
223
223
|
node['hostname'] = container.hostname
|
224
224
|
node['quota'] = {'containerSize' => container.container_size}
|
225
|
-
node['templateId'] = Rest::
|
225
|
+
node['templateId'] = Rest::Bazaar.template_id(container.name, container.owner)
|
226
226
|
node['resourceHostId'] = rh_id
|
227
227
|
node['templateName'] = container.name
|
228
228
|
node['peerId'] = peer_id
|
@@ -296,7 +296,7 @@ module VagrantSubutai
|
|
296
296
|
@json[KEYS[:containers]].each do |container|
|
297
297
|
if container.key?(KEYS[:port_mapping])
|
298
298
|
container[KEYS[:port_mapping]].each do |port_map|
|
299
|
-
if port_map[KEYS[:protocol]] == '
|
299
|
+
if port_map[KEYS[:protocol]].downcase == 'http' || port_map[KEYS[:protocol]].downcase == 'tcp'
|
300
300
|
domain = VagrantSubutai::Models::Domain.new
|
301
301
|
|
302
302
|
domain.protocol = port_map[KEYS[:protocol]]
|
@@ -318,7 +318,7 @@ module VagrantSubutai
|
|
318
318
|
# @params variable json object
|
319
319
|
def get_input(variable_json)
|
320
320
|
if variable_json[KEYS[:type]] == 'enum'
|
321
|
-
Put.info "\
|
321
|
+
Put.info "\n#{variable_json[KEYS[:description]]} (Ex: #{variable_json[KEYS[:default]]}): "
|
322
322
|
validations = variable_json[KEYS[:validation]].split(',')
|
323
323
|
|
324
324
|
temp = nil
|
@@ -57,9 +57,9 @@ module VagrantSubutai
|
|
57
57
|
if File.exist?(disks[key])
|
58
58
|
begin
|
59
59
|
File.delete(disks[key])
|
60
|
-
puts "
|
60
|
+
puts "==> default: Deleted file: #{disks[key]}"
|
61
61
|
rescue Errno::EACCES
|
62
|
-
puts "
|
62
|
+
puts "==> default: (Permission denied) Failed delete file: #{disks[key]}"
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
@@ -69,9 +69,9 @@ module VagrantSubutai
|
|
69
69
|
if File.exist?(SubutaiConfig::GENERATED_FILE)
|
70
70
|
begin
|
71
71
|
File.delete SubutaiConfig::GENERATED_FILE
|
72
|
-
puts "
|
72
|
+
puts "==> default: Deleted file: #{SubutaiConfig::GENERATED_FILE}"
|
73
73
|
rescue Errno::EACCES
|
74
|
-
puts "
|
74
|
+
puts "==> default: (Permission denied) Failed delete file: #{SubutaiConfig::GENERATED_FILE}"
|
75
75
|
end
|
76
76
|
end
|
77
77
|
end
|
@@ -28,6 +28,8 @@ module VagrantSubutai
|
|
28
28
|
subutai_cli.register(nil, nil, check_subutai_console_url(subutai_cli))
|
29
29
|
when 'deregister'
|
30
30
|
subutai_cli.deregister(nil, nil, check_subutai_console_url(subutai_cli))
|
31
|
+
when 'unregister'
|
32
|
+
subutai_cli.deregister(nil, nil, check_subutai_console_url(subutai_cli))
|
31
33
|
when 'fingerprint'
|
32
34
|
subutai_cli.fingerprint(check_subutai_console_url(subutai_cli))
|
33
35
|
when 'open'
|
@@ -102,7 +104,7 @@ COMMANDS:
|
|
102
104
|
update - update Subutai management, container or Resource host
|
103
105
|
vxlan - VXLAN tunnels operation
|
104
106
|
register - register Subutai PeerOS to Bazaar
|
105
|
-
|
107
|
+
unregister - unregister Subutai PeerOS from Bazaar
|
106
108
|
fingerprint - shows fingerprint Subutai Console
|
107
109
|
open - open the Subutai PeerOS in browser
|
108
110
|
blueprint - run blueprint provisioning
|
@@ -151,6 +151,7 @@ module VagrantSubutai
|
|
151
151
|
VARIABLES = '/rest/v1/client/blueprint/variables'.freeze
|
152
152
|
BLUEPRINT = '/rest/v1/client/blueprint/build'.freeze
|
153
153
|
DOMAIN_LIST = '/rest/v1/client/domains'.freeze
|
154
|
+
TEMPLATE = '/rest/v1/cdn/template?name={TEMPLATE_NAME}'
|
154
155
|
end
|
155
156
|
end
|
156
157
|
|
@@ -43,7 +43,8 @@ module VagrantSubutai
|
|
43
43
|
file_disk = SubutaiDisk.file_path(grow_by, "hyper_v")
|
44
44
|
|
45
45
|
unless File.exist?(file_disk)
|
46
|
-
Put.warn
|
46
|
+
Put.warn SubutaiDisk.message(grow_by)
|
47
|
+
|
47
48
|
if has_grow
|
48
49
|
if SubutaiDisk.hyperv_create_disk(grow_by, file_disk)
|
49
50
|
SubutaiDisk.save_path(SubutaiDisk.port, file_disk)
|
@@ -54,6 +54,12 @@ module SubutaiConfig
|
|
54
54
|
LIBVIRT_MACVTAP
|
55
55
|
LIBVIRT_NO_BRIDGE
|
56
56
|
BAZAAR_NO_AUTO
|
57
|
+
SUBUTAI_DISK
|
58
|
+
BRIDGE_VIRTUALBOX
|
59
|
+
BRIDGE_PARALLELS
|
60
|
+
BRIDGE_VMWARE
|
61
|
+
BRIDGE_KVM
|
62
|
+
BRIDGE_HYPERV
|
57
63
|
].freeze
|
58
64
|
|
59
65
|
GENERATED_PARAMETERS = %i[
|
@@ -98,12 +104,12 @@ module SubutaiConfig
|
|
98
104
|
LIBVIRT_PORT: 22, # Libvirt kvm remote operation ssh port
|
99
105
|
LIBVIRT_MACVTAP: false, # Libvirt macvtap interface
|
100
106
|
BAZAAR_NO_AUTO: false, # PeerOs automatic registration to Bazaar (turn on(false), turn off(true))
|
107
|
+
PROVISION: true, # to provision or not to
|
101
108
|
|
102
109
|
# Configuration parameters below have not been implemented
|
103
110
|
SUBUTAI_DESKTOP: false, # install desktop with tray and p2p client
|
104
111
|
SUBUTAI_MAN_TMPL: nil, # provision alternative management template
|
105
|
-
APT_PROXY_URL: nil
|
106
|
-
PROVISION: true # to provision or not to
|
112
|
+
APT_PROXY_URL: nil # configure apt proxy URL
|
107
113
|
}
|
108
114
|
|
109
115
|
# User provided configuration settings
|
@@ -155,6 +161,23 @@ module SubutaiConfig
|
|
155
161
|
@bridged = true
|
156
162
|
end
|
157
163
|
|
164
|
+
# The "general" BRIDGE configuration property should be overridden or
|
165
|
+
# set to the hypervisor/provider specific
|
166
|
+
def self.bridge
|
167
|
+
case provider
|
168
|
+
when :hyper_v
|
169
|
+
SubutaiConfig.put(:BRIDGE, get(:BRIDGE_HYPERV), true) unless get(:BRIDGE_HYPERV).nil?
|
170
|
+
when :parallels
|
171
|
+
SubutaiConfig.put(:BRIDGE, get(:BRIDGE_PARALLELS), true) unless get(:BRIDGE_PARALLELS).nil?
|
172
|
+
when :vmware
|
173
|
+
SubutaiConfig.put(:BRIDGE, get(:BRIDGE_VMWARE), true) unless get(:BRIDGE_VMWARE).nil?
|
174
|
+
when :libvirt
|
175
|
+
SubutaiConfig.put(:BRIDGE, get(:BRIDGE_KVM), true) unless get(:BRIDGE_KVM).nil?
|
176
|
+
when :virtualbox
|
177
|
+
SubutaiConfig.put(:BRIDGE, get(:BRIDGE_VIRTUALBOX), true) unless get(:BRIDGE_VIRTUALBOX).nil?
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
158
181
|
def self.provision_management?
|
159
182
|
return false unless boolean?(:PROVISION)
|
160
183
|
return false if get(:_ALT_MANAGEMENT).nil?
|
@@ -180,8 +203,15 @@ module SubutaiConfig
|
|
180
203
|
@config
|
181
204
|
end
|
182
205
|
|
206
|
+
# Now we support both configuration parameter DISK_SIZE and SUBUTAI_DISK
|
207
|
+
# SUBUTAI_DISK overrides DISK_SIZE
|
208
|
+
def self.disk_size
|
209
|
+
put(:DISK_SIZE, get(:SUBUTAI_DISK), true) unless get(:SUBUTAI_DISK).nil?
|
210
|
+
end
|
211
|
+
|
183
212
|
def self.get_grow_by
|
184
213
|
disk = get(:DISK_SIZE)
|
214
|
+
|
185
215
|
if disk.nil?
|
186
216
|
nil
|
187
217
|
else
|
@@ -348,6 +378,12 @@ module SubutaiConfig
|
|
348
378
|
ENV.each do |key, value|
|
349
379
|
put(key.to_sym, value, false) if USER_PARAMETERS.include? key.to_sym
|
350
380
|
end
|
381
|
+
|
382
|
+
# override configuration parameters BRIDGE by specified provider bridge name
|
383
|
+
bridge
|
384
|
+
# SUBUTAI_DISK overrides DISK_SIZE
|
385
|
+
disk_size
|
386
|
+
|
351
387
|
do_handlers
|
352
388
|
do_network(provider)
|
353
389
|
end
|
@@ -86,7 +86,7 @@ module SubutaiDisk
|
|
86
86
|
id = SubutaiConfig.machine_id(:hyper_v)
|
87
87
|
|
88
88
|
if id.nil?
|
89
|
-
Put.error("
|
89
|
+
Put.error("[FAILED] Disk Creation. Not found machine id")
|
90
90
|
false
|
91
91
|
else
|
92
92
|
VagrantSubutai::Util::Powershell.execute(script, "-VmId", id, "-DiskPath", file_disk, "-DiskSize", "#{vmware_size(grow_by)}")
|
@@ -98,7 +98,7 @@ module SubutaiDisk
|
|
98
98
|
id = SubutaiConfig.machine_id(:hyper_v)
|
99
99
|
|
100
100
|
if id.nil?
|
101
|
-
Put.error("
|
101
|
+
Put.error("[FAILED] Remove virtual disk. Not found machine id")
|
102
102
|
false
|
103
103
|
else
|
104
104
|
VagrantSubutai::Util::Powershell.execute(script, "-VmId", id)
|
@@ -119,6 +119,10 @@ module SubutaiDisk
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
|
122
|
+
def self.message(grow_by)
|
123
|
+
"==> default: Disk size configured to #{SubutaiConfig.get(:DISK_SIZE)}GB, increasing 100GB default by #{grow_by}GB."
|
124
|
+
end
|
125
|
+
|
122
126
|
# Gives disk file name
|
123
127
|
# THIS IS FOR OLD VERSION BOXES
|
124
128
|
# UNDER <= v3.0.5
|
@@ -20,6 +20,7 @@ module SubutaiValidation
|
|
20
20
|
"AUTHORIZED_KEYS": :path,
|
21
21
|
"PASSWORD_OVERRIDE": :string,
|
22
22
|
"DISK_SIZE": :int,
|
23
|
+
"SUBUTAI_DISK": :int,
|
23
24
|
"SUBUTAI_ENV_TYPE": :enum,
|
24
25
|
"SUBUTAI_NAME": :string,
|
25
26
|
"SUBUTAI_SCOPE": :enum,
|
@@ -34,7 +35,12 @@ module SubutaiValidation
|
|
34
35
|
"LIBVIRT_PORT": :int,
|
35
36
|
"LIBVIRT_MACVTAP": :bool,
|
36
37
|
"LIBVIRT_NO_BRIDGE": :bool,
|
37
|
-
"BAZAAR_NO_AUTO": :bool
|
38
|
+
"BAZAAR_NO_AUTO": :bool,
|
39
|
+
"BRIDGE_VIRTUALBOX": :string,
|
40
|
+
"BRIDGE_PARALLELS": :string,
|
41
|
+
"BRIDGE_VMWARE": :string,
|
42
|
+
"BRIDGE_KVM": :string,
|
43
|
+
"BRIDGE_HYPERV": :string
|
38
44
|
}.freeze
|
39
45
|
|
40
46
|
def self.validate(key, value)
|
@@ -136,6 +136,25 @@ module VagrantSubutai
|
|
136
136
|
return VagrantSubutai::Configs::Bazaar::BASE_DEV
|
137
137
|
end
|
138
138
|
end
|
139
|
+
|
140
|
+
def self.template_id(name, owner)
|
141
|
+
uri = URI.parse(url + Configs::Bazaar::V1::TEMPLATE.gsub('{TEMPLATE_NAME}', name))
|
142
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
143
|
+
https.use_ssl = true
|
144
|
+
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
145
|
+
https.read_timeout = 3600 # an hour
|
146
|
+
|
147
|
+
request = Net::HTTP::Get.new(uri.request_uri)
|
148
|
+
response = https.request(request)
|
149
|
+
|
150
|
+
case response
|
151
|
+
when Net::HTTPOK
|
152
|
+
response = JSON.parse(response.body)
|
153
|
+
response['id']
|
154
|
+
when Net::HTTPNotFound
|
155
|
+
Put.error "#{response.body} template name #{name}, owner #{owner}"
|
156
|
+
end
|
157
|
+
end
|
139
158
|
end
|
140
159
|
end
|
141
160
|
end
|
@@ -57,6 +57,7 @@ module VagrantSubutai
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
# Unregister Subutai Peer OS from Bazaar
|
60
61
|
def deregister(username, password, url)
|
61
62
|
if registered?(url)
|
62
63
|
username, password = get_input_token if username.nil? || password.nil?
|
@@ -71,7 +72,7 @@ module VagrantSubutai
|
|
71
72
|
case response
|
72
73
|
when Net::HTTPOK
|
73
74
|
Put.success response.body
|
74
|
-
Put.success "Successfully PeerOS
|
75
|
+
Put.success "Successfully PeerOS unregistered from Bazaar."
|
75
76
|
else
|
76
77
|
Put.error "Error: #{response.body}\n"
|
77
78
|
end
|
@@ -238,7 +239,7 @@ module VagrantSubutai
|
|
238
239
|
|
239
240
|
if SubutaiConfig.get(:SUBUTAI_PASSWORD).nil?
|
240
241
|
begin
|
241
|
-
Put.info "\
|
242
|
+
Put.info "\nSet PeerOS password: "
|
242
243
|
password = STDIN.noecho(&:gets).chomp
|
243
244
|
rescue Errno::EBADF
|
244
245
|
Put.warn "\nStdin doesn't support echo less input. Stdin can't hide password\n"
|
data/test/both_disk.yml
ADDED
data/test/disk_size.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
DISK_SIZE: 250
|
1
|
+
DISK_SIZE: 250
|
data/test/hyperv.yml
ADDED
data/test/kvm.yml
ADDED
data/test/parallels.yml
ADDED
@@ -26,4 +26,9 @@ LIBVIRT_HOST: '192.168.77.19'
|
|
26
26
|
LIBVIRT_PORT: 23
|
27
27
|
LIBVIRT_MACVTAP: 'true'
|
28
28
|
LIBVIRT_NO_BRIDGE: 'true'
|
29
|
-
BAZAAR_NO_AUTO: false
|
29
|
+
BAZAAR_NO_AUTO: false
|
30
|
+
BRIDGE_VIRTUALBOX: "bridge"
|
31
|
+
BRIDGE_PARALLELS: "bridge"
|
32
|
+
BRIDGE_VMWARE: "bridge"
|
33
|
+
BRIDGE_KVM: "bridge"
|
34
|
+
BRIDGE_HYPERV: "bridge"
|
data/test/subutai_config_test.rb
CHANGED
@@ -477,4 +477,74 @@ class SubutaiConfigTest < Test::Unit::TestCase
|
|
477
477
|
SubutaiConfig.reset
|
478
478
|
assert_equal(nil, SubutaiConfig.provider)
|
479
479
|
end
|
480
|
+
|
481
|
+
def test_disk_size
|
482
|
+
SubutaiConfig.cleanup!
|
483
|
+
#SubutaiConfig.load_config_file('')
|
484
|
+
|
485
|
+
assert_equal(nil, SubutaiConfig.disk_size)
|
486
|
+
assert_equal(nil, SubutaiConfig.get(:DISK_SIZE))
|
487
|
+
assert_equal(nil, SubutaiConfig.get(:SUBUTAI_DISK))
|
488
|
+
|
489
|
+
SubutaiConfig.override_conf_file('./test/subutai_disk.yml')
|
490
|
+
SubutaiConfig.load_config('up', :hyper_v)
|
491
|
+
|
492
|
+
assert_equal(123, SubutaiConfig.get(:SUBUTAI_DISK))
|
493
|
+
assert_equal(123, SubutaiConfig.get(:DISK_SIZE))
|
494
|
+
|
495
|
+
SubutaiConfig.cleanup!
|
496
|
+
SubutaiConfig.override_conf_file('./test/disk_size.yml')
|
497
|
+
SubutaiConfig.load_config('up', :hyper_v)
|
498
|
+
|
499
|
+
assert_equal(250, SubutaiConfig.get(:DISK_SIZE))
|
500
|
+
assert_equal(nil, SubutaiConfig.get(:SUBUTAI_DISK))
|
501
|
+
|
502
|
+
SubutaiConfig.cleanup!
|
503
|
+
SubutaiConfig.override_conf_file('./test/both_disk.yml')
|
504
|
+
SubutaiConfig.load_config('up', :hyper_v)
|
505
|
+
assert_equal(654, SubutaiConfig.get(:DISK_SIZE))
|
506
|
+
assert_equal(654, SubutaiConfig.get(:SUBUTAI_DISK))
|
507
|
+
|
508
|
+
SubutaiConfig.cleanup!
|
509
|
+
assert_nil(SubutaiConfig.disk_size)
|
510
|
+
assert_nil(SubutaiConfig.get(:DISK_SIZE))
|
511
|
+
assert_nil(SubutaiConfig.get(:SUBUTAI_DISK))
|
512
|
+
end
|
513
|
+
|
514
|
+
def test_bridge
|
515
|
+
SubutaiConfig.cleanup!
|
516
|
+
SubutaiConfig.override_conf_file('./test/hyperv.yml')
|
517
|
+
SubutaiConfig.load_config('up', :hyper_v)
|
518
|
+
assert_equal('hyperv', SubutaiConfig.get(:BRIDGE))
|
519
|
+
assert_equal('hyperv', SubutaiConfig.get(:BRIDGE_HYPERV))
|
520
|
+
assert_not_equal('global bridge', SubutaiConfig.get(:BRIDGE))
|
521
|
+
|
522
|
+
SubutaiConfig.cleanup!
|
523
|
+
SubutaiConfig.override_conf_file('./test/parallels.yml')
|
524
|
+
SubutaiConfig.load_config('up', :parallels)
|
525
|
+
assert_equal('parallels', SubutaiConfig.get(:BRIDGE))
|
526
|
+
assert_equal('parallels', SubutaiConfig.get(:BRIDGE_PARALLELS))
|
527
|
+
assert_not_equal('global bridge', SubutaiConfig.get(:BRIDGE))
|
528
|
+
|
529
|
+
SubutaiConfig.cleanup!
|
530
|
+
SubutaiConfig.override_conf_file('./test/vmware.yml')
|
531
|
+
SubutaiConfig.load_config('up', :vmware)
|
532
|
+
assert_equal('vmware', SubutaiConfig.get(:BRIDGE))
|
533
|
+
assert_equal('vmware', SubutaiConfig.get(:BRIDGE_VMWARE))
|
534
|
+
assert_not_equal('global bridge', SubutaiConfig.get(:BRIDGE))
|
535
|
+
|
536
|
+
SubutaiConfig.cleanup!
|
537
|
+
SubutaiConfig.override_conf_file('./test/kvm.yml')
|
538
|
+
SubutaiConfig.load_config('up', :libvirt)
|
539
|
+
assert_equal('kvm', SubutaiConfig.get(:BRIDGE))
|
540
|
+
assert_equal('kvm', SubutaiConfig.get(:BRIDGE_KVM))
|
541
|
+
assert_not_equal('global bridge', SubutaiConfig.get(:BRIDGE))
|
542
|
+
|
543
|
+
SubutaiConfig.cleanup!
|
544
|
+
SubutaiConfig.override_conf_file('./test/virtualbox.yml')
|
545
|
+
SubutaiConfig.load_config('up', :virtualbox)
|
546
|
+
assert_equal('virtualbox', SubutaiConfig.get(:BRIDGE))
|
547
|
+
assert_equal('virtualbox', SubutaiConfig.get(:BRIDGE_VIRTUALBOX))
|
548
|
+
assert_not_equal('global bridge', SubutaiConfig.get(:BRIDGE))
|
549
|
+
end
|
480
550
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
SUBUTAI_DISK: 123
|
data/test/subutai_disk_test.rb
CHANGED
@@ -163,6 +163,15 @@ class SubutaiDiskTest < Test::Unit::TestCase
|
|
163
163
|
assert_false(SubutaiDisk.hyperv_remove_disk)
|
164
164
|
end
|
165
165
|
|
166
|
+
def test_message
|
167
|
+
SubutaiConfig.cleanup!
|
168
|
+
SubutaiConfig.override_conf_file('./test/disk_create.yml')
|
169
|
+
SubutaiConfig.load_config('up', :virtualbox)
|
170
|
+
|
171
|
+
assert_equal("==> default: Disk size configured to 101GB, increasing 1GB default by 100GB.",
|
172
|
+
SubutaiDisk.message(SubutaiConfig.get_grow_by))
|
173
|
+
end
|
174
|
+
|
166
175
|
def test_save_path
|
167
176
|
SubutaiConfig.cleanup!
|
168
177
|
SubutaiConfig.override_conf_file('./test/disk_create.yml')
|
data/test/virtualbox.yml
ADDED
data/test/vmware.yml
ADDED
data/vagrant-subutai.gemspec
CHANGED
@@ -5,6 +5,7 @@ require_relative 'lib/vagrant-subutai/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'vagrant-subutai'
|
7
7
|
spec.version = VagrantSubutai::VERSION
|
8
|
+
spec.licenses = ['Apache-2.0']
|
8
9
|
spec.authors = ["Subutai"]
|
9
10
|
spec.email = "info@subutai.io"
|
10
11
|
spec.summary = ["Subutai CLI. Execute subutai commands outside the Vagrant box"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-subutai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subutai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,20 +84,26 @@ files:
|
|
84
84
|
- lib/vagrant-subutai/rest/subutai_console.rb
|
85
85
|
- lib/vagrant-subutai/subutai_commands.rb
|
86
86
|
- lib/vagrant-subutai/util/powershell.rb
|
87
|
+
- lib/vagrant-subutai/util/terminal.rb
|
87
88
|
- lib/vagrant-subutai/version.rb
|
88
89
|
- lib/vagrant_init.rb
|
89
90
|
- test/.rubocop.yml
|
90
91
|
- test/bad_snap_script.sh
|
92
|
+
- test/both_disk.yml
|
91
93
|
- test/disk_create.yml
|
92
94
|
- test/disk_size.yml
|
95
|
+
- test/hyperv.yml
|
96
|
+
- test/kvm.yml
|
93
97
|
- test/management_script.sh
|
94
98
|
- test/management_test_file.deb
|
99
|
+
- test/parallels.yml
|
95
100
|
- test/snap_script.sh
|
96
101
|
- test/subutai-validation-0.yml
|
97
102
|
- test/subutai0.yaml
|
98
103
|
- test/subutai1.yaml
|
99
104
|
- test/subutai2.yaml
|
100
105
|
- test/subutai_config_test.rb
|
106
|
+
- test/subutai_disk.yml
|
101
107
|
- test/subutai_disk_test.rb
|
102
108
|
- test/subutai_hooks_test.rb
|
103
109
|
- test/subutai_net_test.rb
|
@@ -105,10 +111,13 @@ files:
|
|
105
111
|
- test/vagrant-subutai-disk-grow.yml
|
106
112
|
- test/vagrant-subutai-disk-with-path.yml
|
107
113
|
- test/vagrant-subutai-disk-withoutpath.yml
|
114
|
+
- test/virtualbox.yml
|
115
|
+
- test/vmware.yml
|
108
116
|
- vagrant-subutai.gemspec
|
109
117
|
- vagrant-subutai.iml
|
110
118
|
homepage: https://subutai.io
|
111
|
-
licenses:
|
119
|
+
licenses:
|
120
|
+
- Apache-2.0
|
112
121
|
metadata:
|
113
122
|
source_code_uri: https://github.com/subutai-io/vagrant
|
114
123
|
post_install_message:
|
@@ -134,16 +143,21 @@ summary: '["Subutai CLI. Execute subutai commands outside the Vagrant box"]'
|
|
134
143
|
test_files:
|
135
144
|
- test/.rubocop.yml
|
136
145
|
- test/bad_snap_script.sh
|
146
|
+
- test/both_disk.yml
|
137
147
|
- test/disk_create.yml
|
138
148
|
- test/disk_size.yml
|
149
|
+
- test/hyperv.yml
|
150
|
+
- test/kvm.yml
|
139
151
|
- test/management_script.sh
|
140
152
|
- test/management_test_file.deb
|
153
|
+
- test/parallels.yml
|
141
154
|
- test/snap_script.sh
|
142
155
|
- test/subutai-validation-0.yml
|
143
156
|
- test/subutai0.yaml
|
144
157
|
- test/subutai1.yaml
|
145
158
|
- test/subutai2.yaml
|
146
159
|
- test/subutai_config_test.rb
|
160
|
+
- test/subutai_disk.yml
|
147
161
|
- test/subutai_disk_test.rb
|
148
162
|
- test/subutai_hooks_test.rb
|
149
163
|
- test/subutai_net_test.rb
|
@@ -151,3 +165,5 @@ test_files:
|
|
151
165
|
- test/vagrant-subutai-disk-grow.yml
|
152
166
|
- test/vagrant-subutai-disk-with-path.yml
|
153
167
|
- test/vagrant-subutai-disk-withoutpath.yml
|
168
|
+
- test/virtualbox.yml
|
169
|
+
- test/vmware.yml
|