cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sanj...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 5b7527e
Date Wed, 22 Apr 2015 10:24:44 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 52b630fcb -> 5b7527e2d


Added additional verification steps to make sure that removing secondary ip from nic works
fine


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2de64bcc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2de64bcc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2de64bcc

Branch: refs/heads/master
Commit: 2de64bcc910b57d0cf2b83f155c5f467991064f8
Parents: 52b630f
Author: sanjeev <sanjeev@apache.org>
Authored: Tue Apr 21 17:41:38 2015 +0530
Committer: sanjeev <sanjeev@apache.org>
Committed: Wed Apr 22 15:50:58 2015 +0530

----------------------------------------------------------------------
 .../component/test_multiple_ips_per_nic.py      | 28 +++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2de64bcc/test/integration/component/test_multiple_ips_per_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_multiple_ips_per_nic.py b/test/integration/component/test_multiple_ips_per_nic.py
index f3bc0c8..f40c321 100644
--- a/test/integration/component/test_multiple_ips_per_nic.py
+++ b/test/integration/component/test_multiple_ips_per_nic.py
@@ -361,8 +361,9 @@ class TestBasicOperations(cloudstackTestCase):
                 (virtual_machine.id, e))
         return
 
-    @data(ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK)
-    @attr(tags=["advanced"])
+    #@data(ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK)
+    @data(SHARED_NETWORK)
+    @attr(tags=["advanced", "sanj"])
     def test_remove_ip_from_nic(self, value):
         """ Remove secondary IP from NIC of a VM"""
 
@@ -402,6 +403,27 @@ class TestBasicOperations(cloudstackTestCase):
             id=virtual_machine.nic[0].id)
 
         NIC.removeIp(self.apiclient, ipaddressid=ipaddress_1.id)
+        #Following block is to verify
+        #1.Removing nic in shared network should mark allocated state to NULL in DB
+        #2.To make sure that re-add the same ip address to the same nic
+        #3.Remove the IP from the NIC
+        #All the above steps should succeed
+        if value == SHARED_NETWORK:
+            qresultset = self.dbclient.execute(
+                "select allocated from user_ip_address where public_ip_address = '%s';"
+                % str(ipaddress_1.ipaddress)
+            )
+            self.assertEqual(
+                qresultset[0][0],
+                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)
         try:
             NIC.removeIp(
                 self.apiclient,
@@ -908,7 +930,7 @@ class TestNetworkRules(cloudstackTestCase):
         return
 
     @data(ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK)
-    @attr(tags=["advanced, "dvs"])
+    @attr(tags=["advanced", "dvs"])
     def test_disassociate_ip_mapped_to_secondary_ip_through_PF_rule(
             self,
             value):


Mime
View raw message