mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[terremark] fix leftover post-rebase issues
This commit is contained in:
parent
a0ac71b551
commit
db406ab85f
5 changed files with 27 additions and 22 deletions
|
@ -19,7 +19,9 @@ module Fog
|
|||
new_result = attributes.delete('Result')
|
||||
super
|
||||
@owner = connection.parse(new_owner)
|
||||
@result = connection.parse(new_result)
|
||||
if new_result
|
||||
@result = connection.parse(new_result)
|
||||
end
|
||||
end
|
||||
|
||||
def ready?
|
||||
|
|
|
@ -1,28 +1,30 @@
|
|||
module Fog
|
||||
module Terremark
|
||||
class Real
|
||||
module Shared
|
||||
module Real
|
||||
|
||||
# Destroy a public ip
|
||||
#
|
||||
# ==== Parameters
|
||||
# * public_ip_id<~Integer> - Id of public ip to destroy
|
||||
#
|
||||
def delete_public_ip(public_ip_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
:method => 'DELETE',
|
||||
:path => "publicIps/#{public_ip_id}"
|
||||
)
|
||||
end
|
||||
|
||||
# Destroy a public ip
|
||||
#
|
||||
# ==== Parameters
|
||||
# * public_ip_id<~Integer> - Id of public ip to destroy
|
||||
#
|
||||
def delete_public_ip(public_ip_id)
|
||||
request(
|
||||
:expects => 200,
|
||||
:method => 'DELETE',
|
||||
:path => "publicIps/#{public_ip_id}"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
module Mock
|
||||
|
||||
class Mock
|
||||
def delete_public_ip(public_ip_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
def delete_public_ip(public_ip_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module Fog
|
||||
module Terremark
|
||||
module Shared
|
||||
class Real
|
||||
module Real
|
||||
|
||||
# Instatiate a vapp template
|
||||
#
|
||||
|
@ -60,14 +60,14 @@ DATA
|
|||
:expects => 200,
|
||||
:headers => { 'Content-Type' => 'application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml' },
|
||||
:method => 'POST',
|
||||
:parser => Fog::Parsers::Terremark::InstantiateVappTemplate.new,
|
||||
:parser => Fog::Parsers::Terremark::Shared::InstantiateVappTemplate.new,
|
||||
:path => "vdc/#{options['vdc_id']}/action/instantiatevAppTemplate"
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class Mock
|
||||
module Mock
|
||||
|
||||
def instatiate_vapp_template(vapp_template_id)
|
||||
raise MockNotImplemented.new("Contributions welcome!")
|
||||
|
|
|
@ -108,6 +108,7 @@ module Fog
|
|||
require 'fog/terremark/requests/shared/add_node_service'
|
||||
require 'fog/terremark/requests/shared/create_internet_service'
|
||||
require 'fog/terremark/requests/shared/delete_internet_service'
|
||||
require 'fog/terremark/requests/shared/delete_public_ip'
|
||||
require 'fog/terremark/requests/shared/delete_node_service'
|
||||
require 'fog/terremark/requests/shared/delete_vapp'
|
||||
require 'fog/terremark/requests/shared/deploy_vapp'
|
||||
|
|
|
@ -75,7 +75,7 @@ module Fog
|
|||
@default_public_ip_id ||= begin
|
||||
ips = get_public_ips(default_vdc_id).body['PublicIpAddresses']
|
||||
if ips.length == 1
|
||||
ips.first['Href'].split('/').last.to_i
|
||||
ips.first['href'].split('/').last.to_i
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue