You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2015/04/22 12:24:44 UTC
[1/3] git commit: updated refs/heads/master to 5b7527e
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 <sa...@apache.org>
Authored: Tue Apr 21 17:41:38 2015 +0530
Committer: sanjeev <sa...@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):
[3/3] git commit: updated refs/heads/master to 5b7527e
Posted by sa...@apache.org.
Incorporated review comments provided in PR#183
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5b7527e2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b7527e2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b7527e2
Branch: refs/heads/master
Commit: 5b7527e2da3cfed57dd3d4d107d2cfbce024a1af
Parents: 0bae300
Author: sanjeev <sa...@apache.org>
Authored: Wed Apr 22 15:14:52 2015 +0530
Committer: sanjeev <sa...@apache.org>
Committed: Wed Apr 22 15:51:01 2015 +0530
----------------------------------------------------------------------
.../component/test_multiple_ips_per_nic.py | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b7527e2/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 6d26b3e..ea4ba96 100644
--- a/test/integration/component/test_multiple_ips_per_nic.py
+++ b/test/integration/component/test_multiple_ips_per_nic.py
@@ -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,
[2/3] git commit: updated refs/heads/master to 5b7527e
Posted by sa...@apache.org.
Removed tag from the attr
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0bae300f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0bae300f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0bae300f
Branch: refs/heads/master
Commit: 0bae300fa2f35f69afd5cb036a9fc4ad4cf3c53a
Parents: 2de64bc
Author: sanjeev <sa...@apache.org>
Authored: Tue Apr 21 17:48:44 2015 +0530
Committer: sanjeev <sa...@apache.org>
Committed: Wed Apr 22 15:50:59 2015 +0530
----------------------------------------------------------------------
test/integration/component/test_multiple_ips_per_nic.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0bae300f/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 f40c321..6d26b3e 100644
--- a/test/integration/component/test_multiple_ips_per_nic.py
+++ b/test/integration/component/test_multiple_ips_per_nic.py
@@ -361,9 +361,8 @@ class TestBasicOperations(cloudstackTestCase):
(virtual_machine.id, e))
return
- #@data(ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK)
- @data(SHARED_NETWORK)
- @attr(tags=["advanced", "sanj"])
+ @data(ISOLATED_NETWORK, SHARED_NETWORK, VPC_NETWORK)
+ @attr(tags=["advanced"])
def test_remove_ip_from_nic(self, value):
""" Remove secondary IP from NIC of a VM"""