kitchen-cloudstack 0.20.0.pre → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/kitchen-cloudstack.gemspec +1 -1
- data/lib/kitchen/driver/cloudstack.rb +9 -4
- data/lib/kitchen/driver/cloudstack_version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8802c8afb4661a3cb83987810521ea0c7199bc6d
|
4
|
+
data.tar.gz: 2e58b407b35852838f289e359c734f50bc08d7e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df2b0ea6265d1b658424efcf32277d8d4be1f4d6384f80bed3a339bc51003d3e58e0355266b1dfb009720feea4211ea272a8bf8b1b6ade9cbc339be709abc597
|
7
|
+
data.tar.gz: 81b6f19798b6b8baa26cc79092cb5892c60387e40a2744f811850f06b174841959fe7b2b9555a9b1f3ee0f530d9c9f3476aab81c91f21fd537458bfab206f1c6
|
data/kitchen-cloudstack.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'test-kitchen', '~> 1.0', '>= 1.0.0'
|
22
|
-
spec.add_dependency 'fog', '~> 1.
|
22
|
+
spec.add_dependency 'fog', '~> 1.23', '>= 1.23.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
25
25
|
spec.add_development_dependency 'rake', '~> 0'
|
@@ -34,7 +34,8 @@ module Kitchen
|
|
34
34
|
default_config :name, nil
|
35
35
|
default_config :username, 'root'
|
36
36
|
default_config :port, '22'
|
37
|
-
|
37
|
+
default_config :password, nil
|
38
|
+
|
38
39
|
def compute
|
39
40
|
cloudstack_uri = URI.parse(config[:cloudstack_api_url])
|
40
41
|
connection = Fog::Compute.new(
|
@@ -124,7 +125,6 @@ module Kitchen
|
|
124
125
|
|
125
126
|
|
126
127
|
keypair = nil
|
127
|
-
password = nil
|
128
128
|
if ((!config[:keypair_search_directory].nil?) and (File.exist?("#{config[:keypair_search_directory]}/#{config[:cloudstack_ssh_keypair_name]}.pem")))
|
129
129
|
keypair = "#{config[:keypair_search_directory]}/#{config[:cloudstack_ssh_keypair_name]}.pem"
|
130
130
|
debug("Keypair being used is #{keypair}")
|
@@ -163,6 +163,9 @@ module Kitchen
|
|
163
163
|
info("Password for #{config[:username]} at #{state[:hostname]} is #{password}")
|
164
164
|
ssh = Fog::SSH.new(state[:hostname], config[:username], {:password => password})
|
165
165
|
debug("Connecting to : #{state[:hostname]} as #{config[:username]} using password #{password}.")
|
166
|
+
elsif (!config[:password].nil?)
|
167
|
+
info("Connecting with user #{config[:username]} with password #{config[:password]}")
|
168
|
+
ssh = Fog::SSH.new(state[:hostname], config[:username], {:password => config[:password]})
|
166
169
|
else
|
167
170
|
info("No keypair specified (or file not found) nor is this a password enabled template. You will have to manually copy your SSH public key to #{state[:hostname]} to use this Kitchen.")
|
168
171
|
end
|
@@ -177,8 +180,10 @@ module Kitchen
|
|
177
180
|
def destroy(state)
|
178
181
|
return if state[:server_id].nil?
|
179
182
|
debug("Destroying #{state[:server_id]}")
|
180
|
-
server = compute.servers.get(
|
181
|
-
|
183
|
+
server = compute.servers.get(state[:server_id])
|
184
|
+
if not server.nil?
|
185
|
+
compute.destroy_virtual_machine({'id' => state[:server_id]})
|
186
|
+
end
|
182
187
|
info("CloudStack instance <#{state[:server_id]}> destroyed.")
|
183
188
|
state.delete(:server_id)
|
184
189
|
state.delete(:hostname)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-cloudstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.0
|
4
|
+
version: 0.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Moody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -36,20 +36,20 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '1.
|
39
|
+
version: '1.23'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.23.0
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: '1.
|
49
|
+
version: '1.23'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 1.
|
52
|
+
version: 1.23.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: bundler
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,12 +168,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- - "
|
171
|
+
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: '0'
|
174
174
|
requirements: []
|
175
175
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.4.5
|
177
177
|
signing_key:
|
178
178
|
specification_version: 4
|
179
179
|
summary: Provides an interface for Test Kitchen to be able to run jobs against an
|