Add support for supplying custom service type.
Change-Id: I1fc317b7235b54ceea0228dfd71b933f8bbb8855
This commit is contained in:
parent
62a0163caa
commit
6574e7d2a2
@ -33,6 +33,7 @@ class Command(CliffCommand):
|
|||||||
'tenant_id': self.app.options.os_tenant_id,
|
'tenant_id': self.app.options.os_tenant_id,
|
||||||
'tenant_name': self.app.options.os_tenant_name,
|
'tenant_name': self.app.options.os_tenant_name,
|
||||||
'token': self.app.options.os_token,
|
'token': self.app.options.os_token,
|
||||||
|
'service_type': self.app.options.os_service_type,
|
||||||
'region_name': self.app.options.os_region_name,
|
'region_name': self.app.options.os_region_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,6 +59,10 @@ class MonikerShell(App):
|
|||||||
default=os.environ.get('OS_SERVICE_TOKEN'),
|
default=os.environ.get('OS_SERVICE_TOKEN'),
|
||||||
help="Defaults to env[OS_SERVICE_TOKEN]")
|
help="Defaults to env[OS_SERVICE_TOKEN]")
|
||||||
|
|
||||||
|
parser.add_argument('--os-service-type',
|
||||||
|
default=os.environ.get('OS_SERVICE_TYPE', 'dns'),
|
||||||
|
help="Defaults to env[OS_SERVICE_TYPE], or 'dns'")
|
||||||
|
|
||||||
parser.add_argument('--os-region-name',
|
parser.add_argument('--os-region-name',
|
||||||
default=os.environ.get('OS_REGION_NAME'),
|
default=os.environ.get('OS_REGION_NAME'),
|
||||||
help="Defaults to env[OS_REGION_NAME]")
|
help="Defaults to env[OS_REGION_NAME]")
|
||||||
|
@ -26,7 +26,8 @@ class Client(object):
|
|||||||
|
|
||||||
def __init__(self, endpoint=None, auth_url=None, username=None,
|
def __init__(self, endpoint=None, auth_url=None, username=None,
|
||||||
password=None, tenant_id=None, tenant_name=None, token=None,
|
password=None, tenant_id=None, tenant_name=None, token=None,
|
||||||
region_name=None, endpoint_type='publicURL'):
|
region_name=None, service_type='dns',
|
||||||
|
endpoint_type='publicURL'):
|
||||||
"""
|
"""
|
||||||
:param endpoint: Endpoint URL
|
:param endpoint: Endpoint URL
|
||||||
:param auth_url: Keystone auth_url
|
:param auth_url: Keystone auth_url
|
||||||
@ -40,7 +41,8 @@ class Client(object):
|
|||||||
"""
|
"""
|
||||||
if auth_url:
|
if auth_url:
|
||||||
auth = KeystoneAuth(auth_url, username, password, tenant_id,
|
auth = KeystoneAuth(auth_url, username, password, tenant_id,
|
||||||
tenant_name, token, 'dns', endpoint_type)
|
tenant_name, token, service_type,
|
||||||
|
endpoint_type)
|
||||||
self.endpoint = auth.get_url()
|
self.endpoint = auth.get_url()
|
||||||
elif endpoint:
|
elif endpoint:
|
||||||
auth = None
|
auth = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user