From 9b426d718300389a1c9dab976d42d0d822a80a22 Mon Sep 17 00:00:00 2001 From: freeformz Date: Wed, 30 Jun 2010 02:49:38 +0800 Subject: [PATCH] [Vcloud] remove an erroneous line in mock_data and start adding support for Internet Service Node mocking --- lib/fog/vcloud/terremark/ecloud.rb | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/fog/vcloud/terremark/ecloud.rb b/lib/fog/vcloud/terremark/ecloud.rb index bfc13d9e1..3d991bef4 100644 --- a/lib/fog/vcloud/terremark/ecloud.rb +++ b/lib/fog/vcloud/terremark/ecloud.rb @@ -74,7 +74,6 @@ module Fog def self.data( base_url = self.base_url ) @mock_data ||= begin - extension_href = vcloud_data = Fog::Vcloud::Mock.data(base_url) vcloud_data.delete( :versions ) vcloud_data.merge!( :versions => [ { :version => "v0.8b-ext2.3", :login_url => "#{base_url}/login", :supported => true } ] ) @@ -85,20 +84,26 @@ module Fog :href => extension_url + "/publicIp/51", :name => "99.1.2.3", :services => [ - { :id => "71", :port => "80", :protocol => 'HTTP', :enabled => "true", :timeout => "2", :name => 'Web Site', - :description => 'Web Servers', :redirect_url => 'http://fakey.com' }, - { :id => "72", :port => "7000", :protocol => 'HTTP', :enabled => "true", :timeout => "2", :name => 'An SSH Map', - :description => 'SSH 1', :redirect_url => '' } + { :id => "71", :href => extension_url + "/internetService/71", :port => "80", :protocol => 'HTTP', :enabled => "true", + :timeout => "2", :name => 'Web Site', :description => 'Web Servers', :redirect_url => 'http://fakey.com', + :nodes => [ {:ip => "1.2.3.5", :name => "Test Node 1", :port => "80", :enabled => "true", :description => "web 1" } + ] }, + { :id => "72", :href => extension_url + "/internetService/72", :port => "7000", :protocol => 'HTTP', :enabled => "true", + :timeout => "2", :name => 'An SSH Map', :description => 'SSH 1', :redirect_url => '', + :nodes => [ {:ip => "1.2.3.5", :name => "SSH", :port => "22", :enabled => "true", :description => "web ssh" } + ] } ] }, { :id => "52", :href => extension_url + "/publicIp/52", :name => "99.1.2.4", :services => [ - { :id => "73", :port => "80", :protocol => 'HTTP', :enabled => "true", :timeout => "2", :name => 'Web Site', - :description => 'Web Servers', :redirect_url => 'http://fakey.com' }, - { :id => "74", :port => "7000", :protocol => 'HTTP', :enabled => "true", :timeout => "2", :name => 'An SSH Map', - :description => 'SSH 2', :redirect_url => '' } + { :id => "73", :href => extension_url + "/internetService/73", :port => "80", :protocol => 'HTTP', :enabled => "true", + :timeout => "2", :name => 'Web Site', :description => 'Web Servers', :redirect_url => 'http://fakey.com', + :nodes => [] }, + { :id => "74", :href => extension_url + "/internetService/74", :port => "7000", :protocol => 'HTTP', :enabled => "true", + :timeout => "2", :name => 'An SSH Map', :description => 'SSH 2', :redirect_url => '', + :nodes => [] } ] }, { :id => "53",