MCPcopy Create free account
hub / github.com/apache/cloudstack / setUp

Method setUp

test/integration/component/test_host.py:37–87  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35class TestHostHA(cloudstackTestCase):
36
37 def setUp(self):
38 self.logger = logging.getLogger('TestHM')
39 self.stream_handler = logging.StreamHandler()
40 self.logger.setLevel(logging.DEBUG)
41 self.logger.addHandler(self.stream_handler)
42 self.apiclient = self.testClient.getApiClient()
43 self.hypervisor = self.testClient.getHypervisorInfo()
44 self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
45 self.dbclient = self.testClient.getDbConnection()
46 self.services = self.testClient.getParsedTestDataConfig()
47 self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
48 self.pod = get_pod(self.apiclient, self.zone.id)
49 self.cleanup = []
50 self.services = {
51 "service_offering": {
52 "name": "Ultra Tiny Instance",
53 "displaytext": "Ultra Tiny Instance",
54 "cpunumber": 1,
55 "cpuspeed": 100,
56 "memory": 128,
57 },
58 "service_offering_local": {
59 "name": "Ultra Tiny Local Instance",
60 "displaytext": "Ultra Tiny Local Instance",
61 "cpunumber": 1,
62 "cpuspeed": 100,
63 "memory": 128,
64 "storagetype": "local"
65 },
66 "vm": {
67 "username": "root",
68 "password": "password",
69 "ssh_port": 22,
70 # Hypervisor type should be same as
71 # hypervisor type of cluster
72 "privateport": 22,
73 "publicport": 22,
74 "protocol": 'TCP',
75 },
76 "natrule": {
77 "privateport": 22,
78 "publicport": 22,
79 "startport": 22,
80 "endport": 22,
81 "protocol": "TCP",
82 "cidrlist": '0.0.0.0/0',
83 },
84 "ostype": 'CentOS 5.3 (64-bit)',
85 "sleep": 60,
86 "timeout": 10,
87 }
88
89
90 def tearDown(self):

Callers

nothing calls this directly

Calls 9

getApiClientMethod · 0.80
getHypervisorInfoMethod · 0.80
getDbConnectionMethod · 0.80
getZoneForTestsMethod · 0.80
get_zoneFunction · 0.50
get_podFunction · 0.50
getLoggerMethod · 0.45
setLevelMethod · 0.45

Tested by

no test coverage detected