Sha256: b93ae1d83be48d1f5dd62648bf953f86ccc244c30704212cf47d49dc5e8206f8
Contents?: true
Size: 1.06 KB
Versions: 17
Compression:
Stored size: 1.06 KB
Contents
module Fog class Vcloud module Terremark class Ecloud class Real basic_request :get_public_ip end class Mock # #Based off of: #http://support.theenterprisecloud.com/kb/default.asp?id=567&Lang=1&SID= # def get_public_ip(public_ip_uri) public_ip_uri = ensure_unparsed(public_ip_uri) if ip = mock_data[:organizations].map { |org| org[:vdcs] }.flatten.map { |vdc| vdc[:public_ips] }.flatten.detect { |ip| ip[:href] == public_ip_uri } xml = Builder::XmlMarkup.new mock_it 200, xml.PublicIp(:xmlns => "urn:tmrk:eCloudExtensions-2.0", :"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance") { xml.Id(ip[:id]) xml.Href(ip[:href]) xml.Name(ip[:name]) }, { 'Content-Type' => 'application/vnd.tmrk.ecloud.publicIp+xml' } else mock_error 200, "401 Unauthorized" end end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems