Navigation Menu

Skip to content

Commit

Permalink
* Add support for NOVA_REGION_NAME and NOVA_PROJECT_ID.
Browse files Browse the repository at this point in the history
* Remove dependency on test-unit-ext.
* Add support for OS_AUTH_? style variables.
  • Loading branch information
Dan Prince committed Nov 2, 2011
1 parent 3cb0739 commit 5d052b5
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
@@ -1,3 +1,8 @@
* Wed Nov 2 2011 Dan Prince <dan.prince@rackspace.com> - 1.0.7
-Add support for NOVA_REGION_NAME and NOVA_PROJECT_ID.
-Remove dependency on test-unit-ext.
-Add support for OS_AUTH_? style variables.

* Tue Nov 1 2011 Dan Prince <dan.prince@rackspace.com> - 1.0.6
-Minor metadata test updates.
-Don't require test-unit (breaks Ruby 1.8.7)
Expand Down
6 changes: 1 addition & 5 deletions README.md
Expand Up @@ -46,7 +46,7 @@ Installation
#keyname: test
EOF_CAT
source novarc
source $PATH_TO_YOUR/novarc
```
Examples
Expand All @@ -71,10 +71,6 @@ Run all tests with debug HTTP request response output:
DEBUG=true torpedo fire
Run all tests and output an XML report (Ruby 1.8.x only):
torpedo fire --xml-report=FILE
Payload
--------
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -25,7 +25,6 @@ Jeweler::Tasks.new do |gem|
# dependencies defined in Gemfile
gem.add_dependency 'thor'
gem.add_dependency 'openstack-compute', '>= 1.1.4'
gem.add_dependency 'test-unit-ext', '>= 0.5.0'
end
Jeweler::RubygemsDotOrgTasks.new

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.0.6
1.0.7
4 changes: 0 additions & 4 deletions lib/torpedo.rb
Expand Up @@ -25,10 +25,6 @@

OPENSTACK_COMPUTE_VERSION=configs['openstack_compute_version'] || '1.1.4'

USERNAME=ENV['NOVA_USERNAME']
API_KEY=ENV['NOVA_API_KEY']
API_URL=ENV['NOVA_URL']

module Torpedo
class Tasks < Thor

Expand Down
11 changes: 8 additions & 3 deletions lib/torpedo/compute/helper.rb
@@ -1,7 +1,5 @@
if RUBY_VERSION =~ /^1.9.*/ then
gem 'test-unit'
else
require 'test-unit-ext'
end
require 'test/unit'
gem 'openstack-compute', OPENSTACK_COMPUTE_VERSION
Expand All @@ -16,7 +14,14 @@ def self.get_connection
if ENV['DEBUG'] and ENV['DEBUG'] == 'true' then
debug = true
end
OpenStack::Compute::Connection.new(:username => USERNAME, :api_key => API_KEY, :auth_url => API_URL, :is_debug => debug)

auth_url = ENV['NOVA_URL'] || ENV['OS_AUTH_URL']
api_key = ENV['NOVA_API_KEY'] || ENV['OS_AUTH_KEY']
username = ENV['NOVA_USERNAME'] || ENV['OS_AUTH_USER']
authtenant = ENV['NOVA_PROJECT_ID'] || ENV['OS_AUTH_TENANT']
region = ENV['NOVA_REGION_NAME'] || ENV['OS_AUTH_REGION']

OpenStack::Compute::Connection.new(:username => username, :api_key => api_key, :auth_url => auth_url, :region => region, :authtenant => authtenant, :is_debug => debug)
end

def self.get_image_ref(conn)
Expand Down
7 changes: 2 additions & 5 deletions torpedo.gemspec
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{torpedo}
s.version = "1.0.6"
s.version = "1.0.7"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dan Prince"]
s.date = %q{2011-11-01}
s.date = %q{2011-11-02}
s.default_executable = %q{torpedo}
s.description = %q{CLI to run functional smoke tests for OpenStack.}
s.email = %q{dan.prince@rackspace.com}
Expand Down Expand Up @@ -54,20 +54,17 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_runtime_dependency(%q<thor>, [">= 0"])
s.add_runtime_dependency(%q<openstack-compute>, [">= 1.1.4"])
s.add_runtime_dependency(%q<test-unit-ext>, [">= 0.5.0"])
else
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_dependency(%q<thor>, [">= 0"])
s.add_dependency(%q<openstack-compute>, [">= 1.1.4"])
s.add_dependency(%q<test-unit-ext>, [">= 0.5.0"])
end
else
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
s.add_dependency(%q<thor>, [">= 0"])
s.add_dependency(%q<openstack-compute>, [">= 1.1.4"])
s.add_dependency(%q<test-unit-ext>, [">= 0.5.0"])
end
end

0 comments on commit 5d052b5

Please sign in to comment.