Use None as get_nova_session_client() version default
This allows callers to pass None and let get_nova_session_client() to use a sane default API, specifically this allows intermediate users (e.g. launch_guest() ) to proxy values passed by the caller.
This commit is contained in:
@@ -367,7 +367,7 @@ def get_designate_session_client(**kwargs):
|
||||
**kwargs)
|
||||
|
||||
|
||||
def get_nova_session_client(session, version=2):
|
||||
def get_nova_session_client(session, version=None):
|
||||
"""Return novaclient authenticated by keystone session.
|
||||
|
||||
:param session: Keystone session object
|
||||
@@ -377,6 +377,8 @@ def get_nova_session_client(session, version=2):
|
||||
:returns: Authenticated novaclient
|
||||
:rtype: novaclient.Client object
|
||||
"""
|
||||
if not version:
|
||||
version = 2
|
||||
return novaclient_client.Client(version, session=session)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user