vagrant-vmware-esxi 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1dcbc0face9e5a7ebbfcfd749b15d83b1f42b2ea
4
- data.tar.gz: dddf553b0781d7f60907b6d5c474d8b22778907f
3
+ metadata.gz: fa5be0972c6fc2aa80766d013513c1757f2eb820
4
+ data.tar.gz: 021ae3179d9224e2e4ed4f022aaf3fa0e9859fda
5
5
  SHA512:
6
- metadata.gz: 1bd9c80da6a1f44c3cfb70bdca1f35c05d0c5f0caa81d4fbcbbacb55913c087027203b3f6c29f4a282b4a73bb225de467b8a724d4f64c89075873102a8eac3fd
7
- data.tar.gz: f9c74b17cc5d35fb3be15c03039a56d793fe611ce477d4f457ba88a659aabf013ff3b2845e30ae5b68b03e0900417c95599584e363088e65bf5669c5f5268de1
6
+ metadata.gz: 56f0fd113b96775f1d12d62cbb4e2e92ad785a6e2e8f9a33545e9b9d58365e38940a4760b6f6852bb95b76d6d8b585ca5a3fb8bfea6fe855910d43f6caeedcfc
7
+ data.tar.gz: 4bc844a4097b5d24aea8f54cac7ee8f745e00efbaf8bb648356a958d11ada85ee67035f25c532f619fd4e785d67cbad472632e3a11833ceedde89846836b5b33
data/README.md CHANGED
@@ -284,6 +284,8 @@ Known issues with vmware_esxi
284
284
 
285
285
  Version History
286
286
  ---------------
287
+ * 2.4.1 Change/Fix output of 'vagrant address' when a single machine is configured or specifed.
288
+
287
289
  * 2.4.0 Add support for 'vagrant address', output ip address of guest.
288
290
  Fix, exit 1 on vagrant up if unable to reach "running" state.
289
291
  Some code cleanup.
@@ -81,7 +81,13 @@ module VagrantPlugins
81
81
  def self.action_address
82
82
  Vagrant::Action::Builder.new.tap do |b|
83
83
  b.use SetESXiPassword
84
- b.use Address
84
+ b.use Address, false
85
+ end
86
+ end
87
+ def self.action_address_multi
88
+ Vagrant::Action::Builder.new.tap do |b|
89
+ b.use SetESXiPassword
90
+ b.use Address, true
85
91
  end
86
92
  end
87
93
 
@@ -6,9 +6,10 @@ module VagrantPlugins
6
6
  module Action
7
7
  # This action will print the IP address
8
8
  class Address
9
- def initialize(app, _env)
9
+ def initialize(app, _env, multi)
10
10
  @app = app
11
11
  @logger = Log4r::Logger.new('vagrant_vmware_esxi::action::address')
12
+ @multi = multi
12
13
  end
13
14
 
14
15
  def call(env)
@@ -23,14 +24,17 @@ module VagrantPlugins
23
24
  machine = env[:machine]
24
25
  config = env[:machine].provider_config
25
26
 
26
- # return IP if it's known.
27
+ # return nil if machine is down.
27
28
  return nil if machine.state.id != :running
28
29
 
29
30
  ssh_info = machine.ssh_info
30
31
  return nil if !ssh_info
31
32
 
32
- env[:ui].info ssh_info[:host]
33
-
33
+ if @multi == true
34
+ env[:ui].info ssh_info[:host]
35
+ else
36
+ puts ssh_info[:host]
37
+ end
34
38
  end
35
39
  end
36
40
  end
@@ -1,3 +1,5 @@
1
+ require 'optparse'
2
+
1
3
  module VagrantPlugins
2
4
  module ESXi
3
5
 
@@ -6,8 +8,14 @@ module VagrantPlugins
6
8
  "Snapshot additional information."
7
9
  end
8
10
  def execute
9
- with_target_vms(nil, :provider => "vmware_esxi") do |vm|
10
- vm.action(:snapshot_info)
11
+ opts = OptionParser.new do |o|
12
+ o.banner = "Usage: vagrant snapshot-info [name]"
13
+ end
14
+
15
+ argv = parse_options(opts)
16
+
17
+ with_target_vms(argv) do |machine|
18
+ machine.action(:snapshot_info)
11
19
  end
12
20
  end
13
21
  end
@@ -17,12 +25,29 @@ module VagrantPlugins
17
25
  "outputs the IP address of a guest."
18
26
  end
19
27
  def execute
20
- with_target_vms(nil, :provider => "vmware_esxi") do |vm|
21
- vm.action(:address)
28
+ opts = OptionParser.new do |o|
29
+ o.banner = "Usage: vagrant address [name]"
30
+ end
31
+
32
+ argv = parse_options(opts)
33
+
34
+ # Count total number of vms to print the IP
35
+ totalvms = 0
36
+ with_target_vms(argv) do
37
+ totalvms += 1
38
+ end
39
+
40
+ if argv.length == 1 or totalvms == 1
41
+ with_target_vms(argv, {:single_target=>true}) do |machine|
42
+ machine.action(:address)
43
+ end
44
+ else
45
+ with_target_vms(argv) do |machine|
46
+ machine.action(:address_multi)
47
+ end
22
48
  end
23
49
  end
24
50
  end
25
51
 
26
-
27
52
  end
28
53
  end
@@ -1,7 +1,7 @@
1
1
  # VERSION
2
2
  module VagrantPlugins
3
3
  module ESXi
4
- VERSION = '2.4.0'
4
+ VERSION = '2.4.1'
5
5
  $vagrant_vmware_esxi_version = VERSION
6
6
  end
7
7
  end
@@ -3,7 +3,7 @@ require File.expand_path('../lib/vagrant-vmware-esxi/version', __FILE__)
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'vagrant-vmware-esxi'
5
5
  s.version = VagrantPlugins::ESXi::VERSION
6
- s.date = '2018-07-23'
6
+ s.date = '2018-08-02'
7
7
  s.summary = 'Vagrant ESXi provider plugin'
8
8
  s.description = 'A Vagrant plugin that adds a VMware ESXi provider support'
9
9
  s.authors = ['Jonathan Senkerik']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vmware-esxi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Senkerik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-23 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n