1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdownmain: add support for getting and introducing upperiface dependencies

This patch adds a new upperiface module handler get_upper_ifacenames
to get upperifaces from a addon module. This is called during building
dependency graph.

Closes: CM-9493
Review: dsa, nikhil, wkok (via git send-email)
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-02-25 23:55:27 -08:00
parent dbc018d39d
commit 4cc2df04d1
2 changed files with 58 additions and 7 deletions

View File

@@ -398,6 +398,14 @@ class iface():
else:
self.upperifaces = [upperifacename]
def add_to_lowerifaces(self, lowerifacename):
""" add to the list of lowerifaces """
if self.lowerifaces:
if lowerifacename not in self.lowerifaces:
self.lowerifaces.append(lowerifacename)
else:
self.lowerifaces = [lowerifacename]
def get_attr_value(self, attr_name):
""" add to the list of upperifaces """
return self.config.get(attr_name)