From 00f3d66bc9af0292b6ab2433eb2a6e1de8467300 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Sat, 24 Jun 2017 07:42:20 +0000 Subject: Enable snaps work using public endpoint When functest is not run on jumpserver but on other external host without admin network, snaps failed to connect the admin endpoint. So running snaps tests using public endpoint should be allowed. JIRA: SNAPS-110 Change-Id: I8ca8d8c48330b5f427568d3d5fe942f6f2ca9ea9 Signed-off-by: Linda Wang --- snaps/openstack/os_credentials.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'snaps/openstack/os_credentials.py') diff --git a/snaps/openstack/os_credentials.py b/snaps/openstack/os_credentials.py index b55e480..072c00a 100644 --- a/snaps/openstack/os_credentials.py +++ b/snaps/openstack/os_credentials.py @@ -22,7 +22,7 @@ class OSCreds: 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, cacert=True): + interface="admin", proxy_settings=None, cacert=True): """ Constructor :param username: The user (required) @@ -35,6 +35,7 @@ class OSCreds: :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 @@ -49,6 +50,7 @@ class OSCreds: 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 @@ -75,6 +77,7 @@ class OSCreds: ', network_api_version=' + str(self.network_api_version) + \ ', compute_api_version=' + str(self.compute_api_version) + \ ', user_domain_id=' + str(self.user_domain_id) + \ + ', interface=' + str(self.interface) + \ ', proxy_settings=' + str(self.proxy_settings) + \ ', cacert=' + str(self.cacert) -- cgit 1.2.3-korg