diff --git a/lib/aviator/openstack/identity/v2/admin/delete_user.rb b/lib/aviator/openstack/identity/v2/admin/delete_user.rb new file mode 100644 index 0000000..0a21077 --- /dev/null +++ b/lib/aviator/openstack/identity/v2/admin/delete_user.rb @@ -0,0 +1,39 @@ +module Aviator + + define_request :delete_user do + + meta :provider, :openstack + meta :service, :identity + meta :api_version, :v2 + meta :endpoint_type, :admin + + link 'documentation', + 'http://docs.openstack.org/api/openstack-identity-service/2.0/content/DELETE_deleteUser_v2.0_users__userId__.html' + + param :id, required: true + + + def headers + h = {} + + unless self.anonymous? + h['X-Auth-Token'] = session_data[:access][:token][:id] + end + + h + end + + + def http_method + :delete + end + + + def url + service_spec = session_data[:access][:serviceCatalog].find{|s| s[:type] == service.to_s } + "#{ service_spec[:endpoints][0][:adminURL] }/users/#{ params[:id]}" + end + + end + +end diff --git a/test/aviator/openstack/identity/v2/admin/delete_user_test.rb b/test/aviator/openstack/identity/v2/admin/delete_user_test.rb new file mode 100644 index 0000000..679a2a3 --- /dev/null +++ b/test/aviator/openstack/identity/v2/admin/delete_user_test.rb @@ -0,0 +1,127 @@ +require 'test_helper' + +class Aviator::Test + + describe 'aviator/openstack/identity/v2/admin/delete_user' do + + def create_request(session_data = get_session_data) + klass.new(session_data) do |p| + p[:id] = 'it does not matter for this usage' + end + 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', 'admin', 'delete_user.rb') + end + + + def session + unless @session + @session = Aviator::Session.new( + config_file: Environment.path, + environment: 'openstack_admin' + ) + @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 + klass.body?.must_equal false + create_request.body?.must_equal false + end + + + validate_attr :endpoint_type do + klass.endpoint_type.must_equal :admin + end + + + validate_attr :headers do + session_data = get_session_data + + headers = { 'X-Auth-Token' => session_data[:access][:token][:id] } + + request = create_request(session_data) + + request.headers.must_equal headers + end + + + validate_attr :http_method do + create_request.http_method.must_equal :delete + end + + + validate_attr :required_params do + klass.required_params.must_equal [:id] + end + + + validate_attr :url do + session_data = get_session_data + service_spec = session_data[:access][:serviceCatalog].find { |s| s[:type] == 'identity' } + user_id = 'it does not matter for this test' + url = "#{ service_spec[:endpoints][0][:adminURL] }/users/#{ user_id }" + + request = klass.new(session_data) do |p| + p[:id] = user_id + end + + request.url.must_equal url + end + + + validate_response 'valid params are provided' do + # must be hardcoded so as not to inadvertently delete random user + # in case the corresponding cassette is deleted + user_id = 'cf086a74f0854398a2a8f6bbee2029e8' + + response = session.identity_service.request :delete_user do |params| + params[:id] = user_id + end + + response.status.must_equal 204 + response.body.must_be_empty + response.headers.wont_be_nil + end + + + validate_response 'invalid params are provided' do + user_id = 'bogususerid' + + response = session.identity_service.request :delete_user do |params| + params[:id] = user_id + end + + response.status.must_equal 404 + response.body.wont_be_nil + response.headers.wont_be_nil + end + + end + +end diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_invalid_params_are_provided.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_invalid_params_are_provided.yml new file mode 100644 index 0000000..07c0e01 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_invalid_params_are_provided.yml @@ -0,0 +1,98 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:14 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:14.985167", + "expires": "2013-09-18T07:05:14Z", "id": "984aa478d26a41bd88f2d58080c07f2f", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +- request: + method: delete + uri: http://127.0.0.1:35357/v2.0/users/bogususerid + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + X-Auth-Token: + - 984aa478d26a41bd88f2d58080c07f2f + response: + status: + code: 404 + message: + headers: + vary: + - X-Auth-Token + content-type: + - application/json + content-length: + - '93' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"error": {"message": "Could not find user: bogususerid", "code": + 404, "title": "Not Found"}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_valid_params_are_provided.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_valid_params_are_provided.yml new file mode 100644 index 0000000..0acb666 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/leads_to_a_valid_response_when_valid_params_are_provided.yml @@ -0,0 +1,95 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:15.707799", + "expires": "2013-09-18T07:05:15Z", "id": "cbb91c01afdf489a9027ab9bac80109b", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +- request: + method: delete + uri: http://127.0.0.1:35357/v2.0/users/cf086a74f0854398a2a8f6bbee2029e8 + body: + encoding: US-ASCII + string: '' + headers: + Content-Type: + - application/json + User-Agent: + - Faraday v0.8.8 + X-Auth-Token: + - cbb91c01afdf489a9027ab9bac80109b + response: + status: + code: 204 + message: + headers: + vary: + - X-Auth-Token + content-length: + - '0' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: '' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_body_.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_body_.yml new file mode 100644 index 0000000..3eb1e73 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_body_.yml @@ -0,0 +1,64 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:15.426315", + "expires": "2013-09-18T07:05:15Z", "id": "d618aee2b6934796b4685228ce2c30c7", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_headers_.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_headers_.yml new file mode 100644 index 0000000..7417b6e --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_headers_.yml @@ -0,0 +1,64 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:15.561988", + "expires": "2013-09-18T07:05:15Z", "id": "5dfa058a941e492ba55193ae29506c0b", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_http_method_.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_http_method_.yml new file mode 100644 index 0000000..e88cf92 --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_http_method_.yml @@ -0,0 +1,64 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:15.294327", + "expires": "2013-09-18T07:05:15Z", "id": "99ff7d2983b14abca76dfca14b741723", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0 diff --git a/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_url_.yml b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_url_.yml new file mode 100644 index 0000000..a53549e --- /dev/null +++ b/test/cassettes/openstack/identity/v2/admin/delete_user/returns_the_correct_value_for_url_.yml @@ -0,0 +1,64 @@ +--- +http_interactions: +- request: + method: post + uri: :5000/v2.0/tokens + body: + encoding: UTF-8 + string: ! '{"auth":{"passwordCredentials":{"username":"","password":""},"tenantName":""}}' + 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: + - '2573' + date: + - Tue, 17 Sep 2013 07:05:15 GMT + connection: + - close + body: + encoding: US-ASCII + string: ! '{"access": {"token": {"issued_at": "2013-09-17T07:05:15.163199", + "expires": "2013-09-18T07:05:15Z", "id": "cf1aa53e99df4ec9ad75ad0d1b6e25a9", + "tenant": {"description": null, "enabled": true, "id": "13aad0de723c43e785b8b7ae7e5ea07a", + "name": ""}}, "serviceCatalog": [{"endpoints": + [{"adminURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "642d4e6922fa4e1481f7fa433033fd3d", "publicURL": "http://127.0.0.1:8774/v2/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:3333", "region": "RegionOne", "internalURL": "http://127.0.0.1:3333", + "id": "5ef03d0ccd4f4af0ab8ee0f03c93de34", "publicURL": "http://127.0.0.1:3333"}], + "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:9292", "region": "RegionOne", "internalURL": "http://127.0.0.1:9292", + "id": "059be9f9b0cf4e3ea964f6af51462bf1", "publicURL": "http://127.0.0.1:9292"}], + "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": + "http://127.0.0.1:8777", "region": "RegionOne", "internalURL": "http://127.0.0.1:8777", + "id": "4399ae0940324602a658c04d0223ebb0", "publicURL": "http://127.0.0.1:8777"}], + "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "region": "RegionOne", "internalURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a", + "id": "6f27ad7b8e6c4685b37f7ee3c0423302", "publicURL": "http://127.0.0.1:8776/v1/13aad0de723c43e785b8b7ae7e5ea07a"}], + "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": + [{"adminURL": "http://127.0.0.1:8773/services/Admin", "region": "RegionOne", + "internalURL": "http://127.0.0.1:8773/services/Cloud", "id": "041ec3c1415d40a2994ed41b76ada096", + "publicURL": "http://127.0.0.1:8773/services/Cloud"}], "endpoints_links": + [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://127.0.0.1:35357/v2.0", + "region": "RegionOne", "internalURL": "http://127.0.0.1:5000/v2.0", "id": + "011a519395ab4c4b89adc9ae45f891bd", "publicURL": "http://127.0.0.1:5000/v2.0"}], + "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": + "", "roles_links": [], "id": "8d58ffca91be4595888355f9a31bbe8a", + "roles": [{"name": "admin"}], "name": ""}, "metadata": + {"is_admin": 0, "roles": ["8f43c676ee2a49f3b1c3d52987b7f544"]}}}' + http_version: + recorded_at: Tue, 17 Sep 2013 07:05:17 GMT +recorded_with: VCR 2.5.0