kitchen-cloudstack 0.20.0.pre → 0.20.0

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: 525485d2f200010310f1cd4777a9422ceedd95cd
4
- data.tar.gz: 8d965420f5a495fcd57575774ec51f91f1149784
3
+ metadata.gz: 8802c8afb4661a3cb83987810521ea0c7199bc6d
4
+ data.tar.gz: 2e58b407b35852838f289e359c734f50bc08d7e1
5
5
  SHA512:
6
- metadata.gz: 2349e93da6c432786b6e04d234826b2eae069ccf808fe7febe0e62326e9defbb974dc82f4b1dc1698ed1c70b55fea550acee68f973f2214b11caec0c49ef940a
7
- data.tar.gz: 175d40c760a0d10e59444d1bfd8d709e03f8492e92d945b55bba3ee63841cdc2229e23cb4e27c4afe75c0455378332e8c61e75e92f6569297f5535d0419d3a8e
6
+ metadata.gz: df2b0ea6265d1b658424efcf32277d8d4be1f4d6384f80bed3a339bc51003d3e58e0355266b1dfb009720feea4211ea272a8bf8b1b6ade9cbc339be709abc597
7
+ data.tar.gz: 81b6f19798b6b8baa26cc79092cb5892c60387e40a2744f811850f06b174841959fe7b2b9555a9b1f3ee0f530d9c9f3476aab81c91f21fd537458bfab206f1c6
@@ -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.24', '>= 1.24.0'
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({'id' => state[:server_id]})
181
- compute.destroy_virtual_machine({'id' => state[:server_id]}) unless server.nil?
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)
@@ -21,6 +21,6 @@ module Kitchen
21
21
  module Driver
22
22
 
23
23
  # Version string for Cloudstack Kitchen driver
24
- CLOUDSTACK_VERSION = "0.20.0.pre"
24
+ CLOUDSTACK_VERSION = "0.20.0"
25
25
  end
26
26
  end
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.pre
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: 2014-10-09 00:00:00.000000000 Z
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.24'
39
+ version: '1.23'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 1.24.0
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.24'
49
+ version: '1.23'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 1.24.0
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: 1.3.1
173
+ version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.2.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