mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: adding '--with-defaults' option for base ifquery
Ticket: CM-7840 Reviewed By: Roopa Prabhu Testing Done: yes, with different configurations for physical & logical devices This patch adds 'ifquery --with-defaults' to print the policy default values for unconfigured attributes. Signed-off-by: Nikhil <nikhil@cumulusnetworks.com>
This commit is contained in:
@@ -1694,7 +1694,8 @@ class bridge(moduleBase):
|
||||
|
||||
def _query(self, ifaceobj, **kwargs):
|
||||
""" add default policy attributes supported by the module """
|
||||
if not (ifaceobj.link_kind & ifaceLinkKind.BRIDGE):
|
||||
if (not (ifaceobj.link_kind & ifaceLinkKind.BRIDGE) or
|
||||
ifaceobj.get_attr_value_first('bridge-stp')):
|
||||
return
|
||||
if self.default_stp_on:
|
||||
ifaceobj.update_config('bridge-stp', 'yes')
|
||||
|
Reference in New Issue
Block a user