@@ -1768,7 +1768,7 @@ def _preprocess_excludepats(self, excludepats):
1768
1768
self .logger .info ('excludepats after processing companions [%s]' % ' ' .join (new_excludepats ))
1769
1769
return new_excludepats
1770
1770
1771
- def up (self , ops , auto = False , allow_classes = None , ifacenames = None ,
1771
+ def up (self , ops , all_itf = False , allow_classes = None , ifacenames = None ,
1772
1772
excludepats = None , printdependency = None , syntaxcheck = False ,
1773
1773
type = None , skipupperifaces = False ):
1774
1774
"""This brings the interface(s) up
@@ -1791,7 +1791,7 @@ def up(self, ops, auto=False, allow_classes=None, ifacenames=None,
1791
1791
ifupdownflags .flags .CLASS = True
1792
1792
if not self .flags .ADDONS_ENABLE :
1793
1793
self .flags .STATEMANAGER_UPDATE = False
1794
- if auto :
1794
+ if all_itf :
1795
1795
ifupdownflags .flags .ALL = True
1796
1796
ifupdownflags .flags .WITH_DEPENDS = True
1797
1797
try :
@@ -1802,24 +1802,12 @@ def up(self, ops, auto=False, allow_classes=None, ifacenames=None,
1802
1802
if excludepats :
1803
1803
excludepats = self ._preprocess_excludepats (excludepats )
1804
1804
1805
- filtered_ifacenames = None
1806
- if ifacenames :
1807
- ifacenames = self ._preprocess_ifacenames (ifacenames )
1808
-
1809
- if allow_classes :
1810
- filtered_ifacenames = self ._get_filtered_ifacenames_with_classes (auto , allow_classes , excludepats , ifacenames )
1811
-
1812
- # if iface list not given by user, assume all from config file
1813
- if not ifacenames : ifacenames = list (self .ifaceobjdict .keys ())
1814
-
1815
- if not filtered_ifacenames :
1816
- # filter interfaces based on auto and allow classes
1817
- filtered_ifacenames = [i for i in ifacenames
1818
- if self ._iface_whitelisted (auto , allow_classes ,
1819
- excludepats , i )]
1805
+ # Get a filtered list of interfaces to work on
1806
+ filtered_ifacenames = self ._get_filtered_ifacenames_with_classes (
1807
+ all_itf , allow_classes , excludepats , ifacenames )
1820
1808
1821
1809
if not filtered_ifacenames :
1822
- raise Exception ( 'no ifaces found matching given allow lists' )
1810
+ return
1823
1811
1824
1812
if printdependency :
1825
1813
self .populate_dependency_info (ops , filtered_ifacenames )
0 commit comments