From 3b1f78c181e86a3351ec2f0a08ecf8a9e0a1d79b Mon Sep 17 00:00:00 2001 From: Julien Fortin Date: Tue, 6 Apr 2021 23:30:34 +0200 Subject: [PATCH] ifupdownmain: add "all" parameter to get_all_ifaceobjs On a MLAG configured switch, only one vlan aware bridge is supported The clag module need to access the full list of ifaceobjs. This is a bit breaking the existing segmentation, not great but would otherwise require a huge refactoring/rework. Signed-off-by: Julien Fortin --- ifupdown2/ifupdown/ifupdownmain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ifupdown2/ifupdown/ifupdownmain.py b/ifupdown2/ifupdown/ifupdownmain.py index 1845dba..1d23502 100644 --- a/ifupdown2/ifupdown/ifupdownmain.py +++ b/ifupdown2/ifupdown/ifupdownmain.py @@ -448,7 +448,9 @@ class ifupdownMain: return True return False - def get_ifaceobjs(self, ifacename): + def get_ifaceobjs(self, ifacename, all=False): + if all: + return dict(self.ifaceobjdict) return self.ifaceobjdict.get(ifacename) def get_ifaceobjs_saved(self, ifacename):