mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
65a90fd655
Updates to the OpenStack identity tests to they pass in both real and mock modes. Also, fixes an issue in the delete_user_role request where it was expecting 200 instead of 204 (which seems to match the spec and implementation).
17 lines
371 B
Ruby
17 lines
371 B
Ruby
class OpenStack
|
|
|
|
module Identity
|
|
|
|
def self.get_tenant_id
|
|
identity = Fog::Identity[:openstack]
|
|
ENV['OPENSTACK_TENANT_NAME'] || identity.list_tenants.body['tenants'].first['id']
|
|
end
|
|
|
|
def self.get_user_id
|
|
identity = Fog::Identity[:openstack]
|
|
ENV['OPENSTACK_USER_ID'] || identity.list_users.body['users'].first['id']
|
|
end
|
|
|
|
end
|
|
|
|
end
|