aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/openstack_clean.py
diff options
context:
space:
mode:
authorhelenyao <yaohelan@huawei.com>2016-12-07 21:24:24 -0500
committerhelenyao <yaohelan@huawei.com>2016-12-14 04:06:25 -0500
commit703d4477d2385d3c654cdac549b936c08b9c5b31 (patch)
tree4305d2b9c36c74253336e112b94e385fd2afc77b /functest/utils/openstack_clean.py
parent7bb9e652122482a31992901c9eae7429624aabdf (diff)
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 <yaohelan@huawei.com>
Diffstat (limited to 'functest/utils/openstack_clean.py')
-rwxr-xr-xfunctest/utils/openstack_clean.py12
1 files changed, 8 insertions, 4 deletions
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__':