You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #107 and #99. I don't think that in interface to configure BGP route maps is good.
I was looking for a way to configure exit_policy. I was not able to find a method in bgp.py to do that so I build a work around.
defroute_map_add_exit_policy(
router: RouterDescription,
route_map_name: str,
route_map_order: str,
exit_policy: Optional[str] =None):
""" ipmininet does not have a interface to add exit policies on route maps! This is a hacky why to do it. """route_maps=router.get_config(BGP).topo.getNodeInfo(
router, 'bgp_route_maps', list)
forroute_mapinroute_maps:
ifroute_map_name==route_map.name:
fororder, route_map_entryinroute_map.entries.items():
ifroute_map_order==order:
route_map_entry.exit_policy=exit_policy
When I configure a router with this function and I start, an error occurs.
Couldnt render a config file( bgpd.mako )
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/ipmininet/router/config/base.py", line 334, in render
cfg_content[filename] = template.render(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/mako/template.py", line 473, in render
return runtime._render(self, self.callable_, args, data)
File "/usr/local/lib/python3.8/dist-packages/mako/runtime.py", line 878, in _render
_render_context(
File "/usr/local/lib/python3.8/dist-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/local/lib/python3.8/dist-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/ipmininet/router/config/templates/bgpd.mako", line 104, in render_body
on-match ${rm.exit_policy}
AttributeError: 'RouteMap' object has no attribute 'exit_policy'
The text was updated successfully, but these errors were encountered:
As mentioned in #107 and #99. I don't think that in interface to configure BGP route maps is good.
I was looking for a way to configure exit_policy. I was not able to find a method in bgp.py to do that so I build a work around.
When I configure a router with this function and I start, an error occurs.
The text was updated successfully, but these errors were encountered: