Add endpoint_type option in client
Added all options of TemplateGenerator in client. Also added default values for insecure and endpoint_type. Change-Id: I938ba640a23adc0a0277fadc806f147bcc88d580
This commit is contained in:
parent
e1d8cb6576
commit
d9c1336d85
|
@ -26,17 +26,10 @@ from flameclient.flame import TemplateGenerator # noqa
|
|||
|
||||
|
||||
class Client(object):
|
||||
def __init__(self, api_version, **kwargs):
|
||||
|
||||
username = kwargs.get('username')
|
||||
password = kwargs.get('password')
|
||||
tenant_name = kwargs.get('tenant_name')
|
||||
auth_url = kwargs.get('auth_url')
|
||||
|
||||
insecure = kwargs.get('insecure')
|
||||
def __init__(self, username, password, tenant_name, auth_url, **kwargs):
|
||||
self.template_generator = TemplateGenerator(username, password,
|
||||
tenant_name, auth_url,
|
||||
insecure)
|
||||
**kwargs)
|
||||
|
||||
def generate(self, include_networks, include_instances, include_volumes):
|
||||
return self.template_generator.generate(include_networks,
|
||||
|
|
|
@ -104,8 +104,8 @@ class Resource(object):
|
|||
|
||||
class TemplateGenerator(object):
|
||||
|
||||
def __init__(self, username, password, tenant_name, auth_url, insecure,
|
||||
endpoint_type, region_name=None):
|
||||
def __init__(self, username, password, tenant_name, auth_url,
|
||||
insecure=False, endpoint_type='publicURL', region_name=None):
|
||||
self.generate_data = False
|
||||
self._setup_templates()
|
||||
self._setup_managers(username, password, tenant_name, auth_url,
|
||||
|
|
Loading…
Reference in New Issue