def stop_router(self, type):
     self.check_master_status(2)
     self.debug('Stopping %s router' % type)
     for router in self.routers:
         if router.redundantstate == type:
             cmd = stopRouter.stopRouterCmd()
             cmd.id = router.id
             self.apiclient.stopRouter(cmd)
Example #2
0
 def stop_router(self, type):
     self.check_master_status(2)
     self.debug('Stopping %s router' % type)
     for router in self.routers:
         if router.redundantstate == type:
             cmd = stopRouter.stopRouterCmd()
             cmd.id = router.id
             self.apiclient.stopRouter(cmd)
Example #3
0
    def stop_vpcrouter(self):
        router = self.get_vpcrouter()
        self.debug("Stopping router ID: %s" % router.id)
        cmd = stopRouter.stopRouterCmd()
        cmd.id = router.id
        self.apiclient.stopRouter(cmd)

        routers = list_routers(
            self.apiclient,
            account=self.account.name,
            domainid=self.account.domainid,
        )
        self.assertEqual(isinstance(routers, list), True,
                         "Check for list routers response return valid data")
        router = routers[0]
        self.assertEqual(router.state, 'Stopped',
                         "Check list router response for router state")
        return router
    def stop_vpcrouter(self):
        router = self.get_vpcrouter()
        self.debug("Stopping router ID: %s" % router.id)
        cmd = stopRouter.stopRouterCmd()
        cmd.id = router.id
        self.apiclient.stopRouter(cmd)

        routers = list_routers(self.apiclient,
                                        account=self.account.name,
                                        domainid=self.account.domainid,
                                        )
        self.assertEqual(isinstance(routers, list),
                                True,
                                "Check for list routers response return valid data"
                                )
        router = routers[0]
        self.assertEqual(router.state,
                        'Stopped',
                        "Check list router response for router state"
                        )
        return router
 def stop_router(self, router):
     self.logger.debug('Stopping router %s' % router.id)
     cmd = stopRouter.stopRouterCmd()
     cmd.id = router.id
     self.apiclient.stopRouter(cmd)
 def stop_router(self, router):
     self.logger.debug('Stopping router %s' % router.id)
     cmd = stopRouter.stopRouterCmd()
     cmd.id = router.id
     self.apiclient.stopRouter(cmd)
 def stop_router(self):
     self.logger.debug('Stopping router')
     for router in self.routers:
         cmd = stopRouter.stopRouterCmd()
         cmd.id = router.id
         self.apiclient.stopRouter(cmd)
 def stop_router(self, router):
     self.logger.debug('Stopping router')
     cmd = stopRouter.stopRouterCmd()
     cmd.id = router.id
     cmd.forced = "true"
     self.apiclient.stopRouter(cmd)
 def stop_router(self):
     self.debug('Stopping router')
     for router in self.routers:
         cmd = stopRouter.stopRouterCmd()
         cmd.id = router.id
         self.apiclient.stopRouter(cmd)