Transmit all auth related vars from cli to inner methods
We need cert, project_domain_id, project_domain_name, user_domain_id, user_domain_name arguments to constract SessionClient in proper way. These variables will be used in further patches Change-Id: I44416de7f4dc18916aecb6884158b416e696227e
This commit is contained in:
parent
77048cc27e
commit
2163e6661a
|
@ -685,6 +685,7 @@ def _construct_http_client(api_version=None,
|
|||
auth_token=None,
|
||||
auth_url=None,
|
||||
cacert=None,
|
||||
cert=None,
|
||||
connection_pool=False,
|
||||
endpoint_override=None,
|
||||
endpoint_type='publicURL',
|
||||
|
@ -692,6 +693,8 @@ def _construct_http_client(api_version=None,
|
|||
insecure=False,
|
||||
os_cache=False,
|
||||
password=None,
|
||||
project_domain_id=None,
|
||||
project_domain_name=None,
|
||||
project_id=None,
|
||||
project_name=None,
|
||||
region_name=None,
|
||||
|
@ -701,6 +704,8 @@ def _construct_http_client(api_version=None,
|
|||
timeout=None,
|
||||
timings=False,
|
||||
user_agent='python-novaclient',
|
||||
user_domain_id=None,
|
||||
user_domain_name=None,
|
||||
user_id=None,
|
||||
username=None,
|
||||
volume_service_name=None,
|
||||
|
|
|
@ -662,6 +662,11 @@ class OpenStackComputeShell(object):
|
|||
if not args.os_user_domain_id and not args.os_user_domain_name:
|
||||
setattr(args, "os_user_domain_id", "default")
|
||||
|
||||
os_project_domain_id = args.os_project_domain_id
|
||||
os_project_domain_name = args.os_project_domain_name
|
||||
os_user_domain_id = args.os_project_domain_id
|
||||
os_user_domain_name = args.os_project_domain_name
|
||||
|
||||
endpoint_type = args.endpoint_type
|
||||
insecure = args.insecure
|
||||
service_type = args.service_type
|
||||
|
@ -670,6 +675,7 @@ class OpenStackComputeShell(object):
|
|||
endpoint_override = args.endpoint_override
|
||||
os_cache = args.os_cache
|
||||
cacert = args.os_cacert
|
||||
cert = args.os_cert
|
||||
timeout = args.timeout
|
||||
|
||||
keystone_session = None
|
||||
|
@ -768,9 +774,13 @@ class OpenStackComputeShell(object):
|
|||
volume_service_name=volume_service_name,
|
||||
timings=args.timings, endpoint_override=endpoint_override,
|
||||
os_cache=os_cache, http_log_debug=args.debug,
|
||||
cacert=cacert, timeout=timeout,
|
||||
cacert=cacert, cert=cert, timeout=timeout,
|
||||
session=keystone_session, auth=keystone_auth,
|
||||
logger=self.client_logger)
|
||||
logger=self.client_logger,
|
||||
project_domain_id=os_project_domain_id,
|
||||
project_domain_name=os_project_domain_name,
|
||||
user_domain_id=os_user_domain_id,
|
||||
user_domain_name=os_user_domain_name)
|
||||
|
||||
if not skip_auth:
|
||||
if not api_version.is_latest():
|
||||
|
@ -832,8 +842,12 @@ class OpenStackComputeShell(object):
|
|||
volume_service_name=volume_service_name,
|
||||
timings=args.timings, endpoint_override=endpoint_override,
|
||||
os_cache=os_cache, http_log_debug=args.debug,
|
||||
cacert=cacert, timeout=timeout,
|
||||
session=keystone_session, auth=keystone_auth)
|
||||
cacert=cacert, cert=cert, timeout=timeout,
|
||||
session=keystone_session, auth=keystone_auth,
|
||||
project_domain_id=os_project_domain_id,
|
||||
project_domain_name=os_project_domain_name,
|
||||
user_domain_id=os_user_domain_id,
|
||||
user_domain_name=os_user_domain_name)
|
||||
|
||||
# Now check for the password/token of which pieces of the
|
||||
# identifying keyring key can come from the underlying client
|
||||
|
|
|
@ -74,6 +74,7 @@ class Client(object):
|
|||
auth_token=None,
|
||||
auth_url=None,
|
||||
cacert=None,
|
||||
cert=None,
|
||||
connection_pool=False,
|
||||
direct_use=True,
|
||||
endpoint_override=None,
|
||||
|
@ -84,6 +85,8 @@ class Client(object):
|
|||
logger=None,
|
||||
os_cache=False,
|
||||
password=None,
|
||||
project_domain_id=None,
|
||||
project_domain_name=None,
|
||||
project_id=None,
|
||||
project_name=None,
|
||||
region_name=None,
|
||||
|
@ -92,6 +95,8 @@ class Client(object):
|
|||
session=None,
|
||||
timeout=None,
|
||||
timings=False,
|
||||
user_domain_id=None,
|
||||
user_domain_name=None,
|
||||
user_id=None,
|
||||
username=None,
|
||||
volume_service_name=None,
|
||||
|
@ -103,7 +108,8 @@ class Client(object):
|
|||
:param str auth: Auth
|
||||
:param str auth_token: Auth token
|
||||
:param str auth_url: Auth URL
|
||||
:param str cacert: cacert
|
||||
:param str cacert: ca-certificate
|
||||
:param str cert: certificate
|
||||
:param bool direct_use: Inner variable of novaclient. Do not use it
|
||||
outside novaclient. It's restricted.
|
||||
:param str endpoint_override: Bypass URL
|
||||
|
@ -115,6 +121,8 @@ class Client(object):
|
|||
logging stuff
|
||||
:param str password: User password
|
||||
:param bool os_cache: OS cache
|
||||
:param str project_domain_id: ID of project domain
|
||||
:param str project_domain_name: Name of project domain
|
||||
:param str project_id: Project/Tenant ID
|
||||
:param str project_name: Project/Tenant name
|
||||
:param str region_name: Region Name
|
||||
|
@ -123,6 +131,8 @@ class Client(object):
|
|||
:param str session: Session
|
||||
:param float timeout: API timeout, None or 0 disables
|
||||
:param bool timings: Timings
|
||||
:param str user_domain_id: ID of user domain
|
||||
:param str user_domain_name: Name of user domain
|
||||
:param str user_id: User ID
|
||||
:param str username: Username
|
||||
:param str volume_service_name: Volume Service Name
|
||||
|
@ -225,6 +235,7 @@ class Client(object):
|
|||
auth_token=auth_token,
|
||||
auth_url=auth_url,
|
||||
cacert=cacert,
|
||||
cert=cert,
|
||||
connection_pool=connection_pool,
|
||||
endpoint_override=endpoint_override,
|
||||
endpoint_type=endpoint_type,
|
||||
|
@ -233,6 +244,8 @@ class Client(object):
|
|||
logger=self.logger,
|
||||
os_cache=self.os_cache,
|
||||
password=password,
|
||||
project_domain_id=project_domain_id,
|
||||
project_domain_name=project_domain_name,
|
||||
project_id=project_id,
|
||||
project_name=project_name,
|
||||
region_name=region_name,
|
||||
|
@ -241,6 +254,8 @@ class Client(object):
|
|||
session=session,
|
||||
timeout=timeout,
|
||||
timings=timings,
|
||||
user_domain_id=user_domain_id,
|
||||
user_domain_name=user_domain_name,
|
||||
user_id=user_id,
|
||||
username=username,
|
||||
volume_service_name=volume_service_name,
|
||||
|
|
Loading…
Reference in New Issue