Permalink
Browse files

remove leftover TerremarkEcloud stuff

  • Loading branch information...
1 parent def3be4 commit 0d1007d233f0d291aacc58910016e5289205bcec @geemus geemus committed Feb 25, 2011
View
@@ -34,9 +34,6 @@ def self.new(attributes)
when 'Slicehost'
require 'fog/compute/slicehost'
Fog::Slicehost::Compute.new(attributes)
- when 'TerremarkEcloud'
- require 'fog/compute/terremark_ecloud'
- Fog::TerremarkEcloud::Compute.new(attributes)
else
raise ArgumentError.new("#{provider} is not a recognized compute provider")
end
@@ -1,47 +0,0 @@
-Shindo.tests('TerremarkEcloud::Compute | catalog requests', ['terremarkecloud']) do
-
- @catalog_format = {
- 'name' => String,
- 'href' => String,
- 'CatalogItems' => [{
- 'href' => String,
- 'name' => String,
- 'type' => String
- }]
- }
-
- @catalog_item_format = {
- 'name' => String,
- 'Entity' => {
- 'href' => String,
- 'name' => String,
- 'type' => String
- },
- 'href' => String,
- 'Link' => {
- 'href' => String,
- 'name' => String,
- 'rel' => String,
- 'type' => String
- },
- 'Property' => {
- 'LicensingCost' => String
- },
- 'type' => String,
- }
-
- tests('success') do
-
- tests("#get_catalog").formats(@catalog_format) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].get_catalog(TerremarkEcloud::Compute.preferred_catalog['href']).body
- end
-
- tests("#get_catalog_item").formats(@catalog_item_format) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].get_catalog_item(TerremarkEcloud::Compute.preferred_catalog_item['href']).body
- end
-
- end
-
-end
@@ -1,45 +0,0 @@
-class TerremarkEcloud
-
- module Compute
-
- def self.vdc_from_list(vdc_list)
- if matcher = ENV['VDC_NAME_MATCHER']
- vdc_list.detect {|v| v['name'] =~ /#{Regexp.escape(matcher)}/ }
- else
- vdc_list.first
- end
- end
-
- def self.preferred_vdc
- @preferred_vdc ||= begin
- href = vdc_from_list(TerremarkEcloud[:compute].get_organization.body['Link'])['href']
- TerremarkEcloud[:compute].get_vdc(href).body
- end
- end
-
- def self.preferred_catalog
- @preferred_catalog ||= begin
- catalog_href = preferred_vdc['Link'].detect {|link| link['type'] == 'application/vnd.vmware.vcloud.catalog+xml' }['href']
- TerremarkEcloud[:compute].get_catalog(catalog_href).body
- end
- end
-
- def self.preferred_catalog_item
- @preferred_catalog_item ||= begin
- catalog_item = preferred_catalog['CatalogItems'].detect do |item|
- item['name'] == 'Ubuntu Server 10.04 x32'
- end
- TerremarkEcloud[:compute].get_catalog_item(catalog_item['href']).body
- end
- end
-
- def self.preferred_network
- @preferred_network ||= begin
- network_href = preferred_vdc['AvailableNetworks'].first['href']
- TerremarkEcloud[:compute].get_network(network_href).body
- end
- end
-
- end
-
-end
@@ -1,30 +0,0 @@
-Shindo.tests('TerremarkEcloud::Compute | network requests', ['terremarkecloud']) do
-
- @network_format = {
- 'Configuration' => {
- 'Gateway' => String,
- 'Netmask' => String
- },
- 'Features' => {
- 'FenceMode' => String
- },
- 'href' => String,
- 'Link' => {
- 'href' => String,
- 'name' => String,
- 'rel' => String,
- 'type' => String
- },
- 'name' => String
- }
-
- tests('success') do
-
- tests("#get_network").formats(@network_format) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].get_network(TerremarkEcloud::Compute.preferred_network['href']).body
- end
-
- end
-
-end
@@ -1,28 +0,0 @@
-Shindo.tests('TerremarkEcloud::Compute | organization requests', ['terremarkecloud']) do
-
- @organization_format = {
- 'name' => String,
- 'href' => String,
- 'Link' => [{
- 'href' => String,
- 'name' => String,
- 'rel' => String,
- 'type' => String
- }],
- }
-
- tests('success') do
-
- tests("#login (get_organizations)").formats({'OrgList' => [{'href' => String, 'name' => String, 'type' => String}]}) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].login.body
- end
-
- tests("#get_organization").formats(@organization_format) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].get_organization.body
- end
-
- end
-
-end
@@ -1,39 +0,0 @@
-Shindo.tests('TerremarkEcloud::Compute | task requests', ['terremarkecloud']) do
-
- @task_format = {
- 'endTime' => Fog::Nullable::Time,
- 'href' => String,
- 'Owner' => {
- 'href' => String,
- 'name' => String,
- 'type' => String
- },
- 'Result' => {
- 'href' => String,
- 'name' => String,
- 'type' => String
- },
- 'type' => String,
- 'startTime' => Time,
- 'status' => String
- }
-
- tests('success') do
-
- @task_list_href = TerremarkEcloud[:compute].get_organization.body['Link'].detect {|link| link['type'] == 'application/vnd.vmware.vcloud.tasksList+xml'}['href']
-
- tests("#get_task_list").formats({'Tasks' => [@task_format]}) do
- pending if Fog.mocking?
- data = TerremarkEcloud[:compute].get_task_list(@task_list_href).body
- @task_href = data['Tasks'].first['href']
- data
- end
-
- tests("#get_task").formats(@task_format) do
- pending if Fog.mocking?
- TerremarkEcloud[:compute].get_task(@task_href).body
- end
-
- end
-
-end
@@ -1,60 +0,0 @@
-Shindo.tests('TerremarkEcloud::Compute | vdc requests', ['terremarkecloud']) do
-
- @vdc_format = {
- 'AvailableNetworks' => [{
- 'href' => String,
- 'name' => String,
- 'type' => String
- }],
- 'ComputeCapacity' => {
- 'Cpu' => {
- 'Allocated' => Integer,
- 'Units' => String
- },
- 'DeployedVmsQuota' => {
- 'Limit' => Integer,
- 'Used' => Integer
- },
- 'InstantiatedVmsQuota' => {
- 'Limit' => Integer,
- 'Used' => Integer
- },
- 'Memory' => {
- 'Allocated' => Integer,
- 'Units' => String
- }
- },
- 'Description' => Fog::Nullable::String,
- 'href' => String,
- 'Link' => [{
- 'href' => String,
- 'name' => String,
- 'rel' => String,
- 'type' => String
- }],
- 'name' => String,
- 'ResourceEntities' => [{
- 'href' => String,
- 'name' => String,
- 'type' => String
- }],
- 'StorageCapacity' => {
- 'Allocated' => Integer,
- 'Units' => String,
- 'Used' => Integer
- }
- }
-
- tests('success') do
-
- tests("#get_vdc").formats(@vdc_format) do
- pending if Fog.mocking?
- vdc = TerremarkEcloud::Compute.preferred_vdc
- vdc_href = vdc['href']
-
- TerremarkEcloud[:compute].get_vdc(vdc_href).body
- end
-
- end
-
-end

0 comments on commit 0d1007d

Please sign in to comment.