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:
            if self.egressruleid:
                self.debug('remove egress rule id=%s' % self.egressruleid)
                self.deleteEgressRule()
            self.debug("Cleaning up the resources")
            self.virtual_machine.delete(self.apiclient)
            wait_for_cleanup(self.apiclient, ["expunge.interval", "expunge.delay"])

            retriesCount = 5
            while True:
                vms = list_virtual_machines(self.apiclient, id=self.virtual_machine.id)
                if vms is None:
                    break
                elif retriesCount == 0:
                    self.fail("Failed to delete/expunge VM")

                time.sleep(10)
                retriesCount -= 1

            self.network.delete(self.apiclient)
            self.debug("Sleep for Network cleanup to complete.")
            wait_for_cleanup(self.apiclient, ["network.gc.wait", "network.gc.interval"])
            cleanup_resources(self.apiclient, reversed(self.cleanup))
            self.debug("Cleanup complete!")
        except Exception as e:
            self.debug("Warning! Exception in tearDown: %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 tearDown(self):
     try:
         #Clean up, terminate the created network offerings
         cleanup_resources(self.apiclient, self.cleanup)
     except Exception as e:
         self.debug("Warning: Exception during cleanup : %s" % e)
     return
Example #5
0
 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 tearDown(self):
        try:
            if self.egressruleid:
                self.debug('remove egress rule id=%s' % self.egressruleid)
                self.deleteEgressRule()
            self.debug("Cleaning up the resources")
            self.virtual_machine.delete(self.apiclient)
            wait_for_cleanup(self.apiclient,
                             ["expunge.interval", "expunge.delay"])

            retriesCount = 5
            while True:
                vms = list_virtual_machines(self.apiclient,
                                            id=self.virtual_machine.id)
                if vms is None:
                    break
                elif retriesCount == 0:
                    self.fail("Failed to delete/expunge VM")

                time.sleep(10)
                retriesCount -= 1

            self.network.delete(self.apiclient)
            self.debug("Sleep for Network cleanup to complete.")
            wait_for_cleanup(self.apiclient,
                             ["network.gc.wait", "network.gc.interval"])
            cleanup_resources(self.apiclient, reversed(self.cleanup))
            self.debug("Cleanup complete!")
        except Exception as e:
            self.fail("Warning! Cleanup failed: %s" % e)
Example #7
0
 def tearDown(self):
     try:
         #Clean up, terminate the created network offerings
         cleanup_resources(self.apiclient, self.cleanup)
     except Exception as e:
         self.debug("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
Example #9
0
 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
Example #10
0
 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 tearDown(self):
     try:
         # Clean up, terminate the created network offerings
         cleanup_resources(self.apiclient, self._cleanup)
         wait_for_cleanup(self.apiclient, ["network.gc.interval", "network.gc.wait"])
     except Exception as e:
         self.debug("Warning: Exception during cleanup : %s" % e)
         # raise Exception("Warning: Exception during cleanup : %s" % e)
     return
 def tearDown(self):
     stats = { "datapoints": self.datapoints }
     print stats
     self.file_to_write.write(json.dumps(stats, sort_keys=True, indent=4, separators=(',', ': ')))
     self.file_to_write.close()
     try:
         cleanup_resources(self.apiclient, self.cleanup)
     except Exception as e:
         raise Exception("Warning: Exception during cleanup : %s" % e)
Example #13
0
 def tearDown(self):
     try:
         #Clean up, terminate the created network offerings
         cleanup_resources(self.apiclient, self._cleanup)
         wait_for_cleanup(self.apiclient,
                          ["network.gc.interval", "network.gc.wait"])
     except Exception as e:
         self.debug("Warning: Exception during cleanup : %s" % e)
         #raise Exception("Warning: Exception during cleanup : %s" % e)
     return
 def tearDown(self):
     try:
         if self.egressruleid:
             self.debug('remove egress rule id=%s' % self.egressruleid)
             self.deleteEgressRule()
         self.debug("Cleaning up the resources")
         self.virtual_machine.delete(self.apiclient)
         wait_for_cleanup(self.apiclient, ["expunge.interval", "expunge.delay"])
         self.debug("Sleep for VM cleanup to complete.")
         time.sleep(self.services['sleep'])
         self.network.delete(self.apiclient)
         wait_for_cleanup(self.apiclient, ["network.gc.wait", "network.gc.interval"])
         self.debug("Sleep for Network cleanup to complete.")
         time.sleep(self.services['sleep'])
         cleanup_resources(self.apiclient, reversed(self.cleanup))
         self.debug("Cleanup complete!")
     except Exception as e:
         self.debug("Warning! Exception in tearDown: %s" % e)
 def tearDown(self):
     try:
         if self.egressruleid:
             self.debug("remove egress rule id=%s" % self.egressruleid)
             self.deleteEgressRule()
         self.debug("Cleaning up the resources")
         self.virtual_machine.delete(self.apiclient)
         wait_for_cleanup(self.apiclient, ["expunge.interval", "expunge.delay"])
         self.debug("Sleep for VM cleanup to complete.")
         time.sleep(self.services["sleep"])
         self.network.delete(self.apiclient)
         wait_for_cleanup(self.apiclient, ["network.gc.wait", "network.gc.interval"])
         self.debug("Sleep for Network cleanup to complete.")
         time.sleep(self.services["sleep"])
         cleanup_resources(self.apiclient, reversed(self.cleanup))
         self.debug("Cleanup complete!")
     except Exception as e:
         self.debug("Warning! Exception in tearDown: %s" % e)
Example #16
0
 def tearDownClass(cls):
     try:
         cleanup_resources(cls.api_client, reversed(cls._cleanup))
     except Exception as e:
         raise Exception("Warning: Exception during cleanup : %s" % e)
Example #17
0
 def tearDownClass(cls):
     try:
         cleanup_resources(cls.api_client, reversed(cls._cleanup))
     except Exception as e:
         raise Exception("Warning: Exception during cleanup : %s" % e)