From 28bec19e7ac3a8fbf8aea3371f05344b48a70e14 Mon Sep 17 00:00:00 2001 From: Alvin Garcia Date: Mon, 9 Sep 2013 18:14:34 +0800 Subject: [PATCH] [feature #25] Add root request for identity --- .../openstack/identity/v2/public/root.rb | 34 ++++++ .../openstack/identity/v2/public/root_test.rb | 106 ++++++++++++++++++ ...sponse_when_no_parameters_are_provided.yml | 105 +++++++++++++++++ .../returns_the_correct_value_for_body_.yml | 66 +++++++++++ ...returns_the_correct_value_for_headers_.yml | 66 +++++++++++ ...rns_the_correct_value_for_http_method_.yml | 66 +++++++++++ .../returns_the_correct_value_for_url_.yml | 66 +++++++++++ 7 files changed, 509 insertions(+) create mode 100644 lib/aviator/openstack/identity/v2/public/root.rb create mode 100644 test/aviator/openstack/identity/v2/public/root_test.rb create mode 100644 test/cassettes/openstack/identity/v2/public/root/leads_to_a_valid_response_when_no_parameters_are_provided.yml create mode 100644 test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_body_.yml create mode 100644 test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_headers_.yml create mode 100644 test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_http_method_.yml create mode 100644 test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_url_.yml diff --git a/lib/aviator/openstack/identity/v2/public/root.rb b/lib/aviator/openstack/identity/v2/public/root.rb new file mode 100644 index 0000000..b75a790 --- /dev/null +++ b/lib/aviator/openstack/identity/v2/public/root.rb @@ -0,0 +1,34 @@ +module Aviator + + define_request :root do + + meta :provider, :openstack + meta :service, :identity + meta :api_version, :v2 + meta :endpoint_type, :public + + def headers + h = {} + + unless self.anonymous? + h['X-Auth-Token'] = session_data[:access][:token][:id] + end + + h + end + + + def http_method + :get + end + + + def url + service_spec = session_data[:access][:serviceCatalog].find{|s| s[:type] == service.to_s } + uri = URI(service_spec[:endpoints][0][:publicURL]) + "#{ uri.scheme }://#{ uri.host }:#{ uri.port.to_s }/v2.0/" + end + + end + +end diff --git a/test/aviator/openstack/identity/v2/public/root_test.rb b/test/aviator/openstack/identity/v2/public/root_test.rb new file mode 100644 index 0000000..9cc1ee6 --- /dev/null +++ b/test/aviator/openstack/identity/v2/public/root_test.rb @@ -0,0 +1,106 @@ +require 'test_helper' + +class Aviator::Test + + describe 'aviator/openstack/identity/v2/public/root' do + + def create_request(session_data = get_session_data) + klass.new(session_data) + end + + + def get_session_data + session.send :auth_info + end + + + def helper + Aviator::Test::RequestHelper + end + + + def klass + @klass ||= helper.load_request('openstack', 'identity', 'v2', 'public', 'root.rb') + end + + + def session + unless @session + @session = Aviator::Session.new( + config_file: Environment.path, + environment: 'openstack_member' + ) + @session.authenticate + end + + @session + end + + + validate_attr :anonymous? do + klass.anonymous?.must_equal false + end + + + validate_attr :api_version do + klass.api_version.must_equal :v2 + end + + + validate_attr :body do + request = create_request + + klass.body?.must_equal false + request.body?.must_equal false + end + + + validate_attr :endpoint_type do + klass.endpoint_type.must_equal :public + end + + + validate_attr :headers do + headers = { 'X-Auth-Token' => get_session_data[:access][:token][:id] } + + request = create_request + + request.headers.must_equal headers + end + + + validate_attr :http_method do + create_request.http_method.must_equal :get + end + + + validate_attr :optional_params do + klass.optional_params.must_equal [] + end + + + validate_attr :required_params do + klass.required_params.must_equal [] + end + + + validate_attr :url do + service_spec = get_session_data[:access][:serviceCatalog].find{|s| s[:type] == 'identity' } + uri = URI(service_spec[:endpoints][0][:publicURL]) + url = "#{ uri.scheme }://#{ uri.host }:#{ uri.port.to_s }/v2.0/" + + create_request.url.must_equal url + end + + + + validate_response 'no parameters are provided' do + response = session.identity_service.request :root + + response.status.must_equal 200 + response.body.wont_be_nil + end + + end + +end diff --git a/test/cassettes/openstack/identity/v2/public/root/leads_to_a_valid_response_when_no_parameters_are_provided.yml b/test/cassettes/openstack/identity/v2/public/root/leads_to_a_valid_response_when_no_parameters_are_provided.yml new file mode 100644 index 0000000..51db7ba --- /dev/null +++ b/test/cassettes/openstack/identity/v2/public/root/leads_to_a_valid_response_when_no_parameters_are_provided.yml @@ -0,0 +1,105 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":"123"},"tenantName":" + project"}}' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '2641' + date: + - Mon, 09 Sep 2013 10:08:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-09T10:08:15.221773", + "expires": "2013-09-10T10:08:15Z", "id": "af36a74f61354db3be62e1470d2b3ee3", + "tenant": {"description": "", "enabled": true, "id": "74380c5a11c84d1dacbdc0621cf43c45", + "name": " project"}}, "serviceCatalog": [{"endpoints": + [{"URL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "id": "5c217f7dabfc4405b2f19fb9ce36633d", "publicURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"URL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "2cc9517596534387a120fc6090be0529", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"URL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "73a8f755f9504369bae5487e95baa8d1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"URL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "1bdf9a67f08d4ad1bb51037e6b8522ba", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"URL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "id": "24601679ac7d41c697130686e9d3fce2", "publicURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"URL": "http://127.0.0.1:8773/services/Admin", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", + "id": "3843111b94ec47cc9d306291e3bc1051", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], + "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"URL": + "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", + "id": "5f9312cbe04c4034b3aca6cf83f96160", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "3357724510a749838714df36db5bdc03", + "roles": [{"name": "__"}, {"name": "project_manager"}], + "name": ""}, "metadata": {"is_": + 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "45bb4b03d99a43c1bc4e48d5e1ab9d72"]}}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:15 GMT +- request: + method: get + uri: http://127.0.0.1:5000/v2.0/ + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + X-Auth-Token: + - af36a74f61354db3be62e1470d2b3ee3 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '612' + date: + - Mon, 09 Sep 2013 10:08:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"version": {"status": "stable", "updated": "2013-03-06T00:00:00Z", + "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, + {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], + "id": "v2.0", "links": [{"href": ":5000/v2.0/", + "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", + "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", + "type": "application/pdf", "rel": "describedby"}]}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:15 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_body_.yml b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_body_.yml new file mode 100644 index 0000000..bb666b5 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_body_.yml @@ -0,0 +1,66 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":"123"},"tenantName":" + project"}}' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '2641' + date: + - Mon, 09 Sep 2013 10:08:14 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-09T10:08:14.592160", + "expires": "2013-09-10T10:08:14Z", "id": "430e892745b647ecaab526e7377f5ad5", + "tenant": {"description": "", "enabled": true, "id": "74380c5a11c84d1dacbdc0621cf43c45", + "name": " project"}}, "serviceCatalog": [{"endpoints": + [{"URL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "id": "5c217f7dabfc4405b2f19fb9ce36633d", "publicURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"URL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "2cc9517596534387a120fc6090be0529", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"URL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "73a8f755f9504369bae5487e95baa8d1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"URL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "1bdf9a67f08d4ad1bb51037e6b8522ba", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"URL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "id": "24601679ac7d41c697130686e9d3fce2", "publicURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"URL": "http://127.0.0.1:8773/services/Admin", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", + "id": "3843111b94ec47cc9d306291e3bc1051", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], + "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"URL": + "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", + "id": "5f9312cbe04c4034b3aca6cf83f96160", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "3357724510a749838714df36db5bdc03", + "roles": [{"name": "__"}, {"name": "project_manager"}], + "name": ""}, "metadata": {"is_": + 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "45bb4b03d99a43c1bc4e48d5e1ab9d72"]}}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:14 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_headers_.yml b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_headers_.yml new file mode 100644 index 0000000..4a25b6b --- /dev/null +++ b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_headers_.yml @@ -0,0 +1,66 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":"123"},"tenantName":" + project"}}' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '2641' + date: + - Mon, 09 Sep 2013 10:08:14 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-09T10:08:14.924846", + "expires": "2013-09-10T10:08:14Z", "id": "e51ebe07efe847f0b5d60ba5caaf3009", + "tenant": {"description": "", "enabled": true, "id": "74380c5a11c84d1dacbdc0621cf43c45", + "name": " project"}}, "serviceCatalog": [{"endpoints": + [{"URL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "id": "5c217f7dabfc4405b2f19fb9ce36633d", "publicURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"URL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "2cc9517596534387a120fc6090be0529", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"URL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "73a8f755f9504369bae5487e95baa8d1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"URL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "1bdf9a67f08d4ad1bb51037e6b8522ba", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"URL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "id": "24601679ac7d41c697130686e9d3fce2", "publicURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"URL": "http://127.0.0.1:8773/services/Admin", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", + "id": "3843111b94ec47cc9d306291e3bc1051", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], + "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"URL": + "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", + "id": "5f9312cbe04c4034b3aca6cf83f96160", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "3357724510a749838714df36db5bdc03", + "roles": [{"name": "__"}, {"name": "project_manager"}], + "name": ""}, "metadata": {"is_": + 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "45bb4b03d99a43c1bc4e48d5e1ab9d72"]}}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:15 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_http_method_.yml b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_http_method_.yml new file mode 100644 index 0000000..b3959a1 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_http_method_.yml @@ -0,0 +1,66 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":"123"},"tenantName":" + project"}}' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '2641' + date: + - Mon, 09 Sep 2013 10:08:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-09T10:08:15.074591", + "expires": "2013-09-10T10:08:15Z", "id": "c19f7ed5835343eba8f07ed00c87dab9", + "tenant": {"description": "", "enabled": true, "id": "74380c5a11c84d1dacbdc0621cf43c45", + "name": " project"}}, "serviceCatalog": [{"endpoints": + [{"URL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "id": "5c217f7dabfc4405b2f19fb9ce36633d", "publicURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"URL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "2cc9517596534387a120fc6090be0529", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"URL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "73a8f755f9504369bae5487e95baa8d1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"URL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "1bdf9a67f08d4ad1bb51037e6b8522ba", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"URL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "id": "24601679ac7d41c697130686e9d3fce2", "publicURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"URL": "http://127.0.0.1:8773/services/Admin", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", + "id": "3843111b94ec47cc9d306291e3bc1051", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], + "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"URL": + "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", + "id": "5f9312cbe04c4034b3aca6cf83f96160", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "3357724510a749838714df36db5bdc03", + "roles": [{"name": "__"}, {"name": "project_manager"}], + "name": ""}, "metadata": {"is_": + 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "45bb4b03d99a43c1bc4e48d5e1ab9d72"]}}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:15 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_url_.yml b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_url_.yml new file mode 100644 index 0000000..da91a96 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/public/root/returns_the_correct_value_for_url_.yml @@ -0,0 +1,66 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":"123"},"tenantName":" + project"}}' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + response: + status: + code: 200 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '2641' + date: + - Mon, 09 Sep 2013 10:08:14 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-09T10:08:14.753557", + "expires": "2013-09-10T10:08:14Z", "id": "9f12dfe89b6e434dacc0abd95bdf3b8e", + "tenant": {"description": "", "enabled": true, "id": "74380c5a11c84d1dacbdc0621cf43c45", + "name": " project"}}, "serviceCatalog": [{"endpoints": + [{"URL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45", + "id": "5c217f7dabfc4405b2f19fb9ce36633d", "publicURL": "http://127.0.0.1:8774/v2/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"URL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "2cc9517596534387a120fc6090be0529", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"URL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "73a8f755f9504369bae5487e95baa8d1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"URL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "1bdf9a67f08d4ad1bb51037e6b8522ba", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"URL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45", + "id": "24601679ac7d41c697130686e9d3fce2", "publicURL": "http://127.0.0.1:8776/v1/74380c5a11c84d1dacbdc0621cf43c45"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"URL": "http://127.0.0.1:8773/services/Admin", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8773/services/Cloud", + "id": "3843111b94ec47cc9d306291e3bc1051", "publicURL": "http://127.0.0.1:8773/services/Cloud"}], + "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"URL": + "http://127.0.0.1:35357/v2.0", "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", + "id": "5f9312cbe04c4034b3aca6cf83f96160", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "3357724510a749838714df36db5bdc03", + "roles": [{"name": "__"}, {"name": "project_manager"}], + "name": ""}, "metadata": {"is_": + 0, "roles": ["9fe2ff9ee4384b1894a90878d3e92bab", "45bb4b03d99a43c1bc4e48d5e1ab9d72"]}}}' + http_version: + recorded_at: Mon, 09 Sep 2013 10:08:14 GMT +recorded_with: VCR 2.5.0