-# Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs")
+# Copyright (c) 2017 Cable Television Laboratories, Inc. ("CableLabs")
# and others. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Represents the credentials required to connect with OpenStack servers
"""
- def __init__(self, username, password, auth_url, project_name, identity_api_version=2, image_api_version=1,
+ def __init__(self, username, password, auth_url, project_name, identity_api_version=2, image_api_version=2,
network_api_version=2, compute_api_version=2, user_domain_id='default', project_domain_id='default',
- proxy_settings=None):
+ interface="admin", proxy_settings=None, cacert=True):
"""
Constructor
:param username: The user (required)
:param compute_api_version: The OpenStack's API version to use for Nova clients
:param user_domain_id: Used for v3 APIs
:param project_domain_id: Used for v3 APIs
+ :param interface: Used to specify the endpoint type for keystone as public, admin, internal
:param proxy_settings: instance of os_credentials.ProxySettings class
+ :param cacert: Default to be True for http, or the certification file is specified for https verification,
+ or set to be False to disable server certificate verification without cert file
"""
self.username = username
self.password = password
self.compute_api_version = compute_api_version
self.user_domain_id = user_domain_id
self.project_domain_id = project_domain_id
+ self.interface = interface
self.proxy_settings = proxy_settings
+ self.cacert = cacert
if self.proxy_settings and not isinstance(self.proxy_settings, ProxySettings):
raise Exception('proxy_settings must be an instance of the class ProxySettings')
', network_api_version=' + str(self.network_api_version) + \
', compute_api_version=' + str(self.compute_api_version) + \
', user_domain_id=' + str(self.user_domain_id) + \
- ', proxy_settings=' + str(self.proxy_settings)
+ ', interface=' + str(self.interface) + \
+ ', proxy_settings=' + str(self.proxy_settings) + \
+ ', cacert=' + str(self.cacert)
class ProxySettings: