Commit d074db6a authored by Alberts S's avatar Alberts S
Browse files

Add ability to add supplement info to routes

parent cdde1e57
......@@ -8,6 +8,8 @@ from Vty import Vty
class Router(CapybaraNetty):
managed_routes = None
def __init__(self, ip: ipaddress.ip_address, name, ssh_user):
self.ip = ip
......@@ -123,6 +125,11 @@ class Router(CapybaraNetty):
def add_managed_route_info(self, route):
self.managed_routes.update({route["prefix"]: route})
# Adds additional attribute ext_info to managed_route
# Useful to store route specific information
def add_managed_route_info_supplement(self, route_prefix, supplemented_data):
self.managed_routes |= {route_prefix: {"ext_info": supplemented_data}}
def del_managed_route_info(self, route):
del self.managed_routes[route["prefix"]]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment