Skip to content

Commit 0df156c

Browse files
Gaurav AradhyeGirish Shilamkar
authored andcommitted
CLOUDSTACK-6984: Resolving issues found during simulator run
1 parent c79ab57 commit 0df156c

3 files changed

Lines changed: 18 additions & 16 deletions

File tree

test/integration/smoke/test_network.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,8 @@ def setUp(self):
750750
ip_addrs = list_publicIP(
751751
self.apiclient,
752752
account=self.account.name,
753-
domainid=self.account.domainid
753+
domainid=self.account.domainid,
754+
issourcenat=False
754755
)
755756
try:
756757
self.ip_addr = ip_addrs[0]
@@ -779,29 +780,30 @@ def setUp(self):
779780
def tearDown(self):
780781
cleanup_resources(self.apiclient, self.cleanup)
781782

782-
@attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false", BugId="CLOUDSTACK-6984")
783+
@attr(tags = ["advanced", "advancedns", "smoke"], required_hardware="false")
783784
def test_releaseIP(self):
784785
"""Test for release public IP address"""
785786

786787
self.debug("Deleting Public IP : %s" % self.ip_addr.id)
787788

788789
self.ip_address.delete(self.apiclient)
789790

790-
# Sleep to ensure that deleted state is reflected in other calls
791-
time.sleep(self.services["sleep"])
791+
retriesCount = 10
792+
isIpAddressDisassociated = False
792793

793-
# ListPublicIpAddresses should not list deleted Public IP address
794-
list_pub_ip_addr_resp = list_publicIP(
794+
while retriesCount > 0:
795+
listResponse = list_publicIP(
795796
self.apiclient,
796797
id=self.ip_addr.id
797-
)
798-
self.debug("List Public IP response" + str(list_pub_ip_addr_resp))
799-
800-
self.assertEqual(
801-
list_pub_ip_addr_resp,
802-
None,
803-
"Check if disassociated IP Address is no longer available"
804-
)
798+
)
799+
if listResponse is None:
800+
isIpAddressDisassociated = True
801+
break
802+
retriesCount -= 1
803+
time.sleep(60)
804+
# End while
805+
806+
self.assertTrue(isIpAddressDisassociated, "Failed to disassociate IP address")
805807

806808
# ListPortForwardingRules should not list
807809
# associated rules with Public IP address

test/integration/smoke/test_vm_life_cycle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def tearDown(self):
304304
return
305305

306306

307-
@attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false", BugId="CLOUDSTACK-6984")
307+
@attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"], required_hardware="false")
308308
def test_01_stop_vm(self):
309309
"""Test Stop Virtual Machine
310310
"""

tools/marvin/marvin/lib/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def getState(self, apiclient, state, timeout=600):
586586
validationresult = validateList(vms)
587587
if validationresult[0] == FAIL:
588588
raise Exception("VM list validation failed: %s" % validationresult[2])
589-
elif str(vms[0].state).lower() == str(state).lower():
589+
elif str(vms[0].state).lower().decode("string_escape") == str(state).lower():
590590
returnValue = [PASS, None]
591591
break
592592
except Exception as e:

0 commit comments

Comments
 (0)