New testcase creation named "cloudify_ims_perf"
[functest.git] / functest / opnfv_tests / vnf / ims / orchestra_openims.py
index 4544070..aae3514 100644 (file)
@@ -32,7 +32,6 @@ from snaps.openstack.create_network import (
     SubnetSettings,
     PortSettings)
 from snaps.openstack.create_router import OpenStackRouter, RouterSettings
-from snaps.openstack.os_credentials import OSCreds
 from snaps.openstack.create_instance import (
     VmInstanceSettings, OpenStackVmInstance)
 from functest.opnfv_tests.openstack.snaps import snaps_utils
@@ -198,22 +197,18 @@ class OpenImsVnf(vnf.VnfOnBoarding):
         self.images = get_config("tenant_images.orchestrator", config_file)
         self.images.update(get_config("tenant_images.%s" %
                                       self.case_name, config_file))
-        self.snaps_creds = None
 
     def prepare(self):
         """Prepare testscase (Additional pre-configuration steps)."""
         super(OpenImsVnf, self).prepare()
 
         self.logger.info("Additional pre-configuration steps")
-        self.logger.info("creds %s", (self.creds))
-
-        self.snaps_creds = OSCreds(
-            username=self.creds['username'],
-            password=self.creds['password'],
-            auth_url=self.creds['auth_url'],
-            project_name=self.creds['tenant'],
-            identity_api_version=int(os_utils.get_keystone_client_version()))
-
+        self.creds = {
+                "tenant": self.tenant_name,
+                "username": self.tenant_name,
+                "password": self.tenant_name,
+                "auth_url": os_utils.get_credentials()['auth_url']
+                }
         self.prepare_images()
         self.prepare_flavor()
         self.prepare_security_groups()
@@ -697,8 +692,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: