@Desc : CloudStackTestClient is encapsulated entity for creating and getting various clients viz., apiclient, user api client, dbconnection, test Data parsed information etc @Input : mgmt_details : Management Server Details dbsvr_details: Databa
| 28 | import copy |
| 29 | |
| 30 | class CSTestClient(object): |
| 31 | |
| 32 | ''' |
| 33 | @Desc : CloudStackTestClient is encapsulated entity for creating and |
| 34 | getting various clients viz., apiclient, |
| 35 | user api client, dbconnection, test Data parsed |
| 36 | information etc |
| 37 | @Input : |
| 38 | mgmt_details : Management Server Details |
| 39 | dbsvr_details: Database Server details of Management \ |
| 40 | Server. Retrieved from configuration file. |
| 41 | async_timeout : Timeout for Async queries |
| 42 | default_worker_threads : Number of worker threads |
| 43 | logger : provides logging facilities for this library |
| 44 | zone : The zone on which test suites using this test client will run |
| 45 | ''' |
| 46 | |
| 47 | def __init__(self, mgmt_details, |
| 48 | dbsvr_details, |
| 49 | async_timeout=3600, |
| 50 | logger=None, |
| 51 | test_data_filepath=None, |
| 52 | zone=None, |
| 53 | hypervisor_type=None): |
| 54 | self.__mgmtDetails = mgmt_details |
| 55 | self.__dbSvrDetails = dbsvr_details |
| 56 | self.__csConnection = None |
| 57 | self.__dbConnection = None |
| 58 | self.__testClient = None |
| 59 | self.__asyncTimeOut = async_timeout |
| 60 | self.__logger = logger |
| 61 | self.__apiClient = None |
| 62 | self.__userApiClient = None |
| 63 | self.__asyncJobMgr = None |
| 64 | self.__id = None |
| 65 | self.__hypervisor = hypervisor_type |
| 66 | self.__testDataFilePath = test_data_filepath |
| 67 | self.__parsedTestDataConfig = None |
| 68 | self.__zone = zone |
| 69 | self.__setHypervisorInfo() |
| 70 | |
| 71 | @property |
| 72 | def identifier(self): |
| 73 | return self.__id |
| 74 | |
| 75 | @identifier.setter |
| 76 | def identifier(self, id): |
| 77 | self.__id = id |
| 78 | |
| 79 | def getParsedTestDataConfig(self): |
| 80 | ''' |
| 81 | @Name : getParsedTestDataConfig |
| 82 | @Desc : Provides the TestData Config needed for |
| 83 | Tests are to Run |
| 84 | @Output : Returns the Parsed Test Data Dictionary |
| 85 | ''' |
| 86 | return copy.deepcopy(self.__parsedTestDataConfig) |
| 87 |
no outgoing calls
no test coverage detected