Skip to content

Commit

Permalink
[terremark_ecloud] add get_ip_address
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Feb 14, 2011
1 parent e2a755b commit 5487db4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/fog/compute/parsers/terremark_ecloud/get_ip_address.rb
@@ -0,0 +1,23 @@
module Fog
module Parsers
module TerremarkEcloud
module Compute

class GetIpAddress < Fog::Parsers::Base

def reset
@response = {}
end

def end_element(name)
case name
when 'Id', 'Href', 'Name', 'RnatAddress', 'Server', 'Status'
@response[name] = @value
end
end

end
end
end
end
end
19 changes: 19 additions & 0 deletions lib/fog/compute/requests/terremark_ecloud/get_ip_address.rb
@@ -0,0 +1,19 @@
module Fog
module TerremarkEcloud
class Compute
class Real

require 'fog/compute/parsers/terremark_ecloud/get_ip_address'

def get_ip_address(href)
request({
:href => href,
:idempotent => true,
:parser => Fog::Parsers::TerremarkEcloud::Compute::GetIpAddress.new
})
end

end
end
end
end
1 change: 1 addition & 0 deletions lib/fog/compute/terremark_ecloud.rb
Expand Up @@ -10,6 +10,7 @@ class Compute < Fog::Service
request_path 'fog/compute/requests/terremark_ecloud'
request :get_catalog
request :get_catalog_item
request :get_ip_address
request :get_ip_addresses
request :get_network
request :get_organization
Expand Down

0 comments on commit 5487db4

Please sign in to comment.