knife-vsphere 1.2.26 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/lib/chef/knife/base_vsphere_command.rb +5 -0
  3. data/lib/chef/knife/customization_helper.rb +11 -0
  4. data/lib/chef/knife/vsphere_cpu_ratio.rb +3 -0
  5. data/lib/chef/knife/vsphere_customization_list.rb +3 -0
  6. data/lib/chef/knife/vsphere_datastore_file.rb +3 -0
  7. data/lib/chef/knife/vsphere_datastore_list.rb +3 -0
  8. data/lib/chef/knife/vsphere_datastore_maxfree.rb +3 -0
  9. data/lib/chef/knife/vsphere_folder_list.rb +6 -0
  10. data/lib/chef/knife/vsphere_hosts_list.rb +3 -0
  11. data/lib/chef/knife/vsphere_pool_query.rb +3 -0
  12. data/lib/chef/knife/vsphere_template_list.rb +3 -0
  13. data/lib/chef/knife/vsphere_vlan_create.rb +3 -0
  14. data/lib/chef/knife/vsphere_vlan_list.rb +3 -0
  15. data/lib/chef/knife/vsphere_vm_cdrom.rb +4 -0
  16. data/lib/chef/knife/vsphere_vm_clone.rb +8 -4
  17. data/lib/chef/knife/vsphere_vm_config.rb +3 -0
  18. data/lib/chef/knife/vsphere_vm_delete.rb +7 -0
  19. data/lib/chef/knife/vsphere_vm_disk_list.rb +3 -0
  20. data/lib/chef/knife/vsphere_vm_execute.rb +3 -0
  21. data/lib/chef/knife/vsphere_vm_find.rb +91 -66
  22. data/lib/chef/knife/vsphere_vm_markastemplate.rb +3 -0
  23. data/lib/chef/knife/vsphere_vm_move.rb +7 -0
  24. data/lib/chef/knife/vsphere_vm_net.rb +5 -0
  25. data/lib/chef/knife/vsphere_vm_network_list.rb +3 -0
  26. data/lib/chef/knife/vsphere_vm_network_set.rb +3 -0
  27. data/lib/chef/knife/vsphere_vm_property_get.rb +3 -0
  28. data/lib/chef/knife/vsphere_vm_property_set.rb +3 -0
  29. data/lib/chef/knife/vsphere_vm_query.rb +3 -0
  30. data/lib/chef/knife/vsphere_vm_show.rb +3 -0
  31. data/lib/chef/knife/vsphere_vm_state.rb +4 -0
  32. data/lib/chef/knife/vsphere_vm_toolsconfig.rb +3 -0
  33. data/lib/chef/knife/vsphere_vm_vmdk_add.rb +3 -0
  34. data/lib/chef/knife/vsphere_vm_vnc_set.rb +3 -0
  35. data/lib/chef/knife/vsphere_vm_wait_sysprep.rb +2 -0
  36. data/lib/knife-vsphere/version.rb +3 -1
  37. metadata +59 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 060509d9604ac932b4808fc732e6fba41602b1c6
4
- data.tar.gz: 44f9be0f47b5a38e67916cb1b0dcb87fb94c67e5
3
+ metadata.gz: 1590f83d24583a54afdd8e0d20e6cebdbe68a16c
4
+ data.tar.gz: 1ad17a8abad640718689b93a16879734c27f8250
5
5
  SHA512:
6
- metadata.gz: a1d09af5a783b1b6a06f0bbfef2078187a9785a3397fca2cf6578d5d9d330ec397335716361db47c8502185eeaed146598a51533407ec939ba39c7152670934b
7
- data.tar.gz: 37f379b2b0a787489e83785b4d761844d523fecd713e1112e69901b21e56fef0854ced1a53b686875c9aeea5b60fffeeae31c904b32febcda41f807dad2da8f3
6
+ metadata.gz: 6a220f46264fb88086e93bc61195e3c093048604f07eabeadbe4cabb78201dbc4671df728aa7372c3363ec176c0266b3fc267fb47065d5fd68eeedda1f0cdd61
7
+ data.tar.gz: 344665daa9c9849c83d8ea1b2fa6e1872ca487424c691462f6b89ae7f53e2a7c51d74cfb6c77fc876c20b937bde297b3bb5695d4182c20e8186e4a98ca3460a1
@@ -9,13 +9,18 @@ require 'rbvmomi'
9
9
  require 'base64'
10
10
  require 'filesize'
11
11
 
12
+ # Power state on
12
13
  PS_ON ||= 'poweredOn'.freeze
14
+ # Power state off
13
15
  PS_OFF ||= 'poweredOff'.freeze
16
+ # Power state suspended
14
17
  PS_SUSPENDED ||= 'suspended'.freeze
15
18
 
16
19
  # Base class for vsphere knife commands
17
20
  class Chef
21
+ # Base class for knife
18
22
  class Knife
23
+ # Main knife vsphere that more or less everything in this gem is built off of
19
24
  class BaseVsphereCommand < Knife
20
25
  deps do
21
26
  require 'chef/knife/bootstrap'
@@ -5,7 +5,14 @@
5
5
 
6
6
  require 'rbvmomi'
7
7
 
8
+ # The Customization helper for sysprep
8
9
  module CustomizationHelper
10
+ # Wait for sysprep
11
+ #
12
+ # @param [Object] vm The VM object to connect to
13
+ # @param [Object] vim_connection The vim_connection object settings to connect for
14
+ # @param [String] timeout A string to set the timeout
15
+ # @param [String] sleep_time A string to set the a sleep_time
9
16
  def self.wait_for_sysprep(vm, vim_connection, timeout, sleep_time)
10
17
  vem = vim_connection.serviceContent.eventManager
11
18
 
@@ -31,6 +38,10 @@ module CustomizationHelper
31
38
  end
32
39
  end
33
40
 
41
+ # Confirm that cspec is done
42
+ #
43
+ # @param [Object] vm The VM object to connect to
44
+ # @param [Object] vem The vem TODO
34
45
  def self.query_customization_succeeded(vm, vem)
35
46
  vem.QueryEvents(filter:
36
47
  RbVmomi::VIM::EventFilterSpec(entity:
@@ -1,11 +1,14 @@
1
1
  require 'chef/knife'
2
2
  require 'chef/knife/base_vsphere_command'
3
3
 
4
+ # VsphereCpuratio extends the BaseVspherecommand
4
5
  class Chef::Knife::VsphereCpuRatio < Chef::Knife::BaseVsphereCommand
5
6
  banner 'knife vsphere cpu ratio [CLUSTER] [HOST]'
6
7
 
7
8
  common_options
8
9
 
10
+ # The main run method for cpu_ratio
11
+ #
9
12
  def run
10
13
  $stdout.sync = true
11
14
 
@@ -6,11 +6,14 @@ require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
7
 
8
8
  # Lists all customization specifications in the configured datacenter
9
+ # VsphereCustomizationlist extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereCustomizationList < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere customization list'
11
12
 
12
13
  common_options
13
14
 
15
+ # The main run method for customization_list
16
+ #
14
17
  def run
15
18
  $stdout.sync = true
16
19
 
@@ -3,6 +3,7 @@ require 'chef/knife'
3
3
  require 'chef/knife/base_vsphere_command'
4
4
 
5
5
  # Upload or download a file from a datastore
6
+ # VsphereDatastoreFile extends the BaseVspherecommand
6
7
  class Chef::Knife::VsphereDatastoreFile < Chef::Knife::BaseVsphereCommand
7
8
  banner 'knife vsphere datastore file'
8
9
 
@@ -28,6 +29,8 @@ class Chef::Knife::VsphereDatastoreFile < Chef::Knife::BaseVsphereCommand
28
29
  short: '-D',
29
30
  description: 'Download remote file to local'
30
31
 
32
+ # Main run method for datastore_file
33
+ #
31
34
  def run
32
35
  $stdout.sync = true
33
36
 
@@ -19,6 +19,7 @@ require 'chef/knife'
19
19
  require 'chef/knife/base_vsphere_command'
20
20
 
21
21
  # Lists all known data stores in datacenter with sizes
22
+ # VsphereDatastorelist extends the BaseVspherecommand
22
23
  class Chef::Knife::VsphereDatastoreList < Chef::Knife::BaseVsphereCommand
23
24
  banner 'knife vsphere datastore list'
24
25
 
@@ -33,6 +34,8 @@ class Chef::Knife::VsphereDatastoreList < Chef::Knife::BaseVsphereCommand
33
34
  long: '--pool pool',
34
35
  description: 'Target pool'
35
36
 
37
+ # The main run method for datastore_list
38
+ #
36
39
  def run
37
40
  $stdout.sync = true
38
41
 
@@ -19,6 +19,7 @@ require 'chef/knife'
19
19
  require 'chef/knife/base_vsphere_command'
20
20
 
21
21
  # Gets the data store with the most free space in datacenter
22
+ # VsphereDatastoreMaxfree extends the BaseVspherecommand
22
23
  class Chef::Knife::VsphereDatastoreMaxfree < Chef::Knife::BaseVsphereCommand
23
24
  banner 'knife vsphere datastore maxfree'
24
25
 
@@ -38,6 +39,8 @@ class Chef::Knife::VsphereDatastoreMaxfree < Chef::Knife::BaseVsphereCommand
38
39
 
39
40
  common_options
40
41
 
42
+ # The main run method for datastore_maxfree
43
+ #
41
44
  def run
42
45
  $stdout.sync = true
43
46
  if get_config(:vlan) && get_config(:pool)
@@ -6,11 +6,16 @@ require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
7
 
8
8
  # Lists all vm folders
9
+ # VsphereFolderlist extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereFolderList < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere folder list'
11
12
 
12
13
  common_options
13
14
 
15
+ # Walks though the folders to find something
16
+ #
17
+ # param [String] folder that you should go through
18
+ # param [String] indent_level for the output to indent
14
19
  def traverse_folders(folder, indent_level)
15
20
  puts "#{' ' * indent_level} #{ui.color('Folder', :cyan)}: " + folder.name
16
21
 
@@ -20,6 +25,7 @@ class Chef::Knife::VsphereFolderList < Chef::Knife::BaseVsphereCommand
20
25
  end
21
26
  end
22
27
 
28
+ # Main run method for folder_list
23
29
  def run
24
30
  vim_connection
25
31
  base_folder = find_folder(get_config(:folder))
@@ -4,6 +4,7 @@ require 'rbvmomi'
4
4
  require 'netaddr'
5
5
 
6
6
  # list hosts belonging to pool
7
+ # VsphereHostslist extends the BaseVspherecommand
7
8
  class Chef::Knife::VsphereHostsList < Chef::Knife::BaseVsphereCommand
8
9
  banner 'knife vsphere hosts list'
9
10
 
@@ -13,6 +14,8 @@ class Chef::Knife::VsphereHostsList < Chef::Knife::BaseVsphereCommand
13
14
  short: '-h',
14
15
  description: 'Target pool'
15
16
 
17
+ # The main run method for hosts_list
18
+ #
16
19
  def run
17
20
  vim_connection
18
21
  dc = datacenter
@@ -3,11 +3,14 @@ require 'chef/knife/base_vsphere_command'
3
3
  require 'rbvmomi'
4
4
  require 'netaddr'
5
5
 
6
+ # VspherePoolQuery extends the BaseVsphereCommand
6
7
  class Chef::Knife::VspherePoolQuery < Chef::Knife::BaseVsphereCommand
7
8
  banner "knife vsphere pool query POOLNAME QUERY. See \"http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.ComputeResource.html\" for allowed QUERY values."
8
9
 
9
10
  common_options
10
11
 
12
+ # The main run method for poll_query
13
+ #
11
14
  def run
12
15
  args = ARGV
13
16
  args[2] = 'show'
@@ -7,11 +7,14 @@ require 'chef/knife'
7
7
  require 'chef/knife/base_vsphere_command'
8
8
 
9
9
  # Lists all known VM templates in the configured datacenter
10
+ # VsphereTemplatelist extends the BaseVspherecommand
10
11
  class Chef::Knife::VsphereTemplateList < Chef::Knife::BaseVsphereCommand
11
12
  banner 'knife vsphere template list'
12
13
 
13
14
  common_options
14
15
 
16
+ # The main run method for template_list
17
+ #
15
18
  def run
16
19
  $stdout.sync = true
17
20
  $stderr.sync = true
@@ -2,6 +2,7 @@ require 'chef/knife'
2
2
  require 'chef/knife/base_vsphere_command'
3
3
 
4
4
  # Lists all known data stores in datacenter with sizes
5
+ # VsphereVlanCreate extends BaseVspherecommand
5
6
  class Chef::Knife::VsphereVlanCreate < Chef::Knife::BaseVsphereCommand
6
7
  banner 'knife vsphere vlan create NAME VID'
7
8
 
@@ -11,6 +12,8 @@ class Chef::Knife::VsphereVlanCreate < Chef::Knife::BaseVsphereCommand
11
12
  long: '--switch DVSNAME',
12
13
  description: 'The DVSwitch that will hold this VLAN'
13
14
 
15
+ # The main run method for vlan_create
16
+ #
14
17
  def run
15
18
  $stdout.sync = true
16
19
 
@@ -18,11 +18,14 @@ require 'chef/knife'
18
18
  require 'chef/knife/base_vsphere_command'
19
19
 
20
20
  # Lists all known data stores in datacenter with sizes
21
+ # VsphereVlanlist extends the BaseVspherecommand
21
22
  class Chef::Knife::VsphereVlanList < Chef::Knife::BaseVsphereCommand
22
23
  banner 'knife vsphere vlan list'
23
24
 
24
25
  common_options
25
26
 
27
+ # The main run method for vlan_list
28
+ #
26
29
  def run
27
30
  $stdout.sync = true
28
31
 
@@ -5,9 +5,11 @@ require 'chef/knife/base_vsphere_command'
5
5
  require 'rbvmomi'
6
6
  require 'netaddr'
7
7
 
8
+ # VsphereVmCdrom extends the BaseVspherecommand
8
9
  class Chef::Knife::VsphereVmCdrom < Chef::Knife::BaseVsphereCommand
9
10
  banner 'knife vsphere vm cdrom VMNAME (options)'
10
11
 
12
+ # The empty device name.
11
13
  EMPTY_DEVICE_NAME = ''.freeze
12
14
 
13
15
  common_options
@@ -44,6 +46,8 @@ class Chef::Knife::VsphereVmCdrom < Chef::Knife::BaseVsphereCommand
44
46
  long: '--recursive',
45
47
  description: 'Search all folders'
46
48
 
49
+ # The main run method for vm_cdrom
50
+ #
47
51
  def run
48
52
  $stdout.sync = true
49
53
 
@@ -15,10 +15,13 @@ require 'chef/knife/winrm_base'
15
15
  require 'chef/knife/customization_helper'
16
16
  require 'ipaddr'
17
17
 
18
+ # VsphereVmClone extends the BaseVspherecommand
18
19
  class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
19
20
  banner 'knife vsphere vm clone VMNAME (options)'
20
21
 
22
+ # A AUTO_MAC for NIC?
21
23
  AUTO_MAC = 'auto'
24
+ # A NO IP for you to use!
22
25
  NO_IPS = ''
23
26
 
24
27
  include Chef::Knife::WinrmBase
@@ -389,8 +392,6 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
389
392
 
390
393
  return unless get_config(:bootstrap)
391
394
 
392
- connect_host = guest_address(vm)
393
- Chef::Log.debug("Connect Host for Bootstrap: #{connect_host}")
394
395
  connect_port = get_config(:ssh_port)
395
396
  protocol = get_config(:bootstrap_protocol)
396
397
  if windows?(src_vm.config)
@@ -403,10 +404,14 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
403
404
  CustomizationHelper.wait_for_sysprep(vm, vim, Integer(get_config(:sysprep_timeout)), 10)
404
405
  puts 'Customization Complete'
405
406
  end
407
+ connect_host = guest_address(vm)
408
+ Chef::Log.debug("Connect Host for winrm Bootstrap: #{connect_host}")
406
409
  wait_for_access(connect_host, connect_port, protocol)
407
410
  ssh_override_winrm
408
411
  bootstrap_for_windows_node.run
409
412
  else
413
+ connect_host = guest_address(vm)
414
+ Chef::Log.debug("Connect Host for SSH Bootstrap: #{connect_host}")
410
415
  protocol ||= 'ssh'
411
416
  wait_for_access(connect_host, connect_port, protocol)
412
417
  ssh_override_winrm
@@ -687,7 +692,7 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
687
692
  )
688
693
  license_file_print_data = RbVmomi::VIM.CustomizationLicenseFilePrintData(
689
694
  autoMode: cust_spec.identity.licenseFilePrintData.autoMode
690
- )
695
+ ) if cust_spec.identity.licenseFilePrintData # optional param
691
696
 
692
697
  user_data = RbVmomi::VIM.CustomizationUserData(
693
698
  fullName: cust_spec.identity.userData.fullName,
@@ -770,7 +775,6 @@ class Chef::Knife::VsphereVmClone < Chef::Knife::BaseVsphereCommand
770
775
  end
771
776
 
772
777
  # Retrieves a CustomizationSpecItem that matches the supplied name
773
- # @param vim [Connection] VI Connection to use
774
778
  # @param name [String] name of customization
775
779
  # @return [RbVmomi::VIM::CustomizationSpecItem]
776
780
  def find_customization(name)
@@ -6,6 +6,7 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # VsphereVMconfig extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmConfig < Chef::Knife::BaseVsphereCommand
10
11
  banner "knife vsphere vm config VMNAME PROPERTY VALUE.
11
12
  See \"http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.vm.ConfigSpec.html\"
@@ -13,6 +14,8 @@ class Chef::Knife::VsphereVmConfig < Chef::Knife::BaseVsphereCommand
13
14
 
14
15
  common_options
15
16
 
17
+ # The main run method in vm_config
18
+ #
16
19
  def run
17
20
  $stdout.sync = true
18
21
  vmname = @name_args[0]
@@ -12,6 +12,7 @@ require 'chef/node'
12
12
  require 'chef/api_client'
13
13
 
14
14
  # Delete a virtual machine from vCenter
15
+ # VsphereVmDelete extends the BaseVspherecommand
15
16
  class Chef::Knife::VsphereVmDelete < Chef::Knife::BaseVsphereCommand
16
17
  banner 'knife vsphere vm delete VMNAME (options)'
17
18
 
@@ -33,12 +34,18 @@ class Chef::Knife::VsphereVmDelete < Chef::Knife::BaseVsphereCommand
33
34
  # flag (and also explicitly confirming the server destruction!)
34
35
  # the user is already making their intent known. It is not
35
36
  # necessary to make them confirm two more times.
37
+ #
38
+ # @param [Object] itemClass The class object
39
+ # @param [String] name The name of the VM that you need to delete
40
+ # @param [String] type_name The type_name of the thing that you need? TODO
36
41
  def destroy_item(itemClass, name, type_name)
37
42
  object = itemClass.load(name)
38
43
  object.destroy
39
44
  puts "Deleted #{type_name} #{name}"
40
45
  end
41
46
 
47
+ # The main run method from vm_delete
48
+ #
42
49
  def run
43
50
  $stdout.sync = true
44
51
 
@@ -2,11 +2,14 @@ require 'chef/knife'
2
2
  require 'chef/knife/base_vsphere_command'
3
3
 
4
4
  # List the disks attached to a VM
5
+ # VsphereVmdisklist extends the BaseVspherecommand
5
6
  class Chef::Knife::VsphereVmDiskList < Chef::Knife::BaseVsphereCommand
6
7
  banner 'knife vsphere vm disk list VMNAME'
7
8
 
8
9
  common_options
9
10
 
11
+ # The main run method for vm_disk_list
12
+ #
10
13
  def run
11
14
  $stdout.sync = true
12
15
 
@@ -6,6 +6,7 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # VsphereVMexecute extends the Basevspherecommand
9
10
  class Chef::Knife::VsphereVmExecute < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm execute VMNAME COMMAND ARGS'
11
12
 
@@ -25,6 +26,8 @@ class Chef::Knife::VsphereVmExecute < Chef::Knife::BaseVsphereCommand
25
26
 
26
27
  common_options
27
28
 
29
+ # The main run method for vm_execute
30
+ #
28
31
  def run
29
32
  $stdout.sync = true
30
33
  vmname = @name_args[0]
@@ -49,7 +49,11 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
49
49
 
50
50
  option :ips,
51
51
  long: '--ips',
52
- description: 'Show all ips, with networks'
52
+ description: 'Show all ips, with networks - DEPRECATED use --networks'
53
+
54
+ option :networks,
55
+ long: '--networks',
56
+ description: 'Show all networks with their IPs'
53
57
 
54
58
  option :soff,
55
59
  long: '--powered-off',
@@ -73,7 +77,7 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
73
77
 
74
78
  option :hostname,
75
79
  long: '--hostname',
76
- description: 'show hostname'
80
+ description: 'show hostname of the guest'
77
81
 
78
82
  option :host_name,
79
83
  long: '--host_name',
@@ -101,20 +105,25 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
101
105
 
102
106
  $stdout.sync = true # smoother output from print
103
107
 
104
- def traverse_folders_for_pool_clustercompute(folder, poolname)
108
+ # Find the given pool or compute resource
109
+ # @param folder [RbVmomi::VIM::Folder] the folder from which to start the search, most likely dc.hostFolder
110
+ # @param objectname [String] name of the object (pool or cluster/compute) to find
111
+ # @return [RbVmomi::VIM::ClusterComputeResource, RbVmomi::VIM::ComputeResource, RbVmomi::VIM::ResourcePool]
112
+ def traverse_folders_for_pool_clustercompute(folder, objectname)
105
113
  children = find_all_in_folder(folder, RbVmomi::VIM::ManagedObject)
106
114
  children.each do |child|
107
115
  next unless child.class == RbVmomi::VIM::ClusterComputeResource || child.class == RbVmomi::VIM::ComputeResource || child.class == RbVmomi::VIM::ResourcePool
108
- if child.name == poolname
116
+ if child.name == objectname
109
117
  return child
110
118
  elsif child.class == RbVmomi::VIM::Folder || child.class == RbVmomi::VIM::ComputeResource || child.class == RbVmomi::VIM::ClusterComputeResource || child.class == RbVmomi::VIM::ResourcePool
111
- pool = traverse_folders_for_pool_clustercompute(child, poolname)
119
+ pool = traverse_folders_for_pool_clustercompute(child, objectname)
112
120
  end
113
121
  return pool if pool
114
122
  end
115
123
  false
116
124
  end
117
125
 
126
+ # Main entry point to the command
118
127
  def run
119
128
  poolname = config[:pool]
120
129
  if poolname.nil?
@@ -122,6 +131,8 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
122
131
  fatal_exit('You must specify a resource pool or cluster name (see knife vsphere pool list)')
123
132
  end
124
133
 
134
+ abort '--ips has been removed. Please use --networks' if get_config(:ips)
135
+
125
136
  vim_connection
126
137
  dc = datacenter
127
138
  folder = dc.hostFolder
@@ -130,121 +141,135 @@ class Chef::Knife::VsphereVmFind < Chef::Knife::BaseVsphereCommand
130
141
  else
131
142
  traverse_folders_for_pool_clustercompute(folder, poolname) || abort("Pool #{poolname} not found")
132
143
  end
133
- vm = if pool.class == RbVmomi::VIM::ResourcePool
134
- pool.vm
135
- else
136
- pool.resourcePool.vm
137
- end
138
-
139
- return if vm.nil?
140
- vm.each do |vmc|
141
- state = case vmc.runtime.powerState
142
- when PS_ON
143
- ui.color('on', :green)
144
- when PS_OFF
145
- ui.color('off', :red)
146
- when PS_SUSPENDED
147
- ui.color('suspended', :yellow)
144
+ vm_list = if pool.class == RbVmomi::VIM::ResourcePool
145
+ pool.vm
146
+ else
147
+ pool.resourcePool.vm
148
148
  end
149
149
 
150
+ return if vm_list.nil?
151
+
152
+ output = vm_list.map do |vm|
153
+ thisvm = {}
150
154
  if get_config(:matchname)
151
- next unless vmc.name.include? config[:matchname]
155
+ next unless vm.name.include? config[:matchname]
152
156
  end
153
157
 
154
158
  if get_config(:matchtools)
155
- next unless vmc.guest.toolsStatus == config[:matchtools]
159
+ next unless vm.guest.toolsStatus == config[:matchtools]
156
160
  end
157
161
 
158
- next if get_config(:soff) && (vmc.runtime.powerState == PS_ON)
162
+ power_state = vm.runtime.powerState
163
+
164
+ thisvm['state'] = case power_state
165
+ when PS_ON
166
+ 'on'
167
+ when PS_OFF
168
+ 'off'
169
+ when PS_SUSPENDED
170
+ 'suspended'
171
+ end
172
+
159
173
 
160
- next if get_config(:son) && (vmc.runtime.powerState == PS_OFF)
174
+ next if get_config(:soff) && (power_state == PS_ON)
175
+
176
+ next if get_config(:son) && (power_state == PS_OFF)
161
177
 
162
178
  if get_config(:matchip)
163
- if !vmc.guest.ipAddress.nil? && vmc.guest.ipAddress != ''
164
- next unless vmc.guest.ipAddress.include? config[:matchip]
179
+ if !vm.guest.ipAddress.nil? && vm.guest.ipAddress != ''
180
+ next unless vm.guest.ipAddress.include? config[:matchip]
165
181
  else
166
182
  next
167
183
  end
168
184
  end
169
185
 
170
- unless vmc.guest.guestFullName.nil?
186
+ unless vm.guest.guestFullName.nil?
171
187
  if get_config(:matchos)
172
- next unless vmc.guest.guestFullName.include? config[:matchos]
188
+ next unless vm.guest.guestFullName.include? config[:matchos]
173
189
  end
174
190
  end
175
191
 
176
- print "#{ui.color('VM Name:', :cyan)} #{vmc.name}\t"
192
+ thisvm['name'] = vm.name
177
193
  if get_config(:hostname)
178
- print "#{ui.color('Hostname:', :cyan)} #{vmc.guest.hostName}\t"
194
+ thisvm['hostname'] = vm.guest.hostName
179
195
  end
180
196
  if get_config(:host_name)
181
- print "#{ui.color('Host_name:', :cyan)} #{vmc.summary.runtime.host.name}\t"
197
+ # TODO: Why vm.summary.runtime vs vm.runtime?
198
+ thisvm['host_name'] = vm.summary.runtime.host.name
182
199
  end
183
200
 
184
201
  if get_config(:full_path)
185
- actualname = ''
186
- vmcp = vmc
187
- while !vmcp.parent.nil? && vmcp.parent.name != 'vm'
188
- actualname.concat("#{vmcp.parent.name}/")
189
- vmcp = vmcp.parent
190
- end
191
- print ui.color('Folder:', :cyan)
192
- print '"'
193
- print actualname.split('/').reverse.join('/')
194
- print "\"\t"
202
+ fullpath = ''
203
+ iterator = vm
195
204
 
205
+ while iterator = iterator.parent
206
+ break if iterator.name == 'vm'
207
+ fullpath = fullpath.empty? ? iterator.name : "#{iterator.name}/#{fullpath}"
208
+ end
209
+ thisvm['folder'] = fullpath
196
210
  else
197
- print "#{ui.color('Folder', :cyan)}: #{vmc.parent.name}\t"
211
+ thisvm['folder'] = vm.parent.name
198
212
  end
199
213
 
200
214
  if get_config(:ip)
201
- print "#{ui.color('IP:', :cyan)} #{vmc.guest.ipAddress}\t"
215
+ thisvm['ip'] = vm.guest.ipAddress
202
216
  end
203
- if get_config(:ips)
217
+
218
+ if get_config(:networks)
204
219
  ipregex = /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/
205
- networks = vmc.guest.net.map { |net| "#{net.network}:" + net.ipConfig.ipAddress.select { |i| i.ipAddress[ipregex] }[0].ipAddress }
206
- print "#{ui.color('IPS:', :cyan)} #{networks.join(',')}\t"
220
+ thisvm['networks'] = vm.guest.net.map do |net|
221
+ firstip = net.ipConfig.ipAddress.first { |i| i.ipAddress[ipregex] }
222
+
223
+ { 'name' => net.network,
224
+ 'ip' => firstip.ipAddress,
225
+ 'prefix' => firstip.prefixLength
226
+ }
227
+ end
207
228
  end
229
+
208
230
  if get_config(:os)
209
- print "#{ui.color('OS:', :cyan)} #{vmc.guest.guestFullName}\t"
231
+ thisvm['os'] = vm.guest.guestFullName
210
232
  end
233
+
211
234
  if get_config(:ram)
212
- print "#{ui.color('RAM:', :cyan)} #{vmc.summary.config.memorySizeMB}\t"
235
+ thisvm['ram'] = vm.summary.config.memorySizeMB
213
236
  end
237
+
214
238
  if get_config(:cpu)
215
- print "#{ui.color('CPU:', :cyan)} #{vmc.summary.config.numCpu}\t"
239
+ thisvm['cpu'] = vm.summary.config.numCpu
216
240
  end
241
+
217
242
  if get_config(:alarms)
218
- print "#{ui.color('Alarms:', :cyan)} #{vmc.summary.overallStatus}\t"
243
+ thisvm['alarms'] = vm.summary.overallStatus
219
244
  end
220
- print "#{ui.color('State:', :cyan)} #{state}\t"
245
+
221
246
  if get_config(:tools)
222
- print "#{ui.color('Tools:', :cyan)} #{vmc.guest.toolsStatus}\t"
247
+ thisvm['tools'] = vm.guest.toolsStatus
223
248
  end
224
249
 
225
250
  if get_config(:os_disk)
226
- print ui.color('OS Disks:', :cyan)
227
- vmc.guest.disk.each do |disc|
228
- print "#{disc.diskPath} #{disc.capacity / 1024 / 1024}MB Free:#{disc.freeSpace / 1024 / 1024}MB |"
251
+ thisvm['disks'] = vm.guest.disk.map do |disk|
252
+ { 'name' => disk.diskPath,
253
+ 'capacity' => disk.capacity / 1024 / 1024,
254
+ 'free' => disk.freeSpace / 1024 / 1024
255
+ }
229
256
  end
230
257
  end
231
258
 
232
259
  if get_config(:esx_disk)
233
- print ui.color('ESX Disks:', :cyan)
234
- vmc.layout.disk.each do |dsc|
235
- print "#{dsc.diskFile} | "
236
- end
260
+ # TODO: https://www.vmware.com/support/developer/converter-sdk/conv55_apireference/vim.VirtualMachine.html#field_detail says this is deprecated
261
+ thisvm['esx_disks'] = vm.layout.disk.map(&:diskFile)
237
262
  end
238
263
 
239
264
  if get_config(:snapshots)
240
- unless vmc.snapshot.nil?
241
- print ui.color('Snapshots:', :cyan)
242
- vmc.snapshot.rootSnapshotList.each do |snap|
243
- print " #{snap.name}"
244
- end
245
- end
265
+ thisvm['snapshots'] = if vm.snapshot
266
+ vm.snapshot.rootSnapshotList.map(&:name)
267
+ else
268
+ []
269
+ end
246
270
  end
247
- puts
271
+ thisvm
248
272
  end
273
+ ui.output(output.compact)
249
274
  end
250
275
  end
@@ -13,6 +13,7 @@ require 'rbvmomi'
13
13
  # Clone an existing template into a new VM, optionally applying a customization specification.
14
14
  # usage:
15
15
  # knife vsphere vm markastemplate MyVM --folder /templates
16
+ # Vspherevmmarkastemplate extends the Basevspherecommand
16
17
  class Chef::Knife::VsphereVmMarkastemplate < Chef::Knife::BaseVsphereCommand
17
18
  banner 'knife vsphere vm markastemplate VMNAME'
18
19
 
@@ -23,6 +24,8 @@ class Chef::Knife::VsphereVmMarkastemplate < Chef::Knife::BaseVsphereCommand
23
24
  description: 'The folder which contains the VM',
24
25
  default: ''
25
26
 
27
+ # The main run method for vm_markastemplate
28
+ #
26
29
  def run
27
30
  $stdout.sync = true
28
31
 
@@ -6,6 +6,7 @@ require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
7
 
8
8
  # Lists all known virtual machines in the configured datacenter
9
+ # VsphereVmMove extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmMove < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm move'
11
12
 
@@ -35,6 +36,8 @@ class Chef::Knife::VsphereVmMove < Chef::Knife::BaseVsphereCommand
35
36
  boolean: true
36
37
 
37
38
  # Convert VM
39
+ #
40
+ # @param [Object] vm The VM object to convert the VM
38
41
  def convert_vm(vm)
39
42
  dc = datacenter
40
43
  hosts = find_all_in_folder(dc.hostFolder, RbVmomi::VIM::ComputeResource)
@@ -56,6 +59,8 @@ class Chef::Knife::VsphereVmMove < Chef::Knife::BaseVsphereCommand
56
59
  end
57
60
 
58
61
  # Move VM
62
+ #
63
+ # @param [Object] vm The VM object to convert the VM
59
64
  def move_vm(vm)
60
65
  dest_name = config[:dest_name] || vm.name
61
66
  dest_folder = config[:dest_folder].nil? ? (vm.parent) : (find_folder(get_config(:dest_folder)))
@@ -64,6 +69,8 @@ class Chef::Knife::VsphereVmMove < Chef::Knife::BaseVsphereCommand
64
69
  dest_folder.MoveIntoFolder_Task(list: [vm]).wait_for_completion unless vm.parent == dest_folder
65
70
  end
66
71
 
72
+ # The main run method for vm_move
73
+ #
67
74
  def run
68
75
  $stdout.sync = true
69
76
  vmname = @name_args[0]
@@ -4,10 +4,15 @@
4
4
  #
5
5
  require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
+
7
8
  # Switch VM networking state up/down (on all network interfaces)
9
+ # VsphereVmNet extends the BaseVspherecommand
8
10
  class Chef::Knife::VsphereVmNet < Chef::Knife::BaseVsphereCommand
9
11
  banner 'knife vsphere vm net STATE VMNAME'
10
12
  common_options
13
+
14
+ # The main run method for vm_net
15
+ #
11
16
  def run
12
17
  $stdout.sync = true
13
18
  vmname = @name_args[1]
@@ -7,11 +7,14 @@ require 'chef/knife/base_vsphere_command'
7
7
  require 'rbvmomi'
8
8
  require 'netaddr'
9
9
 
10
+ # VsphereVmNetworklist extends the BaseVspherecommand
10
11
  class Chef::Knife::VsphereVmNetworkList < Chef::Knife::BaseVsphereCommand
11
12
  banner 'knife vsphere vm network list VMNAME'
12
13
 
13
14
  common_options
14
15
 
16
+ # The main run method for vm_network_list
17
+ #
15
18
  def run
16
19
  $stdout.sync = true
17
20
 
@@ -6,6 +6,7 @@ require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
7
 
8
8
  # Changes network on a certain VM
9
+ # VsphereVmNetworkSet extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmNetworkSet < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm network set VMNAME NETWORKNAME'
11
12
 
@@ -16,6 +17,8 @@ class Chef::Knife::VsphereVmNetworkSet < Chef::Knife::BaseVsphereCommand
16
17
  description: 'Network interface to use when multiple NICs are present on the VM. (0,1..)',
17
18
  default: 0
18
19
 
20
+ # The main run method for vm_network_set
21
+ #
19
22
  def run
20
23
  $stdout.sync = true
21
24
  vmname = @name_args[0]
@@ -6,11 +6,14 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # VsphereVMPropertyget extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmPropertyGet < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm property get VMNAME PROPERTY. Gets a vApp Property on VMNAME.'
11
12
 
12
13
  common_options
13
14
 
15
+ # The main run method for vm_property_get
16
+ #
14
17
  def run
15
18
  $stdout.sync = true
16
19
  vmname = @name_args[0]
@@ -6,6 +6,7 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # VsphereVMPropertySet extends Basevspherecommand
9
10
  class Chef::Knife::VsphereVmPropertySet < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm property set VMNAME PROPERTY VALUE. Sets a vApp Property on VMNAME.'
11
12
 
@@ -15,6 +16,8 @@ class Chef::Knife::VsphereVmPropertySet < Chef::Knife::BaseVsphereCommand
15
16
  long: '--ovf-environment-transport STRING',
16
17
  description: 'Comma delimited string. Configures the transports to use for properties. Supported values are: iso and com.vmware.guestInfo.'
17
18
 
19
+ # The main run method for vm_property_set
20
+ #
18
21
  def run
19
22
  $stdout.sync = true
20
23
  vmname = @name_args[0]
@@ -3,11 +3,14 @@ require 'chef/knife/base_vsphere_command'
3
3
  require 'rbvmomi'
4
4
  require 'netaddr'
5
5
 
6
+ # VsphereVmQuery extends the BaseVspherecommand
6
7
  class Chef::Knife::VsphereVmQuery < Chef::Knife::BaseVsphereCommand
7
8
  banner "knife vsphere vm query VMNAME QUERY. See \"http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.VirtualMachine.html\" for allowed QUERY values."
8
9
 
9
10
  common_options
10
11
 
12
+ # The main run method for vm_query
13
+ #
11
14
  def run
12
15
  args = ARGV
13
16
  args[2] = 'show'
@@ -6,11 +6,14 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # VsphereVmShow extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmShow < Chef::Knife::BaseVsphereCommand
10
11
  banner "knife vsphere vm show VMNAME QUERY. See \"http://pubs.vmware.com/vi3/sdk/ReferenceGuide/vim.VirtualMachine.html\" for allowed QUERY values."
11
12
 
12
13
  common_options
13
14
 
15
+ # The main run method for vm_show
16
+ #
14
17
  def run
15
18
  $stdout.sync = true
16
19
  vmname = @name_args[0]
@@ -9,7 +9,9 @@ require 'rbvmomi'
9
9
  require 'netaddr'
10
10
 
11
11
  # Manage power state of a virtual machine
12
+ # VsphereVmState extends the BaseVspherecommand
12
13
  class Chef::Knife::VsphereVmState < Chef::Knife::BaseVsphereCommand
14
+ # The Different power states that vSphere reports
13
15
  POWER_STATES = {
14
16
  PS_ON => 'powered on',
15
17
  PS_OFF => 'powered off',
@@ -40,6 +42,8 @@ class Chef::Knife::VsphereVmState < Chef::Knife::BaseVsphereCommand
40
42
  long: '--recursive',
41
43
  description: 'Search all folders'
42
44
 
45
+ # The main run method for vm_state
46
+ #
43
47
  def run
44
48
  $stdout.sync = true
45
49
 
@@ -6,6 +6,7 @@ require 'chef/knife/base_vsphere_command'
6
6
  require 'rbvmomi'
7
7
  require 'netaddr'
8
8
 
9
+ # Vspherevmtoolsconfig extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmToolsconfig < Chef::Knife::BaseVsphereCommand
10
11
  banner "knife vsphere vm toolsconfig PROPERTY VALUE.
11
12
  See \"https://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.vm.ToolsConfigInfo.html\"
@@ -17,6 +18,8 @@ class Chef::Knife::VsphereVmToolsconfig < Chef::Knife::BaseVsphereCommand
17
18
  description: 'Allow empty string'
18
19
  common_options
19
20
 
21
+ # The main run method for vm_toolsconfig
22
+ #
20
23
  def run
21
24
  $stdout.sync = true
22
25
  vmname = @name_args[0]
@@ -6,6 +6,7 @@ require 'chef/knife'
6
6
  require 'chef/knife/base_vsphere_command'
7
7
 
8
8
  # Add a new disk to a virtual machine
9
+ # VsphereVmvmdkadd extends the BaseVspherecommand
9
10
  class Chef::Knife::VsphereVmVmdkAdd < Chef::Knife::BaseVsphereCommand
10
11
  banner 'knife vsphere vm vmdk add VMNAME DISK_GB'
11
12
 
@@ -21,6 +22,8 @@ class Chef::Knife::VsphereVmVmdkAdd < Chef::Knife::BaseVsphereCommand
21
22
  long: '--target-lun NAME',
22
23
  description: 'name of target LUN'
23
24
 
25
+ # The main run method for vm_vmdk_add
26
+ #
24
27
  def run
25
28
  $stdout.sync = true
26
29
 
@@ -7,6 +7,7 @@ require 'chef/knife/base_vsphere_command'
7
7
  require 'rbvmomi'
8
8
  require 'netaddr'
9
9
 
10
+ # Main class VsphereVMvncset extends the BaseVspherecommand
10
11
  class Chef::Knife::VsphereVmVncset < Chef::Knife::BaseVsphereCommand
11
12
  banner 'knife vsphere vm vncset VMNAME COMMAND ARGS'
12
13
 
@@ -22,6 +23,8 @@ class Chef::Knife::VsphereVmVncset < Chef::Knife::BaseVsphereCommand
22
23
 
23
24
  common_options
24
25
 
26
+ # The main run method for vm_vnc_set
27
+ #
25
28
  def run
26
29
  $stdout.sync = true
27
30
  vmname = @name_args[0]
@@ -30,6 +30,8 @@ class Chef::Knife::VsphereVmWaitSysprep < Chef::Knife::BaseVsphereCommand
30
30
  description: 'The timeout in seconds before aborting. Default: 300 seconds',
31
31
  default: 300
32
32
 
33
+ # The main run method for vm_wait_sysprep.
34
+ #
33
35
  def run
34
36
  $stdout.sync = true
35
37
 
@@ -1,3 +1,5 @@
1
+ # The main knife-vsphere module.
1
2
  module KnifeVsphere
2
- VERSION = '1.2.26'
3
+ # The version of this gem.
4
+ VERSION = '2.0.0'
3
5
  end
metadata CHANGED
@@ -1,125 +1,153 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-vsphere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.26
4
+ version: 2.0.0
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-04-20 00:00:00.000000000 Z
11
+ date: 2017-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: filesize
14
+ name: knife-windows
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.1
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: netaddr
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rbvmomi
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.8'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.8'
55
55
  - !ruby/object:Gem::Dependency
56
- name: knife-windows
56
+ name: filesize
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.0'
61
+ version: 0.1.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.0'
68
+ version: 0.1.1
69
+ - !ruby/object:Gem::Dependency
70
+ name: byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: chef
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - '>='
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: 0.10.0
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - '>='
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: 0.10.0
83
97
  - !ruby/object:Gem::Dependency
84
- name: rspec
98
+ name: rake
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - '>='
101
+ - - ">="
88
102
  - !ruby/object:Gem::Version
89
103
  version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - '>='
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: rake
112
+ name: rb-readline
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - '>='
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - '>='
122
+ - - ">="
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
- name: byebug
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
113
141
  requirement: !ruby/object:Gem::Requirement
114
142
  requirements:
115
- - - '>='
143
+ - - ">="
116
144
  - !ruby/object:Gem::Version
117
145
  version: '0'
118
146
  type: :development
119
147
  prerelease: false
120
148
  version_requirements: !ruby/object:Gem::Requirement
121
149
  requirements:
122
- - - '>='
150
+ - - ">="
123
151
  - !ruby/object:Gem::Version
124
152
  version: '0'
125
153
  description: VMware vSphere Support for Chef's Knife Command
@@ -174,7 +202,7 @@ files:
174
202
  - lib/chef/knife/vsphere_vm_vnc_set.rb
175
203
  - lib/chef/knife/vsphere_vm_wait_sysprep.rb
176
204
  - lib/knife-vsphere/version.rb
177
- homepage: http://github.com/ezrapagel/knife-vsphere
205
+ homepage: http://github.com/chef-partners/knife-vsphere
178
206
  licenses:
179
207
  - Apache
180
208
  metadata: {}
@@ -184,17 +212,17 @@ require_paths:
184
212
  - lib
185
213
  required_ruby_version: !ruby/object:Gem::Requirement
186
214
  requirements:
187
- - - '>='
215
+ - - ">="
188
216
  - !ruby/object:Gem::Version
189
217
  version: '0'
190
218
  required_rubygems_version: !ruby/object:Gem::Requirement
191
219
  requirements:
192
- - - '>='
220
+ - - ">="
193
221
  - !ruby/object:Gem::Version
194
222
  version: '0'
195
223
  requirements: []
196
224
  rubyforge_project:
197
- rubygems_version: 2.0.14.1
225
+ rubygems_version: 2.5.1
198
226
  signing_key:
199
227
  specification_version: 4
200
228
  summary: vSphere Support for Knife