diff --git a/lib/fog/vcloud/models/shared/address.rb b/lib/fog/terremark/models/shared/address.rb similarity index 95% rename from lib/fog/vcloud/models/shared/address.rb rename to lib/fog/terremark/models/shared/address.rb index 2ccb29eba..115b9cab1 100644 --- a/lib/fog/vcloud/models/shared/address.rb +++ b/lib/fog/terremark/models/shared/address.rb @@ -1,7 +1,7 @@ require 'fog/model' module Fog - module Vcloud + module Terremark module Shared class Address < Fog::Model diff --git a/lib/fog/vcloud/models/shared/addresses.rb b/lib/fog/terremark/models/shared/addresses.rb similarity index 76% rename from lib/fog/vcloud/models/shared/addresses.rb rename to lib/fog/terremark/models/shared/addresses.rb index 1e1a6bb23..decc67a83 100644 --- a/lib/fog/vcloud/models/shared/addresses.rb +++ b/lib/fog/terremark/models/shared/addresses.rb @@ -1,22 +1,22 @@ module Fog - module Vcloud + module Terremark module Shared module Mock def addresses(options = {}) - Fog::Vcloud::Shared::Addresses.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Addresses.new(options.merge(:connection => self)) end end module Real def addresses(options = {}) - Fog::Vcloud::Shared::Addresses.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Addresses.new(options.merge(:connection => self)) end end class Addresses < Fog::Collection - model Fog::Vcloud::Shared::Address + model Fog::Terremark::Shared::Address def all load(connection.get_public_ips(vdc_id).body['PublicIpAddresses']) diff --git a/lib/fog/vcloud/models/shared/network.rb b/lib/fog/terremark/models/shared/network.rb similarity index 96% rename from lib/fog/vcloud/models/shared/network.rb rename to lib/fog/terremark/models/shared/network.rb index c33b7c302..eb067272f 100644 --- a/lib/fog/vcloud/models/shared/network.rb +++ b/lib/fog/terremark/models/shared/network.rb @@ -1,7 +1,7 @@ require 'fog/model' module Fog - module Vcloud + module Terremark module Shared class Network < Fog::Model diff --git a/lib/fog/vcloud/models/shared/networks.rb b/lib/fog/terremark/models/shared/networks.rb similarity index 79% rename from lib/fog/vcloud/models/shared/networks.rb rename to lib/fog/terremark/models/shared/networks.rb index d05e32f7f..6e39c3003 100644 --- a/lib/fog/vcloud/models/shared/networks.rb +++ b/lib/fog/terremark/models/shared/networks.rb @@ -1,22 +1,22 @@ module Fog - module Vcloud + module Terremark module Shared module Mock def networks(options = {}) - Fog::Vcloud::Shared::Networks.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Networks.new(options.merge(:connection => self)) end end module Real def networks(options = {}) - Fog::Vcloud::Shared::Networks.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Networks.new(options.merge(:connection => self)) end end class Networks < Fog::Collection - model Fog::Vcloud::Shared::Network + model Fog::Terremark::Shared::Network def all data = connection.get_vdc(vdc_id).body['AvailableNetworks'].map do |network| diff --git a/lib/fog/vcloud/models/shared/server.rb b/lib/fog/terremark/models/shared/server.rb similarity index 99% rename from lib/fog/vcloud/models/shared/server.rb rename to lib/fog/terremark/models/shared/server.rb index 06d745299..4e6562664 100644 --- a/lib/fog/vcloud/models/shared/server.rb +++ b/lib/fog/terremark/models/shared/server.rb @@ -1,7 +1,7 @@ require 'fog/model' module Fog - module Vcloud + module Terremark module Shared class Server < Fog::Model diff --git a/lib/fog/vcloud/models/shared/servers.rb b/lib/fog/terremark/models/shared/servers.rb similarity index 77% rename from lib/fog/vcloud/models/shared/servers.rb rename to lib/fog/terremark/models/shared/servers.rb index 222dc45a6..8d4668f82 100644 --- a/lib/fog/vcloud/models/shared/servers.rb +++ b/lib/fog/terremark/models/shared/servers.rb @@ -1,25 +1,25 @@ require 'fog/collection' -require 'fog/vcloud/models/shared/server' +require 'fog/terremark/models/shared/server' module Fog - module Vcloud + module Terremark module Shared module Mock def servers(options = {}) - Fog::Vcloud::Shared::Servers.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Servers.new(options.merge(:connection => self)) end end module Real def servers(options = {}) - Fog::Vcloud::Shared::Servers.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Servers.new(options.merge(:connection => self)) end end class Servers < Fog::Collection - model Fog::Vcloud::Shared::Server + model Fog::Terremark::Shared::Server def all data = connection.get_vdc(vdc_id).body['ResourceEntities'].select do |entity| diff --git a/lib/fog/vcloud/models/shared/task.rb b/lib/fog/terremark/models/shared/task.rb similarity index 98% rename from lib/fog/vcloud/models/shared/task.rb rename to lib/fog/terremark/models/shared/task.rb index 0380a841a..c8bcab351 100644 --- a/lib/fog/vcloud/models/shared/task.rb +++ b/lib/fog/terremark/models/shared/task.rb @@ -1,7 +1,7 @@ require 'fog/model' module Fog - module Vcloud + module Terremark module Shared class Task < Fog::Model diff --git a/lib/fog/vcloud/models/shared/tasks.rb b/lib/fog/terremark/models/shared/tasks.rb similarity index 82% rename from lib/fog/vcloud/models/shared/tasks.rb rename to lib/fog/terremark/models/shared/tasks.rb index 3f305e955..79e601761 100644 --- a/lib/fog/vcloud/models/shared/tasks.rb +++ b/lib/fog/terremark/models/shared/tasks.rb @@ -1,25 +1,25 @@ require 'fog/collection' -require 'fog/vcloud/models/shared/server' +require 'fog/terremark/models/shared/server' module Fog - module Vcloud + module Terremark module Shared module Mock def tasks - Fog::Vcloud::Shared::Tasks.new(:connection => self) + Fog::Terremark::Shared::Tasks.new(:connection => self) end end module Real def tasks - Fog::Vcloud::Shared::Tasks.new(:connection => self) + Fog::Terremark::Shared::Tasks.new(:connection => self) end end class Tasks < Fog::Collection - model Fog::Vcloud::Shared::Task + model Fog::Terremark::Shared::Task def all data = connection.get_tasks_list(task_list_id).body['Tasks'] diff --git a/lib/fog/vcloud/models/shared/vdc.rb b/lib/fog/terremark/models/shared/vdc.rb similarity index 96% rename from lib/fog/vcloud/models/shared/vdc.rb rename to lib/fog/terremark/models/shared/vdc.rb index f0d5fb1b6..317ffb2c7 100644 --- a/lib/fog/vcloud/models/shared/vdc.rb +++ b/lib/fog/terremark/models/shared/vdc.rb @@ -1,7 +1,7 @@ require 'fog/model' module Fog - module Vcloud + module Terremark module Shared class Vdc < Fog::Model diff --git a/lib/fog/vcloud/models/shared/vdcs.rb b/lib/fog/terremark/models/shared/vdcs.rb similarity index 80% rename from lib/fog/vcloud/models/shared/vdcs.rb rename to lib/fog/terremark/models/shared/vdcs.rb index 6aced2f1a..d47793f5d 100644 --- a/lib/fog/vcloud/models/shared/vdcs.rb +++ b/lib/fog/terremark/models/shared/vdcs.rb @@ -1,22 +1,22 @@ module Fog - module Vcloud + module Terremark module Shared module Mock def vdcs(options = {}) - Fog::Vcloud::Shared::Vdcs.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Vdcs.new(options.merge(:connection => self)) end end module Real def vdcs(options = {}) - Fog::Vcloud::Shared::Vdcs.new(options.merge(:connection => self)) + Fog::Terremark::Shared::Vdcs.new(options.merge(:connection => self)) end end class Vdcs < Fog::Collection - model Fog::Vcloud::Shared::Vdc + model Fog::Terremark::Shared::Vdc def all data = connection.get_organization(organization_id).body['Links'].select do |entity| diff --git a/lib/fog/terremark/shared.rb b/lib/fog/terremark/shared.rb index 8b007c4b9..0e4f475fb 100644 --- a/lib/fog/terremark/shared.rb +++ b/lib/fog/terremark/shared.rb @@ -221,9 +221,16 @@ module Fog end def shared_requires - include Fog::Vcloud::Shared - shared_requires - + require 'fog/terremark/models/shared/address' + require 'fog/terremark/models/shared/addresses' + require 'fog/terremark/models/shared/network' + require 'fog/terremark/models/shared/networks' + require 'fog/terremark/models/shared/server' + require 'fog/terremark/models/shared/servers' + require 'fog/terremark/models/shared/task' + require 'fog/terremark/models/shared/tasks' + require 'fog/terremark/models/shared/vdc' + require 'fog/terremark/models/shared/vdcs' require 'fog/terremark/parsers/shared/get_catalog' require 'fog/terremark/parsers/shared/get_catalog_item' require 'fog/terremark/parsers/shared/get_internet_services' diff --git a/lib/fog/vcloud.rb b/lib/fog/vcloud.rb index 796571ee7..ef5174ba9 100644 --- a/lib/fog/vcloud.rb +++ b/lib/fog/vcloud.rb @@ -250,10 +250,6 @@ module Fog class <