chef-provisioning-vsphere 0.10.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +7 -3
- data/.rubocop.yml +8 -0
- data/.rubocop_todo.yml +143 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +111 -0
- data/Gemfile +2 -3
- data/LICENSE +19 -19
- data/LICENSE-Rally +20 -20
- data/README.md +29 -19
- data/Rakefile +34 -22
- data/chef-provisioning-vsphere.gemspec +9 -7
- data/contribution-notice +7 -7
- data/lib/chef/provisioning/driver_init/vsphere.rb +4 -3
- data/lib/chef/provisioning/vsphere_driver.rb +16 -14
- data/lib/chef/provisioning/vsphere_driver/clone_spec_builder.rb +68 -53
- data/lib/chef/provisioning/vsphere_driver/driver.rb +96 -70
- data/lib/chef/provisioning/vsphere_driver/version.rb +2 -1
- data/lib/chef/provisioning/vsphere_driver/vsphere_helpers.rb +98 -99
- data/lib/chef/provisioning/vsphere_driver/vsphere_url.rb +46 -45
- data/lib/kitchen/driver/vsphere.rb +27 -27
- data/spec/integration_tests/.gitignore +1 -1
- data/spec/integration_tests/vsphere_driver_spec.rb +50 -51
- data/spec/unit_tests/VsphereDriver_spec.rb +133 -132
- data/spec/unit_tests/VsphereUrl_spec.rb +67 -66
- data/spec/unit_tests/clone_spec_builder_spec.rb +162 -161
- data/spec/unit_tests/support/fake_action_handler.rb +6 -7
- data/spec/unit_tests/support/vsphere_helper_stub.rb +51 -52
- metadata +29 -10
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module ChefProvisioningVsphereStubs
|
3
|
+
class FakeActionHandler < Chef::Provisioning::ActionHandler
|
4
|
+
def puts(out); end
|
5
|
+
end
|
6
|
+
end
|
@@ -1,52 +1,51 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
end
|
5
|
-
|
6
|
-
def network_device_changes(
|
7
|
-
[
|
8
|
-
[RbVmomi::VIM::VirtualDeviceConfigSpec.new],
|
9
|
-
[RbVmomi::VIM::VirtualDeviceConfigSpec.new]
|
10
|
-
]
|
11
|
-
end
|
12
|
-
|
13
|
-
def find_host(
|
14
|
-
RbVmomi::VIM::HostSystem.new
|
15
|
-
end
|
16
|
-
|
17
|
-
def find_pool(
|
18
|
-
RbVmomi::VIM::ResourcePool.new(nil, nil)
|
19
|
-
end
|
20
|
-
|
21
|
-
def find_datastore(
|
22
|
-
RbVmomi::VIM::Datastore.new
|
23
|
-
end
|
24
|
-
|
25
|
-
def find_customization_spec(
|
26
|
-
RbVmomi::VIM::CustomizationSpec.new
|
27
|
-
end
|
28
|
-
|
29
|
-
def create_delta_disk(vm_template)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module ChefProvisioningVsphereStubs
|
3
|
+
class VsphereHelperStub < ChefProvisioningVsphere::VsphereHelper
|
4
|
+
def initialize; end
|
5
|
+
|
6
|
+
def network_device_changes(_action_handler, _vm_template, _options)
|
7
|
+
[
|
8
|
+
[RbVmomi::VIM::VirtualDeviceConfigSpec.new],
|
9
|
+
[RbVmomi::VIM::VirtualDeviceConfigSpec.new]
|
10
|
+
]
|
11
|
+
end
|
12
|
+
|
13
|
+
def find_host(_host_name)
|
14
|
+
RbVmomi::VIM::HostSystem.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def find_pool(_pool_name)
|
18
|
+
RbVmomi::VIM::ResourcePool.new(nil, nil)
|
19
|
+
end
|
20
|
+
|
21
|
+
def find_datastore(_datastore_name)
|
22
|
+
RbVmomi::VIM::Datastore.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def find_customization_spec(_options)
|
26
|
+
RbVmomi::VIM::CustomizationSpec.new
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_delta_disk(vm_template); end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
module RbVmomi
|
34
|
+
class VIM::HostSystem
|
35
|
+
attr_reader :parent
|
36
|
+
|
37
|
+
def parent
|
38
|
+
@parent ||= RbVmomi::VIM::ComputeResource.new
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module RbVmomi
|
44
|
+
class VIM::ComputeResource
|
45
|
+
attr_reader :resourcePool
|
46
|
+
|
47
|
+
def resourcePool
|
48
|
+
@resourcePool ||= RbVmomi::VIM::ResourcePool.new(nil, nil)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-provisioning-vsphere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- CenturyLink Cloud
|
8
|
+
- JJ Asghar
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2017-04-17 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rbvmomi
|
@@ -50,6 +51,20 @@ dependencies:
|
|
50
51
|
- - ">="
|
51
52
|
- !ruby/object:Gem::Version
|
52
53
|
version: 2.0.1
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: github_changelog_generator
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :runtime
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
53
68
|
- !ruby/object:Gem::Dependency
|
54
69
|
name: rspec
|
55
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,27 +94,31 @@ dependencies:
|
|
79
94
|
- !ruby/object:Gem::Version
|
80
95
|
version: '0'
|
81
96
|
- !ruby/object:Gem::Dependency
|
82
|
-
name:
|
97
|
+
name: chefstyle
|
83
98
|
requirement: !ruby/object:Gem::Requirement
|
84
99
|
requirements:
|
85
|
-
- - "
|
100
|
+
- - ">="
|
86
101
|
- !ruby/object:Gem::Version
|
87
|
-
version: '0
|
102
|
+
version: '0'
|
88
103
|
type: :development
|
89
104
|
prerelease: false
|
90
105
|
version_requirements: !ruby/object:Gem::Requirement
|
91
106
|
requirements:
|
92
|
-
- - "
|
107
|
+
- - ">="
|
93
108
|
- !ruby/object:Gem::Version
|
94
|
-
version: '0
|
109
|
+
version: '0'
|
95
110
|
description: Provisioner for creating vSphere VM instances in Chef Provisioning.
|
96
|
-
email:
|
111
|
+
email: jj@chef.io
|
97
112
|
executables: []
|
98
113
|
extensions: []
|
99
114
|
extra_rdoc_files:
|
100
115
|
- README.md
|
101
116
|
files:
|
102
117
|
- ".gitignore"
|
118
|
+
- ".rubocop.yml"
|
119
|
+
- ".rubocop_todo.yml"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CHANGELOG.md
|
103
122
|
- Gemfile
|
104
123
|
- LICENSE
|
105
124
|
- LICENSE-Rally
|
@@ -122,7 +141,7 @@ files:
|
|
122
141
|
- spec/unit_tests/clone_spec_builder_spec.rb
|
123
142
|
- spec/unit_tests/support/fake_action_handler.rb
|
124
143
|
- spec/unit_tests/support/vsphere_helper_stub.rb
|
125
|
-
homepage: https://github.com/
|
144
|
+
homepage: https://github.com/chef-partners/chef-provisioning-vsphere
|
126
145
|
licenses:
|
127
146
|
- MIT
|
128
147
|
metadata: {}
|
@@ -142,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
161
|
version: '0'
|
143
162
|
requirements: []
|
144
163
|
rubyforge_project:
|
145
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.5.1
|
146
165
|
signing_key:
|
147
166
|
specification_version: 4
|
148
167
|
summary: Provisioner for creating vSphere VM instances in Chef Provisioning.
|