(self)
| 31 | hostCountMsg = "Host HA can be tested with at least two hosts, only %s found" |
| 32 | |
| 33 | def setUp(self): |
| 34 | self.logger = logging.getLogger('TestHM') |
| 35 | self.stream_handler = logging.StreamHandler() |
| 36 | self.logger.setLevel(logging.DEBUG) |
| 37 | self.logger.addHandler(self.stream_handler) |
| 38 | self.apiclient = self.testClient.getApiClient() |
| 39 | self.hypervisor = self.testClient.getHypervisorInfo() |
| 40 | self.dbclient = self.testClient.getDbConnection() |
| 41 | self.services = self.testClient.getParsedTestDataConfig() |
| 42 | self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests()) |
| 43 | self.pod = get_pod(self.apiclient, self.zone.id) |
| 44 | self.hostConfig = self.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__ |
| 45 | |
| 46 | self.cleanup = [] |
| 47 | self.services = { |
| 48 | "service_offering": { |
| 49 | "name": "Ultra Tiny Instance", |
| 50 | "displaytext": "Ultra Tiny Instance", |
| 51 | "cpunumber": 1, |
| 52 | "cpuspeed": 100, |
| 53 | "memory": 128, |
| 54 | }, |
| 55 | "service_offering_local": { |
| 56 | "name": "Ultra Tiny Local Instance", |
| 57 | "displaytext": "Ultra Tiny Local Instance", |
| 58 | "cpunumber": 1, |
| 59 | "cpuspeed": 100, |
| 60 | "memory": 128, |
| 61 | "storagetype": "local" |
| 62 | }, |
| 63 | "vm": { |
| 64 | "username": "root", |
| 65 | "password": "password", |
| 66 | "ssh_port": 22, |
| 67 | # Hypervisor type should be same as |
| 68 | # hypervisor type of cluster |
| 69 | "privateport": 22, |
| 70 | "publicport": 22, |
| 71 | "protocol": 'TCP', |
| 72 | }, |
| 73 | "natrule": { |
| 74 | "privateport": 22, |
| 75 | "publicport": 22, |
| 76 | "startport": 22, |
| 77 | "endport": 22, |
| 78 | "protocol": "TCP", |
| 79 | "cidrlist": '0.0.0.0/0', |
| 80 | }, |
| 81 | "ostype": 'CentOS 5.3 (64-bit)', |
| 82 | "sleep": 60, |
| 83 | "timeout": 10, |
| 84 | } |
| 85 | |
| 86 | def tearDown(self): |
| 87 | super(TestHostHA, self).tearDown() |
nothing calls this directly
no test coverage detected