cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [2/5] git commit: updated refs/heads/master to 76f430c
Date Thu, 19 Nov 2015 17:03:17 GMT
CLOUDSTACK-9015 - Add test to cover the rVPC routers stop/start/reboot scenario

   - Stop/reboot master router should make the backup router become master
   - Start the stopped router should make be the backup router


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

Branch: refs/heads/master
Commit: 952d9a84d23b3070b1073ed8ea53275de1c556e1
Parents: cd05a25
Author: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Authored: Thu Nov 12 18:32:53 2015 +0100
Committer: Wilder Rodrigues <wrodrigues@schubergphilis.com>
Committed: Thu Nov 12 18:32:53 2015 +0100

----------------------------------------------------------------------
 .../integration/component/test_vpc_redundant.py | 32 ++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/952d9a84/test/integration/component/test_vpc_redundant.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_redundant.py b/test/integration/component/test_vpc_redundant.py
index 600850b..37a342b 100644
--- a/test/integration/component/test_vpc_redundant.py
+++ b/test/integration/component/test_vpc_redundant.py
@@ -23,6 +23,7 @@ from marvin.cloudstackTestCase import cloudstackTestCase
 from marvin.lib.base import (stopRouter,
                              startRouter,
                              destroyRouter,
+                             rebootRouter,
                              Account,
                              VpcOffering,
                              VPC,
@@ -356,6 +357,12 @@ class TestVPCRedundancy(cloudstackTestCase):
         cmd.id = router.id
         self.apiclient.stopRouter(cmd)
 
+    def reboot_router(self, router):
+        self.logger.debug('Rebooting router %s' % router.id)
+        cmd = rebootRouter.rebootRouterCmd()
+        cmd.id = router.id
+        self.apiclient.rebootRouter(cmd)
+
     def stop_router_by_type(self, type):
         self.check_master_status(2)
         self.logger.debug('Stopping %s router' % type)
@@ -363,6 +370,13 @@ class TestVPCRedundancy(cloudstackTestCase):
             if router.redundantstate == type:
                 self.stop_router(router)
 
+    def reboot_router_by_type(self, type):
+        self.check_master_status(2)
+        self.logger.debug('Rebooting %s router' % type)
+        for router in self.routers:
+            if router.redundantstate == type:
+                self.reboot_router(router)
+
     def destroy_routers(self):
         self.logger.debug('Destroying routers')
         for router in self.routers:
@@ -537,6 +551,24 @@ class TestVPCRedundancy(cloudstackTestCase):
         self.check_master_status(2)
         self.add_nat_rules()
         self.do_default_routes_test()
+    
+    @attr(tags=["advanced", "intervlan"], required_hardware="true")
+    def test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers(self):
+        """ Create a redundant VPC with two networks with two VMs in each network """
+        self.logger.debug("Starting test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL")
+        self.query_routers()
+        self.networks.append(self.create_network(self.services["network_offering"], "10.1.1.1"))
+        self.check_master_status(2)
+        self.add_nat_rules()
+        self.do_vpc_test(False)
+        
+        self.reboot_router_by_type("MASTER")
+        self.check_master_status(2)
+        self.do_vpc_test(False)
+
+        self.reboot_router_by_type("MASTER")
+        self.check_master_status(2)
+        self.do_vpc_test(False)
 
     def delete_nat_rules(self):
         for o in self.networks:


Mime
View raw message