Incorporated review comments provided in PR#183

This commit is contained in:
sanjeev 2015-04-22 15:14:52 +05:30
parent 0bae300fa2
commit 5b7527e2da

View File

@ -417,12 +417,18 @@ class TestBasicOperations(cloudstackTestCase):
None,
"Removing IP from nic didn't release the ip address from user_ip_address table"
)
ipaddress_2 = NIC.addIp(
self.apiclient,
id=virtual_machine.nic[0].id,
ipaddress=ipaddress_1.ipaddress
)
NIC.removeIp(self.apiclient, ipaddressid=ipaddress_2.id)
else:
qresultset = self.dbclient.execute(
"select id from nic_secondary_ips where ip4_address = '%s';"
% str(ipaddress_1.ipaddress))
if len(qresultset):
self.fail("Failed to release the secondary ip from the nic")
ipaddress_2 = NIC.addIp(
self.apiclient,
id=virtual_machine.nic[0].id,
ipaddress=ipaddress_1.ipaddress
)
NIC.removeIp(self.apiclient, ipaddressid=ipaddress_2.id)
try:
NIC.removeIp(
self.apiclient,