inprovise-vbox 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTZhY2I4Y2U2N2Q1MTI0YzgxOWE4ODIwNDlhMDM2YmJmNTM1NGRkYg==
4
+ MDc3MTU3NDE3N2ZjYjZmYzQzNWIxZTlkOGVkZTNiZWE0MjIyZGZjZA==
5
5
  data.tar.gz: !binary |-
6
- YzEyMmM3ZTFjNTdhMjBjYTI1N2UwZGQwY2Y1NzlmMTFhNzBkMDgxZA==
6
+ MzNiNDZhNzQ5NjI1OTMyNDY5MTA2MzhiYmM2YzBmZTY5YTQwYjk4Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWY0NzFjZjlkYjFlYzE3MDYxOGZiZGMzN2NiNjMwM2I0Y2QxN2RjNTM3YTFl
10
- NWM3OTA2NjE1MTdmY2U5YTdhMDI2YjFhYjk4N2E4NTdlMjBmODE3YmUyYjU4
11
- YzljNTQzNmYwOGE3MTBkMWM0NGQ2OWQ3ODE4MDE2MmUwMGE1MzU=
9
+ MTA2ZTk2MGFiNWMzMGFmZWEyYzI5YzE5NmQ2ZDA1NzUwZDg2ZGI1NTM4YTA0
10
+ NzA2YzdhYWQxNzQ5ZDFjNzc3OTIzYmI2MTQ0ZGU1MDQyNDE2YTE5NmEzZGY2
11
+ ZjViZjA5MjMwNGY3YTE0MzZkN2NhODFiYjNiODIwY2RiNDQ3ZDM=
12
12
  data.tar.gz: !binary |-
13
- YzBjMTFhOGRjMmNkNWIzYTQxMmYyMmQ2YjA1NDBkYzVhNWE1MDlhYWJkMGJl
14
- OTk0ZDkzOTExNGU0OTEzMzVkYTNmNzgzNTZhOGVlOTAyYzMxM2M5NmJjYTgx
15
- Njk2ZDM3MzI5NzIwMGRmMzliMWRlZWM2NmIyMDUxZDE5ODE3ZDY=
13
+ ZmEwNjUxMzdiYjk0OTVjYjljMjhmYjQwZmY3NDAxMmJiZjk0ODFjZjFhYWMz
14
+ NDFkMGZlYjcxODQyYjE1YjYzOWY0N2I3ZWNkNzJlMDk2NzBmYzk0NDYyZDI0
15
+ MmY1M2U5MjkwYmYzMmFlMThiODk5YzI1YzMyOGMzM2QzNGY4ZDY=
@@ -206,11 +206,19 @@ module Inprovise::VBox
206
206
  vbox_opts.delete(:no_node)
207
207
  vbox_opts.delete(:no_sniff)
208
208
  node_opts = vbox_opts.delete(:node) || {}
209
+ node_group = [node_opts.delete(:group)].flatten.compact
209
210
  node_opts[:host] ||= addr
210
211
  node_opts[:user] ||= vbs.vbox_user(self)
211
212
  node_opts[:vbox] = vbox_opts
212
213
  node = Inprovise::Infrastructure::Node.new(vmname, node_opts)
213
214
  Inprovise::Infrastructure.save
215
+ node_group.each do |grpnm|
216
+ grp = Inprovise::Infrastructure.find(grpnm)
217
+ raise ArgumentError, "Invalid Group name '#{grpnm}'." unless grp.nil? || Inprovise::Infrastructure::Group === grp
218
+ grp = Inprovise::Infrastructure::Group.new(grpnm) unless grp
219
+ node.add_to(grp)
220
+ end
221
+ Inprovise::Infrastructure.save unless node_group.empty?
214
222
  unless vbs.vbox_no_sniff(self)
215
223
  # retry on (comm) failure
216
224
  Inprovise::Sniffer.run_sniffers_for(node) rescue Inprovise::Sniffer.run_sniffers_for(node)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Inprovise; module VBox
7
7
 
8
- VERSION = '0.2.6'
8
+ VERSION = '0.2.7'
9
9
 
10
10
  end; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inprovise-vbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inprovise