vagrant-subutai 1.1.6 → 1.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dcd1dde2de9a5a1d82686230743ce83bd9a4d41
4
- data.tar.gz: 20d0f8c8072d0bd5a18134066092ed1fe3597c62
3
+ metadata.gz: d47cbe837d15ae03bd88d70203fa6aa1e3e61b94
4
+ data.tar.gz: f707359708e7752f4798aa4067540ea7c5c72d15
5
5
  SHA512:
6
- metadata.gz: 8447c74b8d66642b3b86974c487808c380b34b86ef981b669463148e5ef2c7763a411271707b4dc5e16a01882cb2e7d9efd3f0973863878de5870a939ed105c6
7
- data.tar.gz: 9b714bd82b364da1ce2f46d47a2aed4710700e8f3851e813705e56238741f8c656dfef508e9185e446767e6bf05f20b483541dd26d10d054528b70fe417641b4
6
+ metadata.gz: 408eb1554b9bcd6281a0b061c5e466196e7f567a472e5f23052b6ac434ce991ae976ceb1d70041347586532221a243c44fe3ad119b61234693f6d2bc679ff9cf
7
+ data.tar.gz: d009a2052b2c5c46b1ae5f6c7aa4982243d47371510bacb8e40bc95fbd05759f8a5e8158d2db25b12722c67afdbcea1e690ec75b72aaaad2c46e771262e0230d
data/CHANGELOG.md CHANGED
@@ -41,5 +41,14 @@ FEATURES:
41
41
 
42
42
  ## 1.1.6 (April 2, 2018)
43
43
 
44
- BUG FIXES:
45
- - User configuration values case sensitive fixed
44
+ BUG FIXES:
45
+ - User configuration values case sensitive fixed
46
+
47
+ ## 1.1.7 (April 7, 2018)
48
+
49
+ BUG FIXES:
50
+ - null port forward value fixed
51
+
52
+ FEATURES:
53
+ - User configuration new keys added (LIBVIRT_USER, LIBVIRT_HOST, LIBVIRT_PORT, LIBVIRT_MACVTAP, LIBVIRT_NO_BRIDGE)
54
+
@@ -47,6 +47,11 @@ module SubutaiConfig
47
47
  BAZAAR_EMAIL
48
48
  BAZAAR_PASSWORD
49
49
  SUBUTAI_DISK_PATH
50
+ LIBVIRT_USER
51
+ LIBVIRT_HOST
52
+ LIBVIRT_PORT
53
+ LIBVIRT_MACVTAP
54
+ LIBVIRT_NO_BRIDGE
50
55
  ].freeze
51
56
 
52
57
  GENERATED_PARAMETERS = %i[
@@ -87,6 +92,8 @@ module SubutaiConfig
87
92
  SUBUTAI_NAME: 'My Peer', # PeerOS name
88
93
  SUBUTAI_SCOPE: 'Public', # PeerOS scope
89
94
  SUBUTAI_USERNAME: 'admin', # PeerOS default username
95
+ LIBVIRT_PORT: 22, # Libvirt kvm remote operation ssh port
96
+ LIBVIRT_MACVTAP: false, # Libvirt macvtap interface
90
97
 
91
98
  # Configuration parameters below have not been implemented
92
99
  SUBUTAI_SNAP: nil, # alternative snap to provision
@@ -312,7 +319,7 @@ module SubutaiConfig
312
319
  def self.do_network(provider)
313
320
  # set the next available console port if provisioning a peer in nat mode
314
321
  put(:_CONSOLE_PORT, find_port(get(:DESIRED_CONSOLE_PORT)), true) \
315
- if boolean?(:SUBUTAI_PEER) && get(:_CONSOLE_PORT).nil? && write?
322
+ if boolean?(:SUBUTAI_PEER) && get(:_CONSOLE_PORT).nil? && (write? || delete?)
316
323
 
317
324
  # set the SSH port if we are using bridged mode
318
325
  put(:_SSH_PORT, find_port(get(:DESIRED_SSH_PORT)), true) \
@@ -336,11 +343,6 @@ module SubutaiConfig
336
343
 
337
344
  # Load overrides from the environment, and generated configurations
338
345
  ENV.each do |key, value|
339
- if value == 'true'
340
- value = true
341
- elsif value == 'false'
342
- value = false
343
- end
344
346
  put(key.to_sym, value, false) if USER_PARAMETERS.include? key.to_sym
345
347
  end
346
348
  do_handlers
@@ -402,30 +404,34 @@ module SubutaiConfig
402
404
  end
403
405
 
404
406
  def self.get_latest_id_artifact(owner, artifact_name)
405
- begin
406
- url = url_of_cdn + '/raw/info?owner=' + owner + '&name=' + artifact_name
407
- uri = URI.parse(url)
408
- https = Net::HTTP.new(uri.host, uri.port)
409
- https.use_ssl = true
410
- https.verify_mode = OpenSSL::SSL::VERIFY_NONE
411
- https.read_timeout = 3600 # an hour
412
-
413
- request = Net::HTTP::Get.new(uri.request_uri)
414
- response = https.request(request)
415
-
416
- case response
417
- when Net::HTTPOK
418
- response = JSON.parse(response.body)
419
- response[0]['id']
420
- when Net::HTTPNotFound
421
- Put.error "#{response.body} template name #{name}, owner #{owner}"
407
+ if write?
408
+ begin
409
+ url = url_of_cdn + '/raw/info?owner=' + owner + '&name=' + artifact_name
410
+ uri = URI.parse(url)
411
+ https = Net::HTTP.new(uri.host, uri.port)
412
+ https.use_ssl = true
413
+ https.verify_mode = OpenSSL::SSL::VERIFY_NONE
414
+ https.read_timeout = 3600 # an hour
415
+
416
+ request = Net::HTTP::Get.new(uri.request_uri)
417
+ response = https.request(request)
418
+
419
+ case response
420
+ when Net::HTTPOK
421
+ response = JSON.parse(response.body)
422
+ response[0]['id']
423
+ when Net::HTTPNotFound
424
+ Put.error "#{response.body} template name #{name}, owner #{owner}"
425
+ end
426
+ rescue Errno::ECONNREFUSED
427
+ Put.error "cdn.subutai.io:8338 connection refused"
428
+ rescue Errno::EHOSTUNREACH
429
+ Put.error "cdn.subutai.io:8338 unreachable"
430
+ rescue => e
431
+ Put.error e
422
432
  end
423
- rescue Errno::ECONNREFUSED
424
- Put.error "cdn.subutai.io:8338 connection refused"
425
- rescue Errno::EHOSTUNREACH
426
- Put.error "cdn.subutai.io:8338 unreachable"
427
- rescue => e
428
- Put.error e
433
+ else
434
+ "" # send empty id. DON'T REMOVE
429
435
  end
430
436
  end
431
437
  end
@@ -32,7 +32,7 @@ PROVIDER_MAC_PREFIXES = {
32
32
  :virtualbox => '080027',
33
33
  :libvirt => '525400',
34
34
  :vmware_fusion => '______',
35
- :vmware => '______',
35
+ :vmware => '005056',
36
36
  :parallels => '______',
37
37
  :hyper_v => '______'
38
38
  }
@@ -127,8 +127,8 @@ def random_mac_addr(provider)
127
127
  # PROVIDER_MAC_PREFIXES[:vmware_fusion] + 3.times.map { '%02x' % rand(0..255) }.join
128
128
  raise "Unsupported provider #{provider}"
129
129
  when :vmware
130
- # PROVIDER_MAC_PREFIXES[:vmware] + 3.times.map { '%02x' % rand(0..255) }.join
131
- raise "Unsupported provider #{provider}"
130
+ PROVIDER_MAC_PREFIXES[:vmware] + 3.times.map { '%02x' % rand(0..255) }.join
131
+ #raise "Unsupported provider #{provider}"
132
132
  when :parallels
133
133
  # PROVIDER_MAC_PREFIXES[:parallels] + 3.times.map { '%02x' % rand(0..255) }.join
134
134
  raise "Unsupported provider #{provider}"
@@ -1,3 +1,3 @@
1
1
  module VagrantSubutai
2
- VERSION = '1.1.6'
2
+ VERSION = '1.1.7'
3
3
  end
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: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Subutai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-02 00:00:00.000000000 Z
11
+ date: 2018-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler