summaryrefslogtreecommitdiffstats
path: root/examples/launch.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-06-28 09:20:13 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-07-05 08:47:29 -0600
commit139af8603aa484c1ba08997f30204fb7be146606 (patch)
treed15a7b71a1a5780e5b4447071a9fb886d38f5d5e /examples/launch.py
parent2a4dc5493763a241c9895652bf1c71ac3ef0e5b3 (diff)
Refactor OSCreds to leverage kwargs instead of named parameters.
JIRA: SNAPS-109 Change-Id: I423ede964cce9fc3b4e5b27f1e8f0dd7603d9ff1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'examples/launch.py')
-rw-r--r--examples/launch.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/launch.py b/examples/launch.py
index 8f6697a..9067730 100644
--- a/examples/launch.py
+++ b/examples/launch.py
@@ -51,13 +51,12 @@ def __get_os_credentials(os_conn_config):
if http_proxy:
tokens = re.split(':', http_proxy)
ssh_proxy_cmd = os_conn_config.get('ssh_proxy_cmd')
- proxy_settings = ProxySettings(tokens[0], tokens[1], ssh_proxy_cmd)
+ proxy_settings = ProxySettings(host=tokens[0], port=tokens[1],
+ ssh_proxy_cmd=ssh_proxy_cmd)
- return OSCreds(username=os_conn_config.get('username'),
- password=os_conn_config.get('password'),
- auth_url=os_conn_config.get('auth_url'),
- project_name=os_conn_config.get('project_name'),
- proxy_settings=proxy_settings)
+ os_conn_config['proxy_settings'] = proxy_settings
+
+ return OSCreds(**os_conn_config)
def __parse_ports_config(config):
@@ -567,9 +566,6 @@ def __get_flavor_variable_value(var_config_values, flavor_dict):
var_config_values['value'] == 'id':
return flavor_creator.get_flavor().id
- logger.info("Returning none")
- return None
-
def main(arguments):
"""