From fff71f30410d33919e9ceddd8e5ff87f7e6630d5 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Sun, 3 Sep 2017 14:36:11 +0800 Subject: Fix get_port_by_name in ims testcases Now there isn't a function named get_port_by_name in [1]. Use get_port to replace it. [1]: https://git.opnfv.org/snaps/tree/snaps/openstack/utils/neutron_utils.py Change-Id: Ide5d6b497092f66abe6b0452841007808ee908e6 Signed-off-by: Alex Yang --- functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py | 5 +++-- functest/opnfv_tests/vnf/ims/orchestra_openims.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py b/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py index 5154dea2..216632ee 100644 --- a/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_clearwaterims.py @@ -661,8 +661,9 @@ class ClearwaterImsVnf(vnf.VnfOnBoarding): try: neutron_client = os_utils.get_neutron_client(self.creds) self.logger.info("Deleting Open Baton Port...") - port = snaps_utils.neutron_utils.get_port_by_name( - neutron_client, '%s_port' % self.case_name) + port = snaps_utils.neutron_utils.get_port( + neutron_client, + port_name='%s_port' % self.case_name) snaps_utils.neutron_utils.delete_port(neutron_client, port) time.sleep(10) except Exception as exc: diff --git a/functest/opnfv_tests/vnf/ims/orchestra_openims.py b/functest/opnfv_tests/vnf/ims/orchestra_openims.py index 45440704..6c9628f7 100644 --- a/functest/opnfv_tests/vnf/ims/orchestra_openims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_openims.py @@ -697,8 +697,9 @@ class OpenImsVnf(vnf.VnfOnBoarding): try: neutron_client = os_utils.get_neutron_client(self.creds) self.logger.info("Deleting Open Baton Port...") - port = snaps_utils.neutron_utils.get_port_by_name( - neutron_client, '%s_port' % self.case_name) + port = snaps_utils.neutron_utils.get_port( + neutron_client, + port_name='%s_port' % self.case_name) snaps_utils.neutron_utils.delete_port(neutron_client, port) time.sleep(10) except Exception as exc: -- cgit 1.2.3-korg