knife-vsphere 1.2.24 → 1.2.25

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: f337711fde662bcc17ea7c1823901e43b83d621a
4
- data.tar.gz: c3ee25e483b12d539d2bfd4c73325745290fc7a9
3
+ metadata.gz: 1c7890777dfc302edf4752175fba9188c8b71b8a
4
+ data.tar.gz: 04f9c9a57bc4bdb19c7475f312764a1f39e03733
5
5
  SHA512:
6
- metadata.gz: 6bcb197a0f9624ddf6d044b6a4cff1adda83a09159765c7658b5c4f2ae024d54c208308b4bc378d37d37c0c539403a04389bb49510ecd9fc8e5c05aa55f835d3
7
- data.tar.gz: 80ef8bba00005ead0e01fd1956e1b501bc7018218cb3297cb6e5836da2baa8e0483b7ea21f34a6865983d30e290e0f13bbf1da61c7f98daad17c2719cfa0cafa
6
+ metadata.gz: 8c5ae461b014eed7ba88ff2614e3b09251f4b4655fa1ed63f3aa03dd9c783317b0af59957e87ed62b989f1d69df72c997cfc0135df112a0b1fe166db5bebf013
7
+ data.tar.gz: 85a25e046311e8608966dc5d6b2a958f171639267e63df2ffb623f81500665a7074ef2c076b1a524959c89144b39151be90155fb7c8ec437b9c71f1d9066f8d4
@@ -232,6 +232,7 @@ class Chef
232
232
 
233
233
  if dvswitch && dvswitch != 'auto'
234
234
  return networks.find do |f|
235
+ next unless f.respond_to?(:config)
235
236
  sw = f.config.distributedVirtualSwitch
236
237
  sw.uuid == dvswitch || sw.name == dvswitch
237
238
  end
@@ -71,6 +71,10 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
71
71
  long: '--hostname',
72
72
  description: 'show hostname'
73
73
 
74
+ option :host_name,
75
+ long: '--host_name',
76
+ description: 'show name of the VMs host'
77
+
74
78
  option :os,
75
79
  long: '--os',
76
80
  description: 'show os details'
@@ -167,6 +171,9 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
167
171
  if get_config(:hostname)
168
172
  print "#{ui.color('Hostname:', :cyan)} #{vmc.guest.hostName}\t"
169
173
  end
174
+ if get_config(:host_name)
175
+ print "#{ui.color('Host_name:', :cyan)} #{vmc.summary.runtime.host.name}\t"
176
+ end
170
177
 
171
178
  if get_config(:full_path)
172
179
  actualname = ''
@@ -54,7 +54,7 @@ class Chef::Knife::VsphereVmNetworkAdd < Chef::Knife::BaseVsphereCommand
54
54
  )
55
55
  summary = network.name
56
56
  backing = RbVmomi::VIM.VirtualEthernetCardDistributedVirtualPortBackingInfo(port: port)
57
- when VIM::Network
57
+ when RbVmomi::VIM::Network
58
58
  summary = network.name
59
59
  backing = RbVmomi::VIM.VirtualEthernetCardNetworkBackingInfo(deviceName: network.name)
60
60
  else fail
@@ -1,3 +1,3 @@
1
1
  module KnifeVsphere
2
- VERSION = '1.2.24'
2
+ VERSION = '1.2.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.24
4
+ version: 1.2.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ezra Pagel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: filesize