X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=functest%2Fopnfv_tests%2Fvnf%2Fims%2Forchestra_openims.py;h=aae35146fe7dc2df5f281b22424e5cdc7d0ef612;hb=2f9219dfa44982779990e13c177a703f2239b488;hp=f8acada445b69b7af4b9c292b86a1986472a871c;hpb=5612ba4811fcc27fb51c61dd18d595d3dfcd098d;p=functest.git diff --git a/functest/opnfv_tests/vnf/ims/orchestra_openims.py b/functest/opnfv_tests/vnf/ims/orchestra_openims.py index f8acada44..aae35146f 100644 --- a/functest/opnfv_tests/vnf/ims/orchestra_openims.py +++ b/functest/opnfv_tests/vnf/ims/orchestra_openims.py @@ -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() @@ -231,7 +226,8 @@ class OpenImsVnf(vnf.VnfOnBoarding): ImageSettings(name=image_name, image_user='cloud', img_format='qcow2', - image_file=image_file)) + image_file=image_file, + public=True)) image.create() # self.created_resources.append(image); @@ -696,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: