(self)
| 81 | GetDetailExceptionInfo(e)) |
| 82 | |
| 83 | def __cleanAndExit(self): |
| 84 | try: |
| 85 | print("\n===deploy dc failed, so cleaning the created entries===") |
| 86 | if not test_data.get("deleteDC", None): |
| 87 | print("\n=== Deploy DC Clean Up flag not set. So, exiting ===") |
| 88 | exit(1) |
| 89 | self.__tcRunLogger.debug( |
| 90 | "===Deploy DC Failed, So Cleaning to Exit===") |
| 91 | remove_dc_obj = DeleteDataCenters(self.__testClient, |
| 92 | dc_cfg=self.__cleanUp, |
| 93 | tc_run_logger=self.__tcRunLogger |
| 94 | ) |
| 95 | if remove_dc_obj: |
| 96 | if remove_dc_obj.removeDataCenter() == FAILED: |
| 97 | print("\n===Removing DataCenter Failed===") |
| 98 | self.__tcRunLogger.debug( |
| 99 | "===Removing DataCenter Failed===") |
| 100 | else: |
| 101 | print("\n===Removing DataCenter Successful===") |
| 102 | self.__tcRunLogger.debug( |
| 103 | "===Removing DataCenter Successful===") |
| 104 | exit(1) |
| 105 | except Exception as e: |
| 106 | print("Exception Occurred during DC CleanUp: %s" % \ |
| 107 | GetDetailExceptionInfo(e)) |
| 108 | |
| 109 | def __addToCleanUp(self, type, id): |
| 110 | if type not in list(self.__cleanUp.keys()): |
no test coverage detected