Exemplo n.º 1
0
 def get_router(self, router_id):
     try:
         router = self.router_info[router_id]
     except KeyError:
         raise v_exc.InvalidL3AgentStateError(description=_(
             'L3 agent have no info about reouter id={0}').format(
                 router_id))
     return router.router
Exemplo n.º 2
0
 def _get_router_gw_iface(self, vrouter, router_id):
     router = self.vpn_service.get_router(router_id)
     try:
         gw_interface = vrouter.get_ethernet_if_id(
             router['gw_port']['mac_address'])
     except KeyError:
         raise v_exc.InvalidL3AgentStateError(description=_(
             'Router id={0} have no external gateway.').format(
                 router['id']))
     return gw_interface