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_snapshot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functest/utils/openstack_snapshot.py') diff --git a/functest/utils/openstack_snapshot.py b/functest/utils/openstack_snapshot.py index 4be1af443..5b50ffa50 100755 --- a/functest/utils/openstack_snapshot.py +++ b/functest/utils/openstack_snapshot.py @@ -62,7 +62,7 @@ def get_volumes(cinder_client): volumes = os_utils.get_volumes(cinder_client) if volumes is not None: for volume in volumes: - dic_volumes.update({volume.id: volume.display_name}) + dic_volumes.update({volume.id: volume.name}) return {'volumes': dic_volumes} @@ -149,7 +149,7 @@ def main(): snapshot.update(get_security_groups(neutron_client)) snapshot.update(get_floatinips(nova_client)) snapshot.update(get_users(keystone_client)) - snapshot.update(get_tenants(keystone_client)) + # snapshot.update(get_tenants(keystone_client)) with open(OS_SNAPSHOT_FILE, 'w+') as yaml_file: yaml_file.write(yaml.safe_dump(snapshot, default_flow_style=False)) -- cgit 1.2.3-korg