deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [3/3] git commit: Core: Fixed tests to use Deltacloud::MODEL
Date Tue, 12 Mar 2013 10:08:17 GMT
Updated Branches:
  refs/heads/master 861156f87 -> f5f2ee0b0


Core: Fixed tests to use Deltacloud::MODEL


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/f5f2ee0b
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/f5f2ee0b
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/f5f2ee0b

Branch: refs/heads/master
Commit: f5f2ee0b05e641a759e929a32ddfd9bab6cb9bb6
Parents: d4fd74a
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Mar 7 13:23:21 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Mar 12 11:06:16 2013 +0100

----------------------------------------------------------------------
 .../collections/instances_collection_test.rb       |    5 ++++-
 server/tests/deltacloud/common.rb                  |    2 +-
 server/tests/drivers/ec2/buckets_test.rb           |    2 +-
 server/tests/drivers/ec2/images_test.rb            |    4 ++--
 server/tests/drivers/ec2/instance_test.rb          |   12 ++++++------
 server/tests/drivers/ec2/keys_test.rb              |    6 +++---
 server/tests/drivers/ec2/realms_test.rb            |    4 ++--
 server/tests/drivers/ec2/storage_snapshots_test.rb |    2 +-
 server/tests/drivers/fgcp/images_test.rb           |    4 ++--
 server/tests/drivers/fgcp/provider_test.rb         |    2 +-
 server/tests/drivers/fgcp/realms_test.rb           |    4 ++--
 server/tests/drivers/fgcp/storage_volumes_test.rb  |    8 ++++----
 server/tests/drivers/gogrid/images_test.rb         |    4 ++--
 server/tests/drivers/gogrid/instances_test.rb      |    4 ++--
 server/tests/drivers/gogrid/realms_test.rb         |    4 ++--
 server/tests/drivers/mock/images_test.rb           |    8 ++++----
 server/tests/drivers/mock/instances_test.rb        |   14 +++++++-------
 server/tests/drivers/mock/keys_test.rb             |    6 +++---
 server/tests/drivers/mock/realms_test.rb           |    4 ++--
 .../tests/drivers/mock/storage_snapshots_test.rb   |    4 ++--
 server/tests/drivers/mock/storage_volumes_test.rb  |    8 ++++----
 server/tests/drivers/models/instance_test.rb       |    4 ++--
 server/tests/drivers/openstack/images_test.rb      |    4 ++--
 server/tests/drivers/openstack/instances_test.rb   |    2 +-
 server/tests/drivers/openstack/keys_test.rb        |    2 +-
 server/tests/drivers/openstack/realms_test.rb      |    2 +-
 server/tests/drivers/rhevm/images_test.rb          |    4 ++--
 server/tests/drivers/rhevm/instance_test.rb        |    8 ++++----
 server/tests/drivers/rhevm/provider_test.rb        |    2 +-
 server/tests/drivers/rhevm/realms_test.rb          |    4 ++--
 server/tests/ec2/query_parser_test.rb              |    2 +-
 31 files changed, 74 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/deltacloud/collections/instances_collection_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/deltacloud/collections/instances_collection_test.rb b/server/tests/deltacloud/collections/instances_collection_test.rb
index f194cd9..5b71d09 100644
--- a/server/tests/deltacloud/collections/instances_collection_test.rb
+++ b/server/tests/deltacloud/collections/instances_collection_test.rb
@@ -37,6 +37,8 @@ describe Deltacloud::Collections::Instances do
     end
   end
 
+  require 'pry'
+
   it 'allow to create and execute actions on created instance' do
     post root_url + '/instances', { :image_id => 'img1', :name => 'test', }
     status.must_equal 201
@@ -47,6 +49,7 @@ describe Deltacloud::Collections::Instances do
     # You can't remove RUNNING instance
     (xml/'error/message').first.text.strip.must_equal 'Method Not Allowed'
     post root_url + '/instances/' + instance_id + '/reboot'
+    binding.pry
     status.must_equal 202
     (xml/'instance/state').first.text.strip.must_equal 'RUNNING'
     post root_url + '/instances/' + instance_id + '/stop'
@@ -70,7 +73,7 @@ describe Deltacloud::Collections::Instances do
     get root_url + "/instances/inst1"
     status.must_equal 200
     json['instance'].wont_be_empty
-    Instance.attributes.each do |attr|
+    Deltacloud::Instance.attributes.each do |attr|
       attr = attr.to_s.gsub(/_id$/,'') if attr.to_s =~ /_id$/
       next if ['launch_time', 'authn_error', 'firewalls', 'keyname', 'username', 'password',
'instance_profile'].include?(attr.to_s)
       json['instance'].keys.must_include attr.to_s

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/deltacloud/common.rb
----------------------------------------------------------------------
diff --git a/server/tests/deltacloud/common.rb b/server/tests/deltacloud/common.rb
index c31655e..cbcd06b 100644
--- a/server/tests/deltacloud/common.rb
+++ b/server/tests/deltacloud/common.rb
@@ -10,7 +10,7 @@ def check_json_serialization_for(model, sample_id, optional_attrs=[])
   get root_url + "/#{model.to_s.pluralize}/#{sample_id}"
   status.must_equal 200
   json[model.to_s].wont_be_empty
-  klass = self.class.const_get(model.to_s.camelize)
+  klass = Deltacloud.const_get(model.to_s.camelize)
   klass.attributes.each do |attr|
     attr = attr.to_s.gsub(/_id$/,'') if attr.to_s =~ /_id$/
     json[model.to_s].keys.must_include attr.to_s unless optional_attrs.include? attr

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/buckets_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/buckets_test.rb b/server/tests/drivers/ec2/buckets_test.rb
index 343283d..983c3f3 100644
--- a/server/tests/drivers/ec2/buckets_test.rb
+++ b/server/tests/drivers/ec2/buckets_test.rb
@@ -36,7 +36,7 @@ describe 'Ec2Driver Buckets' do
     @dcloud_other_provider = Deltacloud::new(:ec2, credentials.merge!(:provider=>"eu-west-1"))
     #get the bucket and check
     retrieved_bucket = @dcloud_other_provider.bucket(:id=>bucket.name)
-    retrieved_bucket.must_be_kind_of Bucket
+    retrieved_bucket.must_be_kind_of Deltacloud::Bucket
     retrieved_bucket.name.must_equal bucket.name
     #delete the bucket
     @driver.delete_bucket(bucket.id)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/images_test.rb b/server/tests/drivers/ec2/images_test.rb
index 05c108a..1b82cb0 100644
--- a/server/tests/drivers/ec2/images_test.rb
+++ b/server/tests/drivers/ec2/images_test.rb
@@ -22,7 +22,7 @@ describe 'Ec2Driver Images' do
 
   it 'must return list of images' do
     @driver.images.wont_be_empty
-    @driver.images.first.must_be_kind_of Image
+    @driver.images.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -39,7 +39,7 @@ describe 'Ec2Driver Images' do
 
   it 'must allow to retrieve single image' do
     @driver.image(:id => 'ami-aecd60c7').wont_be_nil
-    @driver.image(:id => 'ami-aecd60c7').must_be_kind_of Image
+    @driver.image(:id => 'ami-aecd60c7').must_be_kind_of Deltacloud::Image
     @driver.image(:id => 'ami-aecd60c7').id.must_equal 'ami-aecd60c7'
     @driver.image(:id => 'ami-aaaaaaaa').must_be_nil
     @driver.image(:id => 'unknown').must_be_nil

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/instance_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/instance_test.rb b/server/tests/drivers/ec2/instance_test.rb
index 2492f08..51f7c52 100644
--- a/server/tests/drivers/ec2/instance_test.rb
+++ b/server/tests/drivers/ec2/instance_test.rb
@@ -22,7 +22,7 @@ describe 'Ec2Driver Instances' do
 
   it 'must return list of instances' do
     @driver.instances.wont_be_empty
-    @driver.instances.first.must_be_kind_of Instance
+    @driver.instances.first.must_be_kind_of Deltacloud::Instance
   end
 
   it 'must allow to filter instances' do
@@ -40,7 +40,7 @@ describe 'Ec2Driver Instances' do
 
   it 'must allow to retrieve single instance' do
     @driver.instance(:id => 'i-4d15f036').wont_be_nil
-    @driver.instance(:id => 'i-4d15f036').must_be_kind_of Instance
+    @driver.instance(:id => 'i-4d15f036').must_be_kind_of Deltacloud::Instance
     @driver.instance(:id => 'i-4d15f036').id.must_equal 'i-4d15f036'
     @driver.instance(:id => 'i-00000000').must_be_nil
     @driver.instance(:id => 'unknown').must_be_nil
@@ -55,7 +55,7 @@ describe 'Ec2Driver Instances' do
                                        :'firewalls1' => 'default'
                                       )
     instance = instance.wait_for!(@driver, record_retries) { |i| i.is_running? }
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.is_running?.must_equal true
     @driver.instance(:id => instance.id).wont_be_nil
     @driver.instance(:id => instance.id).id.must_equal instance.id
@@ -82,7 +82,7 @@ describe 'Ec2Driver Instances' do
                                       )
     instances.wont_be_empty
     instances.size.must_equal 2
-    instances.each { |i| i.must_be_kind_of Instance }
+    instances.each { |i| i.must_be_kind_of Deltacloud::Instance }
     instances = instances.map { |instance| instance.wait_for!(@driver, record_retries("#{instance.id}-running"))
{ |i| i.is_running? } }
     instances.each { |i| i.is_running?.must_equal true }
     instances.each { |i| @driver.destroy_instance(i.id) }
@@ -95,7 +95,7 @@ describe 'Ec2Driver Instances' do
     instance = @driver.create_instance('ami-aecd60c7',
                                        :realm_id => realm_id,
                                        :hwp_id => 'm1.small')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.realm_id.must_equal realm_id
     @driver.destroy_instance(instance.id)
   end
@@ -103,7 +103,7 @@ describe 'Ec2Driver Instances' do
   it 'must allow to reboot instance in running state' do
     instance = @driver.create_instance('ami-aecd60c7', :realm_id => 'us-east-1a', :hwp_id
=> 't1.micro')
     instance = instance.wait_for!(@driver, record_retries) { |i| i.is_running? }
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.is_running?.must_equal true
     @driver.reboot_instance(instance.id)
     @driver.instance(:id => instance.id).state.must_equal 'RUNNING'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/keys_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/keys_test.rb b/server/tests/drivers/ec2/keys_test.rb
index e8c659c..9429d4e 100644
--- a/server/tests/drivers/ec2/keys_test.rb
+++ b/server/tests/drivers/ec2/keys_test.rb
@@ -22,7 +22,7 @@ describe 'Ec2Driver Keys' do
 
   it 'must return list of keys' do
     @driver.keys.wont_be_empty
-    @driver.keys.first.must_be_kind_of Key
+    @driver.keys.first.must_be_kind_of Deltacloud::Key
   end
 
   it 'must allow to filter keys' do
@@ -35,7 +35,7 @@ describe 'Ec2Driver Keys' do
 
   it 'must allow to retrieve single key' do
     @driver.key(:id => 'test1').wont_be_nil
-    @driver.key(:id => 'test1').must_be_kind_of Key
+    @driver.key(:id => 'test1').must_be_kind_of Deltacloud::Key
     @driver.key(:id => 'test1').id.must_equal 'test1'
     @driver.key(:id => 'unknown').must_be_nil
   end
@@ -43,7 +43,7 @@ describe 'Ec2Driver Keys' do
   it 'must allow to create a new key' do
     key = @driver.create_key(:key_name => 'test-key-1')
     key.wont_be_nil
-    key.must_be_kind_of Key
+    key.must_be_kind_of Deltacloud::Key
     Proc.new { @driver.create_key(:key_name => 'test-key-1') }.must_raise Deltacloud::Exceptions::ProviderError,
'KeyExist'
     @driver.destroy_key :id => key.id
     @driver.key(:id => key.id).must_be_nil

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/realms_test.rb b/server/tests/drivers/ec2/realms_test.rb
index eb5ab1f..7918665 100644
--- a/server/tests/drivers/ec2/realms_test.rb
+++ b/server/tests/drivers/ec2/realms_test.rb
@@ -22,7 +22,7 @@ describe 'Ec2Driver Realms' do
 
   it 'must return list of realms' do
     @driver.realms.wont_be_empty
-    @driver.realms.first.must_be_kind_of Realm
+    @driver.realms.first.must_be_kind_of Deltacloud::Realm
   end
 
   it 'must allow to filter realms' do
@@ -35,7 +35,7 @@ describe 'Ec2Driver Realms' do
 
   it 'must allow to retrieve single realm' do
     @driver.realm(:id => 'us-east-1a').wont_be_nil
-    @driver.realm(:id => 'us-east-1a').must_be_kind_of Realm
+    @driver.realm(:id => 'us-east-1a').must_be_kind_of Deltacloud::Realm
     @driver.realm(:id => 'us-east-1b').id.must_equal 'us-east-1b'
     @driver.realm(:id => 'unknown').must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/ec2/storage_snapshots_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/ec2/storage_snapshots_test.rb b/server/tests/drivers/ec2/storage_snapshots_test.rb
index 0ac66d5..81460f0 100644
--- a/server/tests/drivers/ec2/storage_snapshots_test.rb
+++ b/server/tests/drivers/ec2/storage_snapshots_test.rb
@@ -21,7 +21,7 @@ describe 'Ec2Driver StorageSnapshots' do
 
   it 'must return list of storage snapshots' do
     @driver.storage_snapshots.wont_be_empty
-    @driver.storage_snapshots.first.must_be_kind_of StorageSnapshot
+    @driver.storage_snapshots.first.must_be_kind_of Deltacloud::StorageSnapshot
   end
 
   it 'must allow to filter storage snapshots' do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/fgcp/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/images_test.rb b/server/tests/drivers/fgcp/images_test.rb
index 248d108..b08030f 100644
--- a/server/tests/drivers/fgcp/images_test.rb
+++ b/server/tests/drivers/fgcp/images_test.rb
@@ -23,7 +23,7 @@ describe 'FgcpDriver Images' do
   it 'must return list of images' do
     imgs = @driver.images
     imgs.wont_be_empty
-    imgs.first.must_be_kind_of Image
+    imgs.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -38,7 +38,7 @@ describe 'FgcpDriver Images' do
   it 'must allow to retrieve single image' do
     img = @driver.image(:id => 'IMG_3c9820_S24FWXU0Q9VH0JK')
     img.wont_be_nil
-    img.must_be_kind_of Image
+    img.must_be_kind_of Deltacloud::Image
     img.id.must_equal 'IMG_3c9820_S24FWXU0Q9VH0JK'
     @driver.image(:id => 'unknown').must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/fgcp/provider_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/provider_test.rb b/server/tests/drivers/fgcp/provider_test.rb
index d38d8a5..e3d4952 100644
--- a/server/tests/drivers/fgcp/provider_test.rb
+++ b/server/tests/drivers/fgcp/provider_test.rb
@@ -17,7 +17,7 @@ describe 'FgcpDriver Providers' do
   it 'must support listing of available providers' do
     providers = @driver.providers
     providers.wont_be_empty
-    providers.each { |p| p.must_be_kind_of Provider }
+    providers.each { |p| p.must_be_kind_of Deltacloud::Provider }
     providers.each { |p| p.name.wont_be_empty }
     providers.each { |p| p.url.wont_be_empty }
     providers.each { |p| p.id.wont_be_empty }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/fgcp/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/realms_test.rb b/server/tests/drivers/fgcp/realms_test.rb
index 7a4de63..5a50e0b 100644
--- a/server/tests/drivers/fgcp/realms_test.rb
+++ b/server/tests/drivers/fgcp/realms_test.rb
@@ -23,7 +23,7 @@ describe 'FgcpDriver Realms' do
   it 'must return list of realms' do
     realms = @driver.realms
     realms.wont_be_empty
-    realms.first.must_be_kind_of Realm
+    realms.first.must_be_kind_of Deltacloud::Realm
     # assume at least one vsys has been created, with at least 1 tier network
     realms.size.wont_be :<, 2
   end
@@ -42,7 +42,7 @@ describe 'FgcpDriver Realms' do
   it 'must allow to retrieve single realm' do
     realm = @driver.realm(:id => 'UZXC0GRT-ZG8ZJCJ07-N-DMZ')
     realm.wont_be_nil
-    realm.must_be_kind_of Realm
+    realm.must_be_kind_of Deltacloud::Realm
     realm.state.must_equal 'AVAILABLE'
     realm.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-N-DMZ'
     realm.name.must_equal 'Dies-DC-test [DMZ]'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/fgcp/storage_volumes_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/fgcp/storage_volumes_test.rb b/server/tests/drivers/fgcp/storage_volumes_test.rb
index 4132479..eb026f7 100644
--- a/server/tests/drivers/fgcp/storage_volumes_test.rb
+++ b/server/tests/drivers/fgcp/storage_volumes_test.rb
@@ -22,7 +22,7 @@ describe 'FgcpDriver StorageVolumes' do
 
   it 'must return list of storage_volumes' do
     @driver.storage_volumes.wont_be_empty
-    @driver.storage_volumes.first.must_be_kind_of StorageVolume
+    @driver.storage_volumes.first.must_be_kind_of Deltacloud::StorageVolume
   end
 
   it 'must allow to filter storage_volumes' do
@@ -37,19 +37,19 @@ describe 'FgcpDriver StorageVolumes' do
   it 'must allow to retrieve single storage_volume' do
     storage_volume = @driver.storage_volume(:id => 'UZXC0GRT-ZG8ZJCJ07-D-0039')
     storage_volume.wont_be_nil
-    storage_volume.must_be_kind_of StorageVolume
+    storage_volume.must_be_kind_of Deltacloud::StorageVolume
     storage_volume.id.must_equal 'UZXC0GRT-ZG8ZJCJ07-D-0039'
     @driver.storage_volume(:id => 'unknown').must_be_nil
   end
 
   it 'must allow to create the storage volume' do
     volume = @driver.create_storage_volume(:name => 'Test Volume', :capacity => '2')
-    volume.must_be_kind_of StorageVolume
+    volume.must_be_kind_of Deltacloud::StorageVolume
     volume.name.must_equal 'Test Volume'
     volume.capacity.must_equal '10.0' # note that it's rounded up to a multiple of ten
     volume2 = @driver.storage_volume(:id => volume.id)
     volume2.wont_be_nil
-    volume2.must_be_kind_of StorageVolume
+    volume2.must_be_kind_of Deltacloud::StorageVolume
     volume2.id.must_equal volume.id
     volume2.name.must_equal volume.name
     volume2.capacity.must_equal volume.capacity

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/gogrid/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/images_test.rb b/server/tests/drivers/gogrid/images_test.rb
index a055567..15245db 100644
--- a/server/tests/drivers/gogrid/images_test.rb
+++ b/server/tests/drivers/gogrid/images_test.rb
@@ -29,7 +29,7 @@ describe 'GoGridDriver Images' do
 
   it 'must return list of images' do
     @driver.images.wont_be_empty
-    @driver.images.first.must_be_kind_of Image
+    @driver.images.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -54,7 +54,7 @@ describe 'GoGridDriver Images' do
     by_id = @driver.image(:id => some_img.id)
 
     by_id.wont_be_nil
-    by_id.must_be_kind_of Image
+    by_id.must_be_kind_of Deltacloud::Image
     by_id.id.must_equal some_img.id
   end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/gogrid/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/instances_test.rb b/server/tests/drivers/gogrid/instances_test.rb
index 092c8b7..ed3d965 100644
--- a/server/tests/drivers/gogrid/instances_test.rb
+++ b/server/tests/drivers/gogrid/instances_test.rb
@@ -63,7 +63,7 @@ describe 'GoGridDriver Instances' do
 
   it 'must return list of instances' do
     @driver.instances.wont_be_empty
-    @driver.instances.first.must_be_kind_of Instance
+    @driver.instances.first.must_be_kind_of Deltacloud::Instance
   end
 
   it 'must allow to filter instances' do
@@ -85,7 +85,7 @@ describe 'GoGridDriver Instances' do
   it 'must allow to retrieve single instance' do
     by_id = @driver.instance(:id => instance.id)
     by_id.wont_be_nil
-    by_id.must_be_kind_of Instance
+    by_id.must_be_kind_of Deltacloud::Instance
     by_id.id.must_equal instance.id
     @driver.instance(:id => "unknown").must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/gogrid/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/gogrid/realms_test.rb b/server/tests/drivers/gogrid/realms_test.rb
index a810992..b050aba 100644
--- a/server/tests/drivers/gogrid/realms_test.rb
+++ b/server/tests/drivers/gogrid/realms_test.rb
@@ -22,7 +22,7 @@ describe 'GoGridDriver Realms' do
 
   it 'must return list of realms' do
     @driver.realms.wont_be_empty
-    @driver.realms.first.must_be_kind_of Realm
+    @driver.realms.first.must_be_kind_of Deltacloud::Realm
   end
 
   it 'must allow to filter realms' do
@@ -36,7 +36,7 @@ describe 'GoGridDriver Realms' do
 
   it 'must allow to retrieve single realm' do
     @driver.realm(:id => '1').wont_be_nil
-    @driver.realm(:id => '1').must_be_kind_of Realm
+    @driver.realm(:id => '1').must_be_kind_of Deltacloud::Realm
     @driver.realm(:id => '1').id.must_equal '1'
     @driver.realm(:id => '1').name.must_equal 'US-West-1'
     @driver.realm(:id => 'unknown').must_be_nil

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/images_test.rb b/server/tests/drivers/mock/images_test.rb
index ab2f8b0..6f8ab8b 100644
--- a/server/tests/drivers/mock/images_test.rb
+++ b/server/tests/drivers/mock/images_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver Images' do
 
   it 'must return list of images' do
     @driver.images.wont_be_empty
-    @driver.images.first.must_be_kind_of Image
+    @driver.images.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -32,13 +32,13 @@ describe 'MockDriver Images' do
 
   it 'must allow to retrieve single image' do
     @driver.image(:id => 'img1').wont_be_nil
-    @driver.image(:id => 'img1').must_be_kind_of Image
+    @driver.image(:id => 'img1').must_be_kind_of Deltacloud::Image
     @driver.image(:id => 'img1').id.must_equal 'img1'
     @driver.image(:id => 'unknown').must_be_nil
   end
 
   it 'must allow to create a new image if instance supported' do
-    @driver.create_image(:id => 'inst1', :name => 'img1-test', :description => 'Test1').must_be_kind_of
Image
+    @driver.create_image(:id => 'inst1', :name => 'img1-test', :description => 'Test1').must_be_kind_of
Deltacloud::Image
     @driver.image(:id => 'img1-test').wont_be_nil
     @driver.image(:id => 'img1-test').id.must_equal 'img1-test'
     @driver.image(:id => 'img1-test').name.must_equal 'img1-test'
@@ -48,7 +48,7 @@ describe 'MockDriver Images' do
   end
 
   it 'must allow to destroy created image' do
-    @driver.create_image(:id => 'inst1', :name => 'img1-test-destroy').must_be_kind_of
Image
+    @driver.create_image(:id => 'inst1', :name => 'img1-test-destroy').must_be_kind_of
Deltacloud::Image
     @driver.destroy_image('img1-test-destroy')
     @driver.image(:id => 'img1-test-destroy').must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/instances_test.rb b/server/tests/drivers/mock/instances_test.rb
index 5d26c21..7e93f31 100644
--- a/server/tests/drivers/mock/instances_test.rb
+++ b/server/tests/drivers/mock/instances_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver Instances' do
 
   it 'must return list of instances' do
     @driver.instances.wont_be_empty
-    @driver.instances.first.must_be_kind_of Instance
+    @driver.instances.first.must_be_kind_of Deltacloud::Instance
   end
 
   it 'must allow to filter instances' do
@@ -32,14 +32,14 @@ describe 'MockDriver Instances' do
 
   it 'must allow to retrieve single instance' do
     @driver.instance(:id => 'inst1').wont_be_nil
-    @driver.instance(:id => 'inst1').must_be_kind_of Instance
+    @driver.instance(:id => 'inst1').must_be_kind_of Deltacloud::Instance
     @driver.instance(:id => 'inst1').id.must_equal 'inst1'
     @driver.instance(:id => 'unknown').must_be_nil
   end
 
   it 'must allow to create a new instance if instance supported' do
     instance = @driver.create_instance('img1', :name => 'inst1-test', :realm_id =>
'us', :hwp_id => 'm1-small')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     @driver.instance(:id => instance.id).wont_be_nil
     @driver.instance(:id => instance.id).id.must_equal instance.id
     @driver.instance(:id => instance.id).name.must_equal 'inst1-test'
@@ -62,14 +62,14 @@ describe 'MockDriver Instances' do
 
   it 'must allow to destroy created instance' do
     instance = @driver.create_instance('img1', :name => 'inst1-test-destroy')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     @driver.destroy_instance(instance.id)
     @driver.instance(:id => instance.id).must_be_nil
   end
 
   it 'must allow to stop instance in running state' do
     instance = @driver.create_instance('img1', :name => 'inst1-test-destroy')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.state.must_equal 'RUNNING'
     @driver.stop_instance(instance.id)
     @driver.instance(:id => instance.id).state.must_equal 'STOPPED'
@@ -79,7 +79,7 @@ describe 'MockDriver Instances' do
 
   it 'must allow to start instance in stopped state' do
     instance = @driver.create_instance('img1', :name => 'inst1-test-destroy')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.state.must_equal 'RUNNING'
     @driver.stop_instance(instance.id)
     @driver.instance(:id => instance.id).state.must_equal 'STOPPED'
@@ -91,7 +91,7 @@ describe 'MockDriver Instances' do
 
   it 'must allow to reboot instance in running state' do
     instance = @driver.create_instance('img1', :name => 'inst1-test-destroy')
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.state.must_equal 'RUNNING'
     @driver.reboot_instance(instance.id)
     @driver.instance(:id => instance.id).state.must_equal 'RUNNING'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/keys_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/keys_test.rb b/server/tests/drivers/mock/keys_test.rb
index ecf7ec8..b491a0e 100644
--- a/server/tests/drivers/mock/keys_test.rb
+++ b/server/tests/drivers/mock/keys_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver Keys' do
 
   it 'must return list of keys' do
     @driver.keys.wont_be_empty
-    @driver.keys.first.must_be_kind_of Key
+    @driver.keys.first.must_be_kind_of Deltacloud::Key
   end
 
   it 'must allow to filter keys' do
@@ -30,7 +30,7 @@ describe 'MockDriver Keys' do
 
   it 'must allow to retrieve single key' do
     @driver.key(:id => 'test-key').wont_be_nil
-    @driver.key(:id => 'test-key').must_be_kind_of Key
+    @driver.key(:id => 'test-key').must_be_kind_of Deltacloud::Key
     @driver.key(:id => 'test-key').id.must_equal 'test-key'
     @driver.key(:id => 'unknown').must_be_nil
   end
@@ -38,7 +38,7 @@ describe 'MockDriver Keys' do
   it 'must allow to create a new key' do
     key = @driver.create_key(:key_name => 'test1')
     key.wont_be_nil
-    key.must_be_kind_of Key
+    key.must_be_kind_of Deltacloud::Key
     Proc.new { @driver.create_key(:key_name => 'test1') }.must_raise Deltacloud::Exceptions::ForbiddenError,
'KeyExist'
     @driver.destroy_key :id => key.id
     @driver.key(:id => key.id).must_be_nil

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/realms_test.rb b/server/tests/drivers/mock/realms_test.rb
index 758fa0d..ed0c51a 100644
--- a/server/tests/drivers/mock/realms_test.rb
+++ b/server/tests/drivers/mock/realms_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver Realms' do
 
   it 'must return list of realms' do
     @driver.realms.wont_be_empty
-    @driver.realms.first.must_be_kind_of Realm
+    @driver.realms.first.must_be_kind_of Deltacloud::Realm
   end
 
   it 'must allow to filter realms' do
@@ -30,7 +30,7 @@ describe 'MockDriver Realms' do
 
   it 'must allow to retrieve single realm' do
     @driver.realm(:id => 'us').wont_be_nil
-    @driver.realm(:id => 'us').must_be_kind_of Realm
+    @driver.realm(:id => 'us').must_be_kind_of Deltacloud::Realm
     @driver.realm(:id => 'us').id.must_equal 'us'
     @driver.realm(:id => 'unknown').must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/storage_snapshots_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/storage_snapshots_test.rb b/server/tests/drivers/mock/storage_snapshots_test.rb
index b77e6e0..be4c88b 100644
--- a/server/tests/drivers/mock/storage_snapshots_test.rb
+++ b/server/tests/drivers/mock/storage_snapshots_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver StorageSnapshots' do
 
   it 'must return list of storage_snapshots' do
     @driver.storage_snapshots.wont_be_empty
-    @driver.storage_snapshots.first.must_be_kind_of StorageSnapshot
+    @driver.storage_snapshots.first.must_be_kind_of Deltacloud::StorageSnapshot
   end
 
   it 'must allow to filter storage_snapshots' do
@@ -30,7 +30,7 @@ describe 'MockDriver StorageSnapshots' do
 
   it 'must allow to retrieve single storage_snapshot' do
     @driver.storage_snapshot(:id => 'snap1').wont_be_nil
-    @driver.storage_snapshot(:id => 'snap1').must_be_kind_of StorageSnapshot
+    @driver.storage_snapshot(:id => 'snap1').must_be_kind_of Deltacloud::StorageSnapshot
     @driver.storage_snapshot(:id => 'snap1').id.must_equal 'snap1'
     @driver.storage_snapshot(:id => 'unknown').must_be_nil
   end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/mock/storage_volumes_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/mock/storage_volumes_test.rb b/server/tests/drivers/mock/storage_volumes_test.rb
index 1394474..1727627 100644
--- a/server/tests/drivers/mock/storage_volumes_test.rb
+++ b/server/tests/drivers/mock/storage_volumes_test.rb
@@ -17,7 +17,7 @@ describe 'MockDriver StorageVolumes' do
 
   it 'must return list of storage_volumes' do
     @driver.storage_volumes.wont_be_empty
-    @driver.storage_volumes.first.must_be_kind_of StorageVolume
+    @driver.storage_volumes.first.must_be_kind_of Deltacloud::StorageVolume
   end
 
   it 'must allow to filter storage_volumes' do
@@ -30,14 +30,14 @@ describe 'MockDriver StorageVolumes' do
 
   it 'must allow to retrieve single storage_volume' do
     @driver.storage_volume(:id => 'vol1').wont_be_nil
-    @driver.storage_volume(:id => 'vol1').must_be_kind_of StorageVolume
+    @driver.storage_volume(:id => 'vol1').must_be_kind_of Deltacloud::StorageVolume
     @driver.storage_volume(:id => 'vol1').id.must_equal 'vol1'
     @driver.storage_volume(:id => 'unknown').must_be_nil
   end
 
   it 'must allow to create and destroy the storage volume' do
     volume = @driver.create_storage_volume(:name => 'Test Volume', :capacity => '100')
-    volume.must_be_kind_of StorageVolume
+    volume.must_be_kind_of Deltacloud::StorageVolume
     volume.name.must_equal 'Test Volume'
     volume.capacity.must_equal '100'
     @driver.destroy_storage_volume(:id => volume.id)
@@ -46,7 +46,7 @@ describe 'MockDriver StorageVolumes' do
 
   it 'must allow to attach and detach storage volume to instance' do
     volume = @driver.create_storage_volume(:name => 'Test Volume', :capacity => '100')
-    volume.must_be_kind_of StorageVolume
+    volume.must_be_kind_of Deltacloud::StorageVolume
     @driver.attach_storage_volume(:id => volume.id, :device => '/dev/sda', :instance_id
=> 'inst1')
     @driver.storage_volume(:id => volume.id).instance_id.must_equal 'inst1'
     @driver.storage_volume(:id => volume.id).device.must_equal '/dev/sda'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/models/instance_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/models/instance_test.rb b/server/tests/drivers/models/instance_test.rb
index 26852ee..c70f725 100644
--- a/server/tests/drivers/models/instance_test.rb
+++ b/server/tests/drivers/models/instance_test.rb
@@ -3,10 +3,10 @@ require 'require_relative' if RUBY_VERSION < '1.9'
 
 require_relative 'common'
 
-describe Instance do
+describe Deltacloud::Instance do
 
   before do
-    @instance = Instance.new(
+    @instance = Deltacloud::Instance.new(
       :id => 'inst1',
       :create_image => true,
       :name => 'Instance',

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/openstack/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/images_test.rb b/server/tests/drivers/openstack/images_test.rb
index 7181f7d..66c9695 100644
--- a/server/tests/drivers/openstack/images_test.rb
+++ b/server/tests/drivers/openstack/images_test.rb
@@ -22,7 +22,7 @@ describe 'OpenStackDriver Images' do
 
   it 'must return list of images' do
     @driver.images.wont_be_empty
-    @driver.images.first.must_be_kind_of Image
+    @driver.images.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -40,7 +40,7 @@ describe 'OpenStackDriver Images' do
     @driver.image(:id => 'unknown').must_be_nil
     image = @driver.image :id => openstack_image_id
     image.wont_be_nil
-    image.must_be_kind_of Image
+    image.must_be_kind_of Deltacloud::Image
     image.id.must_equal openstack_image_id
     image.name.wont_be_empty
     image.owner_id.wont_be_empty

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/openstack/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/instances_test.rb b/server/tests/drivers/openstack/instances_test.rb
index 986bc1a..5bd7780 100644
--- a/server/tests/drivers/openstack/instances_test.rb
+++ b/server/tests/drivers/openstack/instances_test.rb
@@ -29,7 +29,7 @@ describe 'OpenStackDriver Instances' do
 
   it 'must return list of instances' do
     @driver.instances.wont_be_empty
-    @driver.instances.first.must_be_kind_of Instance
+    @driver.instances.first.must_be_kind_of Deltacloud::Instance
   end
 
   it 'must allow to filter instances' do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/openstack/keys_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/keys_test.rb b/server/tests/drivers/openstack/keys_test.rb
index 4e7c7ed..33d741a 100644
--- a/server/tests/drivers/openstack/keys_test.rb
+++ b/server/tests/drivers/openstack/keys_test.rb
@@ -22,7 +22,7 @@ describe 'OpenStackDriver Keys' do
 
   it 'must return list of keys' do
     @driver.keys.wont_be_empty
-    @driver.keys.first.must_be_kind_of Key
+    @driver.keys.first.must_be_kind_of Deltacloud::Key
   end
 
   it 'must allow to filter keys' do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/openstack/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/realms_test.rb b/server/tests/drivers/openstack/realms_test.rb
index f4916f7..ae337ae 100644
--- a/server/tests/drivers/openstack/realms_test.rb
+++ b/server/tests/drivers/openstack/realms_test.rb
@@ -22,7 +22,7 @@ describe 'OpenStackDriver Realms' do
 
   it 'must return list of realms' do
     @driver.realms.wont_be_empty
-    @driver.realms.first.must_be_kind_of Realm
+    @driver.realms.first.must_be_kind_of Deltacloud::Realm
   end
 
   it 'must allow to retrieve single realm' do

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/rhevm/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/images_test.rb b/server/tests/drivers/rhevm/images_test.rb
index e60cc4d..380034a 100644
--- a/server/tests/drivers/rhevm/images_test.rb
+++ b/server/tests/drivers/rhevm/images_test.rb
@@ -25,7 +25,7 @@ describe 'RhevmDriver Images' do
 
   it 'must return list of images' do
     @driver.images.wont_be_empty
-    @driver.images.first.must_be_kind_of Image
+    @driver.images.first.must_be_kind_of Deltacloud::Image
   end
 
   it 'must allow to filter images' do
@@ -49,7 +49,7 @@ describe 'RhevmDriver Images' do
     if RUBY_VERSION =~ /^1\.9/
       img = @driver.image(:id => @template_id)
       img.wont_be_nil
-      img.must_be_kind_of Image
+      img.must_be_kind_of Deltacloud::Image
       img.id.must_equal @template_id
       @driver.image(:id => 'ami-aaaaaaaa').must_be_nil
       @driver.image(:id => 'unknown').must_be_nil

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/rhevm/instance_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/instance_test.rb b/server/tests/drivers/rhevm/instance_test.rb
index b6b09e9..27f25a0 100644
--- a/server/tests/drivers/rhevm/instance_test.rb
+++ b/server/tests/drivers/rhevm/instance_test.rb
@@ -27,7 +27,7 @@ describe 'RhevmDriver Instances' do
 
   it 'must return list of instances' do
     @driver.instances.wont_be_empty
-    @driver.instances.first.must_be_kind_of Instance
+    @driver.instances.first.must_be_kind_of Deltacloud::Instance
   end
 
   it 'must allow to filter instances' do
@@ -43,7 +43,7 @@ describe 'RhevmDriver Instances' do
   it 'must allow to retrieve single instance' do
     inst = @driver.instance(:id => @vm_id)
     inst.wont_be_nil
-    inst.must_be_kind_of Instance
+    inst.must_be_kind_of Deltacloud::Instance
     inst.id.must_equal @vm_id
     @driver.instance(:id => 'i-00000000').must_be_nil
     @driver.instance(:id => 'unknown').must_be_nil
@@ -57,7 +57,7 @@ describe 'RhevmDriver Instances' do
                                        :user_data => 'test user data'
                                       )
     instance = instance.wait_for!(@driver, record_retries('', :timeout => 60)) { |i| i.is_stopped?
}
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.is_running?.must_equal false
 
     inst = @driver.instance(:id => instance.id)
@@ -84,7 +84,7 @@ describe 'RhevmDriver Instances' do
                                       )
     instance = instance.wait_for!(@driver, record_retries('', :timeout => 60)) { |i| i.is_stopped?
}
     skip "Skip this test due to RHEVm bug: https://bugzilla.redhat.com/show_bug.cgi?id=910741"
-    instance.must_be_kind_of Instance
+    instance.must_be_kind_of Deltacloud::Instance
     instance.is_running?.must_equal false
 
     inst = @driver.instance(:id => instance.id)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/rhevm/provider_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/provider_test.rb b/server/tests/drivers/rhevm/provider_test.rb
index 5a1e45a..fbb32d0 100644
--- a/server/tests/drivers/rhevm/provider_test.rb
+++ b/server/tests/drivers/rhevm/provider_test.rb
@@ -26,7 +26,7 @@ describe 'RHEV-M provider test' do
 
   it 'must support listing of available providers' do
     @driver.providers.wont_be_empty
-    @driver.providers.each { |p| p.must_be_kind_of Provider }
+    @driver.providers.each { |p| p.must_be_kind_of Deltacloud::Provider }
     @driver.providers.each { |p| p.name.wont_be_empty }
     @driver.providers.each { |p| p.id.wont_be_empty }
     @driver.providers.each { |p| p.url.wont_be_empty }

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/drivers/rhevm/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/rhevm/realms_test.rb b/server/tests/drivers/rhevm/realms_test.rb
index d830ce1..616b16d 100644
--- a/server/tests/drivers/rhevm/realms_test.rb
+++ b/server/tests/drivers/rhevm/realms_test.rb
@@ -26,7 +26,7 @@ describe 'RhevmDriver Realms' do
   it 'must return list of realms' do
     realms = @driver.realms
     realms.wont_be_empty
-    realms.first.must_be_kind_of Realm
+    realms.first.must_be_kind_of Deltacloud::Realm
   end
 
   it 'must allow to filter realms' do
@@ -41,7 +41,7 @@ describe 'RhevmDriver Realms' do
   it 'must allow to retrieve single realm' do
     realm = @driver.realm(:id => @dc_id)
     realm.wont_be_nil
-    realm.must_be_kind_of Realm
+    realm.must_be_kind_of Deltacloud::Realm
     @driver.realm(:id => 'unknown').must_be_nil
   end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f5f2ee0b/server/tests/ec2/query_parser_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/ec2/query_parser_test.rb b/server/tests/ec2/query_parser_test.rb
index e34e1f9..16682a7 100644
--- a/server/tests/ec2/query_parser_test.rb
+++ b/server/tests/ec2/query_parser_test.rb
@@ -77,7 +77,7 @@ describe Deltacloud::EC2 do
       result.must_respond_to :'perform!'
       realms = result.perform!(@driver.credentials, @driver.backend)
       realms.wont_be_empty
-      realms.first.must_be_kind_of Realm
+      realms.first.must_be_kind_of Deltacloud::Realm
       realms.first.id.must_equal 'us'
     end
 


Mime
View raw message