cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gir...@apache.org
Subject git commit: updated refs/heads/master to 96272f4
Date Thu, 05 Jun 2014 06:03:27 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 7ccf4bd16 -> 96272f4cd


CLOUDSTACK-6776: Removed hard coded vlan ids from BVT test_non_contiguous_vlan.py

Conflicts:
	test/integration/smoke/test_non_contigiousvlan.py


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

Branch: refs/heads/master
Commit: 96272f4cde4e1012da820264ff91c43a9ec255c4
Parents: 7ccf4bd
Author: Bharat Kumar <bharat.kumar@citrix.com>
Authored: Thu Jun 5 11:11:38 2014 +0530
Committer: Girish Shilamkar <girish@clogeny.com>
Committed: Thu Jun 5 11:33:08 2014 +0530

----------------------------------------------------------------------
 .../smoke/test_non_contigiousvlan.py            | 35 +++++++++-----------
 1 file changed, 16 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96272f4c/test/integration/smoke/test_non_contigiousvlan.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_non_contigiousvlan.py b/test/integration/smoke/test_non_contigiousvlan.py
index a84e62f..50b48d0 100644
--- a/test/integration/smoke/test_non_contigiousvlan.py
+++ b/test/integration/smoke/test_non_contigiousvlan.py
@@ -15,31 +15,28 @@
 # specific language governing permissions and limitations
 # under the License.
 
-from marvin import cloudstackTestCase
-from marvin.cloudstackAPI import *
+#from marvin.cloudstackAPI import *
 from marvin.cloudstackTestCase import cloudstackTestCase
-from marvin.lib.base import Account
 from marvin.lib.base import PhysicalNetwork
+from marvin.lib.common import setNonContiguousVlanIds, get_zone
 from nose.plugins.attrib import attr
 
-class Services():
-    def __init__(self):
-        self.services = {
-            "vlan": {
-                "part": ["4090-4091", "4092-4095"],
-                "full": "4090-4095",
-            }
-        }
-
-
-@attr(tags = ["simulator", "advanced", "selfservice"])
+@attr(tags = ["simulator", "advanced", "selfservice"], BugId="CLOUDSTACK-6776")
 class TestUpdatePhysicalNetwork(cloudstackTestCase):
     """
     Test to extend physical network vlan range
     """
     def setUp(self):
-        self.vlan = Services().services["vlan"]
         self.apiClient = self.testClient.getApiClient()
+        self.zone = get_zone(self.apiClient, self.testClient.getZoneForTests())
+        self.physicalnetwork, self.vlan = setNonContiguousVlanIds(self.apiClient, self.zone.id)
+
+        self.physicalnetworkid = self.physicalnetwork.id
+        self.existing_vlan = self.physicalnetwork.vlan
+
+        if self.vlan is None:
+            raise Exception("Failed to set non contiguous vlan ids to test. Free some ids
from \
+                        from existing physical networks at ends")
 
 
     def test_extendPhysicalNetworkVlan(self):
@@ -53,13 +50,13 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
         self.network = phy_networks[0]
         self.networkid = phy_networks[0].id
         self.existing_vlan = phy_networks[0].vlan
-        vlan1 = self.existing_vlan+","+self.vlan["part"][0]
+        vlan1 = self.existing_vlan+","+self.vlan["partial_range"][0]
         updatePhysicalNetworkResponse = self.network.update(self.apiClient, id = self.networkid,
vlan = vlan1)
         self.assert_(updatePhysicalNetworkResponse is not None,
             msg="couldn't extend the physical network with vlan %s"%vlan1)
         self.assert_(isinstance(self.network, PhysicalNetwork))
 
-        vlan2 = vlan1+","+self.vlan["part"][1]
+        vlan2 = vlan1+","+self.vlan["partial_range"][1]
         updatePhysicalNetworkResponse2 = self.network.update(self.apiClient, id = self.networkid,
vlan = vlan2)
         self.assert_(updatePhysicalNetworkResponse2 is not None,
             msg="couldn't extend the physical network with vlan %s"%vlan2)
@@ -68,7 +65,7 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
         vlanranges= updatePhysicalNetworkResponse2.vlan
         self.assert_(vlanranges is not None,
             "No VLAN ranges found on the deployment")
-        self.assert_(vlanranges.find(self.vlan["full"]) > 0, "vlan ranges are not extended")
+        self.assert_(str(vlanranges) == vlan2, "vlan ranges are not extended")
 
 
     def tearDown(self):
@@ -82,6 +79,6 @@ class TestUpdatePhysicalNetwork(cloudstackTestCase):
         self.network = phy_networks[0]
         self.networkid = phy_networks[0].id
         updateResponse = self.network.update(self.apiClient, id = self.networkid, vlan=self.existing_vlan)
-        self.assert_(updateResponse.vlan.find(self.vlan["full"]) < 0,
+        self.assert_(updateResponse.vlan.find(self.vlan["full_range"]) < 0,
             "VLAN was not removed successfully")
 


Mime
View raw message