From 703d4477d2385d3c654cdac549b936c08b9c5b31 Mon Sep 17 00:00:00 2001 From: helenyao Date: Wed, 7 Dec 2016 21:24:24 -0500 Subject: Authenticate clients with keystoneauth1.session JIRA: FUNCTEST-529 1. use keystoneauth1.session to initialize the client for each service The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. 2. update ODL case to leverage session to get the endpoint info Change-Id: Ic8c01b9b7ed86d3bdd9f5125504bc47f46a37700 Signed-off-by: helenyao --- functest/utils/openstack_clean.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'functest/utils/openstack_clean.py') diff --git a/functest/utils/openstack_clean.py b/functest/utils/openstack_clean.py index 949eee90..c08568bd 100755 --- a/functest/utils/openstack_clean.py +++ b/functest/utils/openstack_clean.py @@ -9,6 +9,8 @@ # - Neutron networks, subnets and ports # - Routers # - Users and tenants +# - Tacker VNFDs and VNFs +# - Tacker SFCs and SFC classifiers # # Author: # jose.lausuch@ericsson.com @@ -105,7 +107,7 @@ def remove_volumes(cinder_client, default_volumes): for volume in volumes: volume_id = getattr(volume, 'id') - volume_name = getattr(volume, 'display_name') + volume_name = getattr(volume, 'name') logger.debug("'%s', ID=%s " % (volume_name, volume_id)) if (volume_id not in default_volumes and volume_name not in default_volumes.values()): @@ -393,7 +395,7 @@ def main(): default_security_groups = snapshot_yaml.get('secgroups') default_floatingips = snapshot_yaml.get('floatingips') default_users = snapshot_yaml.get('users') - default_tenants = snapshot_yaml.get('tenants') + # default_tenants = snapshot_yaml.get('tenants') if not os_utils.check_credentials(): logger.error("Please source the openrc credentials and run " @@ -414,8 +416,10 @@ def main(): separator() remove_users(keystone_client, default_users) separator() - remove_tenants(keystone_client, default_tenants) - separator() + # TODO (Helen) tenant does not exist in V3 + # need to figure our anohter general verification point + # remove_tenants(keystone_client, default_tenants) + # separator() if __name__ == '__main__': -- cgit 1.2.3-korg