Closed argoA closed 1 year ago
Utilizing ChatGPT, I was able to come to a work around utilizing the following code:
paramaters = {
'id': '*0',
'as': '12345',
'router_id': '192.168.1.1'
}
self.api.get_resource('/routing/bgp/instance').set(**paramaters)
I am having issues with setting the AS of the /routing/bgp/instance on v6 RouterOS devices. The problem is 'as' is a keyword in Python. Used primarily for importing libraries under a separate alias. Attempting to use it in conjunction with the .set() command results in a syntax error.
Below is the code that I am attempting to implement:
Is there a Pythonic way to work around this or a better way to utilize the library to accomplish what I am doing?