diff options
author | DR695H <dr695h@att.com> | 2019-05-01 18:52:33 -0400 |
---|---|---|
committer | DR695H <dr695h@att.com> | 2019-05-01 18:53:14 -0400 |
commit | ae6fedd18ad51f175d6a2e2346f284a68b6e4967 (patch) | |
tree | 40cf730e4178000533b83ebffdf6abe04011ce06 /robotframework-onap/eteutils/OpenstackLibrary.py | |
parent | 308b44cc1e6b95df3051e5f7db94389696763cca (diff) |
support python 3
support python 3 in all files, also support python 2 however so
everything should continue to work
Change-Id: I4ace08d2bb0623c0fdc61f2fe39d2339817aa916
Issue-ID: TEST-141
Signed-off-by: DR695H <dr695h@att.com>
Diffstat (limited to 'robotframework-onap/eteutils/OpenstackLibrary.py')
-rw-r--r-- | robotframework-onap/eteutils/OpenstackLibrary.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/robotframework-onap/eteutils/OpenstackLibrary.py b/robotframework-onap/eteutils/OpenstackLibrary.py index adb12db..8791450 100644 --- a/robotframework-onap/eteutils/OpenstackLibrary.py +++ b/robotframework-onap/eteutils/OpenstackLibrary.py @@ -23,7 +23,7 @@ class OpenstackLibrary: def get_openstack_token(self, alias): """Get Openstack auth token from the current alias""" response = self._cache.switch(alias) - if isinstance(response, basestring): + if isinstance(response, str): jsonResponse = json.loads(response); else: jsonResponse = response; @@ -35,7 +35,7 @@ class OpenstackLibrary: def get_openstack_catalog(self, alias): """Get Openstack service catalog from the current alias""" response = self._cache.switch(alias) - if isinstance(response, basestring): + if isinstance(response, str): jsonResponse = json.loads(response); else: jsonResponse = response; @@ -48,7 +48,7 @@ class OpenstackLibrary: def get_current_openstack_tenant(self, alias): """Get Openstack tenant from the current alias""" response = self._cache.switch(alias) - if isinstance(response, basestring): + if isinstance(response, str): jsonResponse = json.loads(response); else: jsonResponse = response; @@ -65,7 +65,7 @@ class OpenstackLibrary: def get_openstack_regions(self, alias): """Get all Openstack regions from the current alias""" response = self._cache.switch(alias) - if isinstance(response, basestring): + if isinstance(response, str): jsonResponse = json.loads(response); else: jsonResponse = response; @@ -85,7 +85,7 @@ class OpenstackLibrary: def get_openstack_service_url(self, alias, servicetype, region = None, tenant_id = None): """Get Openstack service catalog from the current alias""" response = self._cache.switch(alias) - if isinstance(response, basestring): + if isinstance(response, str): jsonResponse = json.loads(response); else: jsonResponse = response; @@ -103,7 +103,7 @@ class OpenstackLibrary: # Only provide tenant id when authorizing without qualifying with tenant id # WindRiver does not return the tenantId on the endpoint in this case. if tenant_id is not None: - listOfEndpoints[:] = [y for y in listOfEndpoints if self.__determine_match(y['tenantId'], tenant_id)]; + listOfEndpoints[:] = [y for y in listOfEndpoints if self.__determine_match(y['tenantId'], tenant_id)]; if jsonResponse['keystone_api_version'] == 'v3': listOfEndpoints[:] = [z for z in listOfEndpoints if self.__determine_match(z['interface'], 'public')]; if len(listOfEndpoints) > 0: |