This commit is contained in:
Jesse Andrews
2011-12-18 21:31:23 -08:00
parent 74bdba290b
commit 604b748b51
2 changed files with 10 additions and 7 deletions

View File

@@ -164,11 +164,11 @@ class OpenStackIdentityShell(object):
"env[OS_AUTH_URL")
self.cs = self.get_api_class(options.version)(username=args.username,
tenant_name=args.tenant_name,
tenant_id=args.tenant_id,
password=args.password,
auth_url=args.auth_url,
region_name=args.region_name)
tenant_name=args.tenant_name,
tenant_id=args.tenant_id,
password=args.password,
auth_url=args.auth_url,
region_name=args.region_name)
try:
self.cs.authenticate()

View File

@@ -35,7 +35,8 @@ class Client(client.HTTPClient):
:param string token: Token for authentication. (optional)
:param string tenant_name: Tenant id. (optional)
:param string tenant_id: Tenant name. (optional)
:param string project_id: Converted to tenant name. (deprecated - to be removed in essex)
:param string project_id: Converted to tenant name. (deprecated -
to be removed in essex)
:param string auth_url: Keystone service endpoint for authorization.
:param string region_name: Name of a region to select when choosing an
endpoint from the service catalog.
@@ -72,7 +73,9 @@ class Client(client.HTTPClient):
# get away with lazy auth. Otherwise auth immediately.
if endpoint is None:
self.authenticate()
self.management_url = self.service_catalog.url_for(endpoint_type='adminURL')
self.management_url = self.service_catalog.url_for(
service_type='identity',
endpoint_type='adminURL')
else:
self.management_url = endpoint