Updated Branches: refs/heads/4.2 913a0050e -> 04ba3d135
remove hardcoded vlan for shared network test use a vlan outside of the vlans managed by cloudstack. Signed-off-by: Prasanna Santhanam <[email protected]> (cherry picked from commit 7eefeab957e7b2a904a2f5ec1ce2a2624587eb9e) Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04ba3d13 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04ba3d13 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04ba3d13 Branch: refs/heads/4.2 Commit: 04ba3d1354831ed30a0b43889b5e8849d352b4ec Parents: 913a005 Author: Prasanna Santhanam <[email protected]> Authored: Mon Aug 5 22:04:30 2013 +0530 Committer: Prasanna Santhanam <[email protected]> Committed: Mon Aug 5 22:05:09 2013 +0530 ---------------------------------------------------------------------- test/integration/component/test_shared_networks.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04ba3d13/test/integration/component/test_shared_networks.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 237e0bf..23c8d9e 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -1821,7 +1821,7 @@ class TestSharedNetworks(cloudstackTestCase): ) physical_network = list_physical_networks_response[0] - + self.debug("Physical Network found: %s" % physical_network.id) self.services["network_offering"]["specifyVlan"] = "True" @@ -1980,7 +1980,11 @@ class TestSharedNetworks(cloudstackTestCase): ) physical_network = list_physical_networks_response[0] - + start_vlan, end_vlan = physical_network.vlan.split('-') + self.assert_(int(start_vlan) < int(end_vlan), "VLAN range %s was improperly split" % physical_network.vlan) + shared_ntwk_vlan = int(end_vlan) + 1 + self.assert_(shared_ntwk_vlan < 4095, "VLAN chosen %s is invalid > 4095" % shared_ntwk_vlan) + self.debug("Physical Network found: %s" % physical_network.id) self.services["network_offering"]["specifyVlan"] = "True" @@ -2050,7 +2054,8 @@ class TestSharedNetworks(cloudstackTestCase): self.services["network"]["acltype"] = "Domain" self.services["network"]["networkofferingid"] = self.shared_network_offering.id self.services["network"]["physicalnetworkid"] = physical_network.id - self.services["network"]["vlan"] = "567" + self.services["network"]["vlan"] = shared_ntwk_vlan + self.debug("Creating a shared network in non-cloudstack VLAN %s" % shared_ntwk_vlan) self.network = Network.create( self.api_client, self.services["network"],
