コード例 #1
0
 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
コード例 #2
0
    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)
コード例 #3
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
コード例 #4
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
コード例 #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)
コード例 #6
0
    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)
コード例 #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
コード例 #8
0
 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
コード例 #9
0
ファイル: test_vpn_users.py プロジェクト: Aparna31/cloudstack
 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
コード例 #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)
コード例 #11
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
コード例 #12
0
 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)
コード例 #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
コード例 #14
0
 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)
コード例 #15
0
 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)
コード例 #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)
コード例 #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)