Sha256: dfd14bc75d78f0e62f1184583c61c0ef057aa926b817ec5469c7c8504f24bea8
Contents?: true
Size: 1.32 KB
Versions: 17
Compression:
Stored size: 1.32 KB
Contents
module Fog class Vcloud module Terremark class Ecloud class Real basic_request :get_nodes end class Mock # # Based off of: # http://support.theenterprisecloud.com/kb/default.asp?id=637&Lang=1&SID= # def get_nodes(nodes_uri) nodes_uri = ensure_unparsed(nodes_uri) service_uri = nodes_uri.gsub('/nodeServices','') ip, service = mock_ip_and_service_from_service_url(service_uri) if ip and service xml = Builder::XmlMarkup.new mock_it 200, xml.NodeServices(ecloud_xmlns) { service[:nodes].each do |node| xml.NodeService { xml.Id(node[:id]) xml.Href(node[:href]) xml.Name(node[:name]) xml.IpAddress(node[:ip_address]) xml.Port(node[:port]) xml.Enabled(node[:enabled]) xml.Description(node[:description]) } end }, { 'Content-Type' => 'application/vnd.tmrk.ecloud.nodeService+xml' } else mock_error 200, "401 Unauthorized" end end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems