knife-vcenter 2.0.2 → 2.0.3

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
  SHA256:
3
- metadata.gz: f5b64c8898d3f062d865d4d8ec26728caca8e5477cd60b4bb94812ddb6631167
4
- data.tar.gz: 76f8c566aa4eb7d027490f7d6d70fffd07a45a2944cc7d3d09b357be600e856f
3
+ metadata.gz: 75675e9853a832ee53cb558bf4271ce7ccfecb8125a2139df8a6d8c6f8f3d9da
4
+ data.tar.gz: 8fe144b8a77c4371a1bcc5319e7f7604968bbf7372340d598354b2855c7bc724
5
5
  SHA512:
6
- metadata.gz: cadd9cf60dab6043f285e45d19042de4e34409e71f904bcfe1791e3ed2a3e9619da7b2df5bf036eb2c1895dbc2de849cf421a40c685fff398c9f3add337072c0
7
- data.tar.gz: a742b7f205341ae1f6e3d3fd5702fa83215f5c5e588f2fdf6d660bce5becd5a7fe89972bc82aa4bc13249235fdf42cf92e916102d3bf8b9223ebc39a4f8d2cd2
6
+ metadata.gz: 517772b42e56bc2fd01a98b0575d96310f8d23ad3755311bb08ff027ca2a0dc4b6ba0e71c814c231afff2c4d150f3980aafcd9c58c52cd52b765e08895321c8d
7
+ data.tar.gz: dcefbc820fc16f8e99ede9a40b98c3cfe22b44481d445c05449035ff03af640f44cd39bbddc70352eec9446d88ac00f8c47cbdb3ed8c89c40f07b6fffc7fb0f7
@@ -21,6 +21,7 @@ require "chef/knife/cloud/exceptions"
21
21
  require "chef/knife/cloud/service"
22
22
  require "chef/knife/cloud/helpers"
23
23
  require "chef/knife/cloud/vcenter_service_helpers"
24
+ require "support/clone_vm"
24
25
  require "uri"
25
26
  require "json"
26
27
  require "ostruct"
@@ -86,7 +87,7 @@ class Chef
86
87
 
87
88
  # Some of ht eoptions need to be the ID of the component in VMware
88
89
  # Update these using the REST API so that they can be passed to the support library
89
- options[:targethost] = get_host(options[:targethost])
90
+ options[:targethost] = get_host(options[:targethost]).host
90
91
 
91
92
  options[:resource_pool] = get_resource_pool(options[:resource_pool])
92
93
 
@@ -99,7 +100,7 @@ class Chef
99
100
  end
100
101
 
101
102
  # Clone the machine using the support library
102
- clone_obj = Support::CloneVm.new(connection_options, options)
103
+ clone_obj = ::Support::CloneVm.new(connection_options, options)
103
104
  @ipaddress = clone_obj.clone
104
105
 
105
106
  # return an object from the restapi
@@ -112,7 +113,7 @@ class Chef
112
113
  folder: get_folder(options[:folder]),
113
114
  host: get_host(options[:targethost]).host,
114
115
  datastore: get_datastore(options[:datastore]),
115
- resource_pool: get_resourcepool(options[:resource_pool])
116
+ resource_pool: get_resource_pool(options[:resource_pool])
116
117
  )
117
118
 
118
119
  # Create the CreateSpec object
@@ -125,7 +126,7 @@ class Chef
125
126
  # Create the new machine
126
127
  begin
127
128
  create_model = VSphereAutomation::VCenter::VcenterVMCreate.new(spec: create_spec)
128
- vm = vm_api.create(create_model).value
129
+ vm_api.create(create_model).value
129
130
  rescue StandardError => e
130
131
  puts e.message
131
132
  end
@@ -213,8 +214,7 @@ class Chef
213
214
  # Gets the resource_pool
214
215
  #
215
216
  # @param [String] name is the resource_pool of the datacenter
216
- def get_resourcepool(name)
217
- ### verify
217
+ def get_resource_pool(name)
218
218
  rp_api = VSphereAutomation::VCenter::ResourcePoolApi.new(api_client)
219
219
 
220
220
  if name.nil?
@@ -65,7 +65,7 @@ class Chef
65
65
  :green
66
66
  when "SUSPENDED"
67
67
  :yellow
68
- end
68
+ end
69
69
 
70
70
  ui.color(status, status_color)
71
71
  end
@@ -60,7 +60,7 @@ class Chef
60
60
  :green
61
61
  when "SUSPENDED"
62
62
  :yellow
63
- end
63
+ end
64
64
 
65
65
  ui.color(status, status_color)
66
66
  end
@@ -20,5 +20,5 @@
20
20
  # Provisions machines in vCenter
21
21
  module KnifeVcenter
22
22
  # The version of this amazing Gem, you should <3 it.
23
- VERSION = "2.0.2"
23
+ VERSION = "2.0.3"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-vcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Partner Engineering
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-26 00:00:00.000000000 Z
11
+ date: 2019-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: knife-cloud