torpedo 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/lib/torpedo/compute/servers.rb +2 -2
- data/lib/torpedo.rb +21 -0
- data/torpedo.gemspec +2 -2
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
* Fri Dec 30 2011 Dan Prince <dan.prince@rackspace.com> - 1.0.12
|
2
|
+
-Retry ssh on Errno::ECONNRESET.
|
3
|
+
-Added cleanup task.
|
4
|
+
|
1
5
|
* Wed Dec 14 2011 Dan Prince <dan.prince@rackspace.com> - 1.0.11
|
2
6
|
-Set paranoid to false for ssh connection tests. (net-ssh)
|
3
7
|
-Add options to disable server and image cleanup.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.12
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require 'torpedo/compute/helper'
|
2
2
|
require 'tempfile'
|
3
3
|
require 'net/ssh'
|
4
4
|
|
@@ -66,7 +66,7 @@ class Servers < Test::Unit::TestCase
|
|
66
66
|
Net::SSH.start(ip_addr, 'root', ssh_opts) do |ssh|
|
67
67
|
return ssh.exec!(test_cmd) == test_output
|
68
68
|
end
|
69
|
-
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Net::SSH::Exception
|
69
|
+
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::ECONNRESET, Net::SSH::Exception
|
70
70
|
next
|
71
71
|
end
|
72
72
|
end
|
data/lib/torpedo.rb
CHANGED
@@ -34,6 +34,8 @@ FLAVOR_NAME_RESIZE=configs['flavor_name_resize']
|
|
34
34
|
|
35
35
|
OPENSTACK_COMPUTE_VERSION=configs['openstack_compute_version']
|
36
36
|
|
37
|
+
require 'torpedo/compute/helper'
|
38
|
+
|
37
39
|
module Torpedo
|
38
40
|
class Tasks < Thor
|
39
41
|
|
@@ -57,6 +59,25 @@ class Tasks < Thor
|
|
57
59
|
require 'torpedo/compute/servers'
|
58
60
|
end
|
59
61
|
|
62
|
+
desc "cleanup", "Clean up servers and images (not necessary normally)."
|
63
|
+
def cleanup
|
64
|
+
conn = Torpedo::Compute::Helper::get_connection
|
65
|
+
conn.servers.each do |server|
|
66
|
+
server = conn.server(server[:id])
|
67
|
+
if server.name == 'torpedo'
|
68
|
+
puts 'Deleting torpedo server'
|
69
|
+
server.delete!
|
70
|
+
end
|
71
|
+
end
|
72
|
+
conn.images.each do |image|
|
73
|
+
image = conn.image(image[:id])
|
74
|
+
if image.server and conn.server(image.server['id']).name == 'torpedo'
|
75
|
+
puts 'Deleting torpedo image'
|
76
|
+
image.delete!
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
60
81
|
desc "all", "Run all tests."
|
61
82
|
def all
|
62
83
|
require 'torpedo/compute/flavors'
|
data/torpedo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{torpedo}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.12"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dan Prince"]
|
12
|
-
s.date = %q{2011-12-
|
12
|
+
s.date = %q{2011-12-30}
|
13
13
|
s.default_executable = %q{torpedo}
|
14
14
|
s.description = %q{Fast integration tests OpenStack Compute.}
|
15
15
|
s.email = %q{dan.prince@rackspace.com}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torpedo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 12
|
10
|
+
version: 1.0.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dan Prince
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-12-
|
18
|
+
date: 2011-12-30 00:00:00 -05:00
|
19
19
|
default_executable: torpedo
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|