]> git.proxmox.com Git - mirror_ifupdown2.git/commitdiff
ifupdownmain: add "all" parameter to get_all_ifaceobjs
authorJulien Fortin <jfortin@nvidia.com>
Tue, 6 Apr 2021 21:30:34 +0000 (23:30 +0200)
committerJulien Fortin <jfortin@nvidia.com>
Wed, 30 Jun 2021 14:41:07 +0000 (16:41 +0200)
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 <jfortin@nvidia.com>
ifupdown2/ifupdown/ifupdownmain.py

index 1845dbaa239a709058a071f771f81b438a8c7dd7..1d23502d7d01c4c5df172c0d41d1a6ad54a67f2d 100644 (file)
@@ -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):