Closed EtienneMILON closed 5 years ago
Hi, I will add an interface for this but it is still currently possible to do. Here is an example:
prefix_list = IPPrefixList('testiplist')
routemap = RouteMap('testroutemap')
# Create a route map rule
rule = routemap.route_map_rules.create(name='rule1', access_list=prefix_list)
# Now update
rule.update(route_entry_settings={'as_path_type': 'prepend', 'as_number': [{'expression': '123456789'}]})
as_path_type specifies the action (dont_modify/prepend/exclude). If prepend or exclude are specified you will need the as_number
attribute as well.
Let me know if that works for you and I'll add a cleaner way to do this from the route map rule.
David
Hi David,
Thanks for your answer. It works for me.
Etienne
Hi David,
I try to add an AS Path Prepend in a Route Map rule, I cannot find it with smc-python:
Is it possible?
Best Regards, Etienne