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

Method setUpClass

test/integration/component/test_vmware_drs.py:113–143  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

111
112 @classmethod
113 def setUpClass(cls):
114
115 cls.testClient = super(TestVMPlacement, cls).getClsTestClient()
116 if cls.testClient.getHypervisorInfo().lower() != "vmware":
117 raise unittest.SkipTest("VMWare tests only valid on VMWare hypervisor")
118 cls.api_client = cls.testClient.getApiClient()
119
120 cls.services = Services().services
121 # Get Zone, Domain and templates
122 cls.domain = get_domain(cls.api_client)
123 cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests())
124 cls.pod = get_pod(
125 cls.api_client,
126 zone_id=cls.zone.id)
127 cls.template = get_template(
128 cls.api_client,
129 cls.zone.id,
130 cls.services["ostype"]
131 )
132 cls.services["virtual_machine"]["zoneid"] = cls.zone.id
133 cls.services["virtual_machine"]["template"] = cls.template.id
134
135 cls.service_offering = ServiceOffering.create(
136 cls.api_client,
137 cls.services["service_offering"],
138 offerha=True
139 )
140 cls._cleanup = [
141 cls.service_offering,
142 ]
143 return
144
145 @classmethod
146 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 10

get_domainFunction · 0.90
get_zoneFunction · 0.90
get_podFunction · 0.90
get_templateFunction · 0.90
getClsTestClientMethod · 0.80
getHypervisorInfoMethod · 0.80
getApiClientMethod · 0.80
getZoneForTestsMethod · 0.80
ServicesClass · 0.70
createMethod · 0.65

Tested by

no test coverage detected