Beispiel #1
0
 def create_router(self, request, body):
     """Create a new router"""
     router = Router(self, body)
     yield router.validate_config()
     router.start(self.service)
     yield router.save()
     returnValue(response(
         request,
         'router created',
         (yield router.status()),
         code=http.CREATED
     ))
Beispiel #2
0
 def test_status(self):
     """status should return the current config of the router"""
     config = self.create_router_config()
     router = Router(self.api, config)
     status = yield router.status()
     self.assertEqual(status, router.router_config)
Beispiel #3
0
 def test_status(self):
     """status should return the current config of the router"""
     config = self.create_router_config()
     router = Router(self.api, config)
     status = yield router.status()
     self.assertEqual(status, router.router_config)