Merge "Added endpoint types for intialization of different IdentityClients"

This commit is contained in:
Jenkins 2015-08-05 17:31:08 +00:00 committed by Gerrit Code Review
commit e24546c129
2 changed files with 36 additions and 7 deletions

View File

@ -344,15 +344,25 @@ class Manager(manager.Manager):
def _set_identity_clients(self):
params = {
'service': CONF.identity.catalog_type,
'region': CONF.identity.region,
'endpoint_type': 'adminURL'
'region': CONF.identity.region
}
params.update(self.default_params_with_timeout_values)
params_v2_admin = params.copy()
params_v2_admin['endpoint_type'] = CONF.identity.v2_admin_endpoint_type
# Client uses admin endpoint type of Keystone API v2
self.identity_client = IdentityClient(self.auth_provider,
**params)
**params_v2_admin)
params_v2_public = params.copy()
params_v2_public['endpoint_type'] = (
CONF.identity.v2_public_endpoint_type)
# Client uses public endpoint type of Keystone API v2
self.identity_public_client = IdentityClient(self.auth_provider,
**params_v2_public)
params_v3 = params.copy()
params_v3['endpoint_type'] = CONF.identity.v3_endpoint_type
# Client uses the endpoint type of Keystone API v3
self.identity_v3_client = IdentityV3Client(self.auth_provider,
**params)
**params_v3)
self.endpoints_client = EndPointClient(self.auth_provider,
**params)
self.service_client = ServiceClient(self.auth_provider, **params)

View File

@ -112,11 +112,30 @@ IdentityGroup = [
"services' region name unless they are set explicitly. "
"If no such region is found in the service catalog, the "
"first found one is used."),
cfg.StrOpt('endpoint_type',
cfg.StrOpt('v2_admin_endpoint_type',
default='adminURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The admin endpoint type to use for OpenStack Identity "
"(Keystone) API v2",
deprecated_opts=[cfg.DeprecatedOpt('endpoint_type',
group='identity')]),
cfg.StrOpt('v2_public_endpoint_type',
default='publicURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for the identity service."),
help="The public endpoint type to use for OpenStack Identity "
"(Keystone) API v2",
deprecated_opts=[cfg.DeprecatedOpt('endpoint_type',
group='identity')]),
cfg.StrOpt('v3_endpoint_type',
default='adminURL',
choices=['public', 'admin', 'internal',
'publicURL', 'adminURL', 'internalURL'],
help="The endpoint type to use for OpenStack Identity "
"(Keystone) API v3",
deprecated_opts=[cfg.DeprecatedOpt('endpoint_type',
group='identity')]),
cfg.StrOpt('username',
help="Username to use for Nova API requests."),
cfg.StrOpt('tenant_name',