Skip to content

Commit e39156e

Browse files
author
Prasanna Santhanam
committed
CLOUDSTACK-4473: allow_egress referenced before assignment
When deploying with networkids allow_egress gets no default value. This is a regression caused by fix for CLOUDSTACK-4418 Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent 5b319ba commit e39156e

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎test/integration/smoke/test_nic.py‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ def signal_handler(signal, frame):
152152
zone = get_zone(self.apiclient, self.services)
153153
self.services['mode'] = zone.networktype
154154

155-
if self.services['mode'] != 'Advanced':
156-
self.debug("Cannot run this test with a basic zone, please use advanced!")
157-
return
155+
if zone.networktype != 'Advanced':
156+
self.skipTest("Cannot run this test with a basic zone, please use advanced!")
158157

159158
#if local storage is enabled, alter the offerings to use localstorage
160159
#this step is needed for devcloud
@@ -224,13 +223,11 @@ def signal_handler(signal, frame):
224223
self.cleanup.insert(0, self.test_network2)
225224
except Exception as ex:
226225
self.debug("Exception during NIC test SETUP!: " + str(ex))
227-
self.assertEqual(True, False, "Exception during NIC test SETUP!: " + str(ex))
228226

229227
@attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
230228
def test_01_nic(self):
231-
if self.services['mode'] != 'Advanced':
232-
self.debug("Cannot run this test with a basic zone, please use advanced!")
233-
return
229+
"""Test to add and update added nic to a virtual machine"""
230+
234231
try:
235232
self.virtual_machine = VirtualMachine.create(
236233
self.apiclient,

‎tools/marvin/marvin/integration/lib/base.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,10 @@ def create(cls, apiclient, services, templateid=None, accountid=None,
344344

345345
if networkids:
346346
cmd.networkids = networkids
347+
allow_egress = False
347348
elif "networkids" in services:
348349
cmd.networkids = services["networkids"]
350+
allow_egress = False
349351
else:
350352
# When no networkids are passed, network
351353
# is created using the "defaultOfferingWithSourceNAT"

0 commit comments

Comments
 (0)