Beispiel #1
0
 def _create_one_router(self):
     network = network_obj.Network(self.ctx,
                                   id=uuidutils.generate_uuid(),
                                   project_id=self.project_id)
     network.create()
     router_gw_port = self._create_one_port(random.randint(10**6, 10**7),
                                            network.id)
     router = router_obj.Router(self.ctx,
                                id=uuidutils.generate_uuid(),
                                gw_port_id=router_gw_port.id)
     router.create()
     return router, network
Beispiel #2
0
 def _create_one_router(self):
     self.router_gw_port = self._create_one_port(2000, self.fips_network.id)
     self.router = router_obj.Router(self.ctx, id=uuidutils.generate_uuid(),
                                     gw_port_id=self.router_gw_port.id)
     self.router.create()
Beispiel #3
0
 def _create_router(self, router_id, gw_port_id, project_id):
     r = router.Router(self.context,
                       id=router_id,
                       gw_port_id=gw_port_id,
                       project_id=project_id)
     r.create()