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

Method setUpClass

test/integration/component/test_vpc_ipv6.py:119–166  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

117
118 @classmethod
119 def setUpClass(cls):
120 testClient = super(TestIpv6Vpc, cls).getClsTestClient()
121 cls.services = testClient.getParsedTestDataConfig()
122 cls.apiclient = testClient.getApiClient()
123 cls.dbclient = testClient.getDbConnection()
124 cls.test_ipv6_guestprefix = None
125 cls.initial_ipv6_offering_enabled = None
126 cls._cleanup = []
127 cls.routerDetailsMap = {}
128 cls.vpcAllowAllAclDetailsMap = {}
129
130 cls.logger = logging.getLogger('TestIpv6Vpc')
131
132 cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
133 cls.services['mode'] = cls.zone.networktype
134 cls.ipv6NotSupported = False
135
136 ipv6_guestprefix = cls.getGuestIpv6Prefix()
137 if ipv6_guestprefix == None:
138 cls.ipv6NotSupported = True
139 if cls.ipv6NotSupported == False:
140 ipv6_publiciprange = cls.getPublicIpv6Range()
141 if ipv6_publiciprange == None:
142 cls.ipv6NotSupported = True
143
144 if cls.ipv6NotSupported == False:
145 cls.initial_ipv6_offering_enabled = Configurations.list(
146 cls.apiclient,
147 name=ipv6_offering_config_name)[0].value
148 Configurations.update(cls.apiclient,
149 ipv6_offering_config_name,
150 "true")
151 cls.domain = get_domain(cls.apiclient)
152 cls.account = Account.create(
153 cls.apiclient,
154 cls.services["account"],
155 admin=False,
156 domainid=cls.domain.id
157 )
158 cls._cleanup.append(cls.account)
159 cls.hypervisor = testClient.getHypervisorInfo()
160 cls.template = get_test_template(
161 cls.apiclient,
162 cls.zone.id,
163 cls.hypervisor)
164 else:
165 cls.debug("IPv6 is not supported, skipping tests!")
166 return
167
168 @classmethod
169 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 15

get_zoneFunction · 0.90
get_domainFunction · 0.90
get_test_templateFunction · 0.90
getClsTestClientMethod · 0.80
getApiClientMethod · 0.80
getDbConnectionMethod · 0.80
getZoneForTestsMethod · 0.80
getHypervisorInfoMethod · 0.80
debugMethod · 0.80
listMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected