def tearDownClass(cls): try: cleanup_resources(cls.apiClient, cls._cleanup) cls.primary_storage.delete(cls.apiClient) except Exception as e: logging.debug("Exception in tearDownClass(cls): %s" % e)
def tearDown(self): try: # Clean up, terminate the created instance, volumes and snapshots cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: cls.apiclient = super(TestVpcRemoteAccessVpn, cls).getClsTestClient().getApiClient() cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(self): try: self.apiclient = super(TestvGPUWindowsVm, self).getClsTestClient().getApiClient() cleanup_resources(self.apiclient, self._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: # Cleanup resources used cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: # Clean up, terminate the created network offerings cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: self.destroy_routers() cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.logger.debug("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: self.debug("Cleaning up the resources") cleanup_resources(self.apiclient, reversed(self.cleanup)) self.debug("Cleanup complete!") except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e)
def tearDownClass(cls): cls.apiclient = super(TestVMLifeCycle, cls).getClsTestClient().getApiClient() try: cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: # Clean up, terminate the created accounts, domains etc cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: cleanup_resources(self.apiClient, self.cleanup) sf_util.purge_solidfire_volumes(self.sfe) except Exception as e: logging.debug("Exception in tearDownClass(self): %s" % e)
def tearDown(self): try: for storagePool in self.pools: StoragePool.update(self.apiclient, id=storagePool.id, tags="") if hasattr(self, "data_volume_created"): data_volumes_list = Volume.list( self.userapiclient, id=self.data_volume_created.id, virtualmachineid=self.vm.id ) if data_volumes_list: self.vm.detach_volume( self.userapiclient, data_volumes_list[0] ) status = validateList(data_volumes_list) self.assertEqual( status[0], PASS, "DATA Volume List Validation Failed") cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: #Clean up, terminate the created resources cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: #Clean up, terminate the created templates cls.domain.delete(cls.api_client, cleanup=True) cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDown(self): try: self.logger.debug("Cleaning up resources") self.cleanup.reverse() cleanup_resources(self.apiclient, self.cleanup, self.logger) except Exception as e: raise Exception("Cleanup failed with %s" % e)
def tearDown(self): try: cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.debug("Warning: Exception during cleanup : %s" % e) # raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: cleanup_resources(cls.api_client, cls._proj_toclean) cleanup_resources(cls.api_client, cls._cleanup) cls.domain.delete(cls.api_client, cleanup=True) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDownClass(cls): try: # Cleanup resources used if cls.updateclone: Configurations.update(cls.api_client, "vmware.create.full.clone", value="false",storageid=cls.storageID) Configurations.update(cls.api_client, "vmware.create.full.clone", value="false") Configurations.update(cls.api_client, "vmware.root.disk.controller", value=cls.defaultdiskcontroller) StoragePool.update(cls.api_client, id=cls.storageID, tags="") cls.restartServer() #Giving 30 seconds to management to warm-up, #Experienced failures when trying to deploy a VM exactly when management came up time.sleep(30) cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: cleanup_resources(cls.api_client, cls.class_cleanup, cls.logger) except Exception as e: raise Exception("Exception: %s" % e)
def tearDown(self): try: self.entity_manager.destroy_routers() cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: cleanup_resources(self.api_client, self.method_cleanup, self.logger) except Exception as e: raise Exception("Exception: %s" % e)
def tearDownClass(cls): try: cls.logger.debug("Cleaning up resources") cleanup_resources(cls.apiclient, cls.cleanup) except Exception, e: raise Exception("Cleanup failed with %s" % e)
def tearDown(self): try: self.account.delete(self.apiclient) cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: cleanup_resources(cls.apiClient, cls._cleanup) cls._purge_solidfire_volumes() except Exception as e: logging.debug("Exception in tearDownClass(cls): %s" % e)
def tearDownClass(cls): try: cls.apiclient = super( TestPortForwarding, cls).getClsTestClient().getApiClient() cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDown(self): try: #Stop/Destroy the routers so we are able to remove the networks. Issue CLOUDSTACK-8935 self.destroy_routers() cleanup_resources(self.api_client, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDown(self): try: self.debug("Cleaning up the resources") cleanup_resources(self.apiclient, self.cleanup) self.debug("Cleanup complete!") except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): try: cls.api_client = super( TestAttachDetachVolume, cls).getClsTestClient().getApiClient() cleanup_resources(cls.api_client, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDownClass(cls): try: try: cls.template.delete(cls.apiclient) except Exception: pass cleanup_resources(cls.apiclient, cls.cleanup) except Exception, e: raise Exception("Cleanup failed with %s" % e)
def tearDown(self): try: for host in self.hosts: Host.update(self.apiclient, id=host.id, hosttags="") cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e)
def tearDown(self): try: # Clean up, terminate the created accounts cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDownClass(cls): try: cleanup_resources(cls.api_client, reversed(cls.cleanup)) except Exception as e: raise Exception('Warning: Exception during class cleanup : %s' % e)
def tearDown(self): try: cleanup_resources(self.api_client, reversed(self.test_cleanup)) except Exception as e: raise Exception('Warning: Exception during test cleanup : %s' % e)
def tearDownClass(cls): cls.api_client = super( TestVRServiceFailureAlerting, cls).getClsTestClient().getApiClient() cleanup_resources(cls.api_client, cls._cleanup) return
def tearDownClass(cls): try: cls.apiclient = super(TestCreateVolume, cls).getClsTestClient().getApiClient() cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDown(self): #Clean up, terminate the created volumes if self.attached: self.virtual_machine.detach_volume(self.apiClient, self.volume) cleanup_resources(self.apiClient, self.cleanup) return
def tearDown(self): cleanup_resources(self.apiclient, self.cleanup) return
def setup_infra(cls, redundant=False): if len(cls.class_cleanup) > 0: cleanup_resources(cls.api_client, cls.class_cleanup, cls.logger) cls.class_cleanup = [] cls.zone = get_zone(cls.api_client, cls.test_client.getZoneForTests()) cls.logger.debug("Zone '%s' selected" % cls.zone.name) cls.domain = get_domain(cls.api_client) cls.logger.debug("Domain '%s' selected" % cls.domain.name) cls.template = get_template(cls.api_client, cls.zone.id) cls.logger.debug("Template '%s' selected" % cls.template.name) cls.account = Account.create(cls.api_client, cls.test_data['account'], admin=True, domainid=cls.domain.id) cls.class_cleanup += [cls.account] cls.logger.debug("Account '%s' created", cls.account.name) cls.vpc_offering = get_default_redundant_vpc_offering( cls.api_client) if redundant else get_default_vpc_offering( cls.api_client) cls.logger.debug("VPC Offering '%s' selected", cls.vpc_offering.name) cls.network_offering = get_default_network_offering(cls.api_client) cls.logger.debug("Network Offering '%s' selected", cls.network_offering.name) cls.virtual_machine_offering = get_default_virtual_machine_offering( cls.api_client) cls.logger.debug("Virtual Machine Offering '%s' selected", cls.virtual_machine_offering.name) cls.default_allow_acl = get_network_acl(cls.api_client, 'default_allow') cls.logger.debug("ACL '%s' selected", cls.default_allow_acl.name) cls.default_deny_acl = get_network_acl(cls.api_client, 'default_deny') cls.logger.debug("ACL '%s' selected", cls.default_deny_acl.name) cls.vpc1 = VPC.create(cls.api_client, cls.test_data['vpcs']['vpc1'], vpcofferingid=cls.vpc_offering.id, zoneid=cls.zone.id, domainid=cls.domain.id, account=cls.account.name) cls.logger.debug("VPC '%s' created, CIDR: %s", cls.vpc1.name, cls.vpc1.cidr) cls.network1 = Network.create( cls.api_client, cls.test_data['networks']['network1'], networkofferingid=cls.network_offering.id, aclid=cls.default_allow_acl.id, vpcid=cls.vpc1.id, zoneid=cls.zone.id, domainid=cls.domain.id, accountid=cls.account.name) cls.logger.debug("Network '%s' created, CIDR: %s, Gateway: %s", cls.network1.name, cls.network1.cidr, cls.network1.gateway) cls.vm1 = VirtualMachine.create( cls.api_client, cls.test_data['vms']['vm1'], templateid=cls.template.id, serviceofferingid=cls.virtual_machine_offering.id, networkids=[cls.network1.id], zoneid=cls.zone.id, domainid=cls.domain.id, accountid=cls.account.name) cls.logger.debug("VM '%s' created, Network: %s, IP %s", cls.vm1.name, cls.network1.name, cls.vm1.nic[0].ipaddress) cls.public_ip1 = PublicIPAddress.create(cls.api_client, zoneid=cls.zone.id, domainid=cls.account.domainid, accountid=cls.account.name, vpcid=cls.vpc1.id, networkid=cls.network1.id) cls.logger.debug("Public IP '%s' acquired, VPC: %s, Network: %s", cls.public_ip1.ipaddress.ipaddress, cls.vpc1.name, cls.network1.name) cls.nat_rule1 = NATRule.create(cls.api_client, cls.vm1, cls.test_data['nat_rule'], vpcid=cls.vpc1.id, networkid=cls.network1.id, ipaddressid=cls.public_ip1.ipaddress.id) cls.logger.debug("Port Forwarding Rule '%s (%s) %s => %s' created", cls.nat_rule1.ipaddress, cls.nat_rule1.protocol, cls.nat_rule1.publicport, cls.nat_rule1.privateport)
def tearDown(self): # Clean up, terminate the created resources cleanup_resources(self.apiClient, self.cleanup) return
def tearDown(self): try: self.debug("Cleaning up the resources") cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.fail("Warning! Cleanup failed: %s" % e)
def tearDown(self): try: if len(self.cleanup) > 0: cleanup_resources(self.apiClient, self.cleanup) except Exception as e: logging.debug("Exception in tearDown(self): %s" % e)
def tearDownClass(cls): try: cleanup_resources(cls.apiClient, cls._cleanup) except Exception as e: logging.debug("Exception in tearDownClass(cls): %s" % e)
def tearDownClass(cls): try: cleanup_resources(cls.apiclient, cls._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e)
def tearDown(self): try: cleanup_resources(self.apiclient, self.cleanup) except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e) return
def tearDownClass(self): try: cleanup_resources(self.apiclient, self._cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return
def tearDownClass(cls): cls.apiclient = super(TestVMLifeCycle, cls).getClsTestClient().getApiClient() cleanup_resources(cls.apiclient, cls._cleanup) return
def tearDownClass(cls): try: cleanup_resources(cls.apiclient, cls.cleanup) except Exception as e: cls.debug("Warning! Exception in tearDown: %s" % e)
def tearDownClass(cls): cleanup_resources(cls.apiclient, cls._cleanup) return
def tearDown(self): try: self.logger.debug("Cleaning up test resources") cleanup_resources(self.apiclient, self.cleanup) except Exception as e: raise Exception("Cleanup failed with %s" % e)
def tearDown(self): # Clean up, terminate the created resources StoragePool.cancelMaintenance(self.api_client, id=self.storageid[0][0]) cleanup_resources(self.apiClient, self.cleanup) return
def tearDown(self): if self.attached: self.virtual_machine.detach_volume(self.apiClient, self.volume) cleanup_resources(self.apiClient, self.cleanup)