Commit 503c93ef authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

Config.py: return vrfs as a tuple

Return a tuple for vrfs instead of a list
parent 54791bd5
...@@ -194,4 +194,4 @@ def get_vrfs(file_path): ...@@ -194,4 +194,4 @@ def get_vrfs(file_path):
data = yaml.load(f, Loader=yaml.FullLoader) data = yaml.load(f, Loader=yaml.FullLoader)
multicast_vrf = data.get("MulticastVRF", 0) multicast_vrf = data.get("MulticastVRF", 0)
unicast_vrf = data.get("UnicastVRF", 254) unicast_vrf = data.get("UnicastVRF", 254)
return [multicast_vrf, unicast_vrf] return multicast_vrf, unicast_vrf
...@@ -217,7 +217,7 @@ def main(): ...@@ -217,7 +217,7 @@ def main():
try: try:
from pimdm import Config from pimdm import Config
args.config[0] = os.path.abspath(args.config[0]) args.config[0] = os.path.abspath(args.config[0])
[pim_globals.MULTICAST_TABLE_ID, pim_globals.UNICAST_TABLE_ID] = Config.get_vrfs(args.config[0]) pim_globals.MULTICAST_TABLE_ID, pim_globals.UNICAST_TABLE_ID = Config.get_vrfs(args.config[0])
daemon = MyDaemon(pim_globals.DAEMON_PROCESS_FILE.format(pim_globals.MULTICAST_TABLE_ID)) daemon = MyDaemon(pim_globals.DAEMON_PROCESS_FILE.format(pim_globals.MULTICAST_TABLE_ID))
if not daemon.is_running(): if not daemon.is_running():
......
Markdown is supported
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