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

Add default link parameter support for ethtool module

Ticket: CM-5254
Reviewed By: roopa
Testing Done: tested master and 2.5_br images with testifupdown2 suite and hand tested

This patch creates a json defaults file upon bootup
(which can be overridden by customer configs in /etc)
which the ethtool module in ifupdown2 will consult
when "link-x" configs are removed in order to restore
them to the initial settings used by the switch.
(cherry picked from commit 8388664f5a5a85f2a813cafbf40ac92d7b86f4bf)

Conflicts:
	packages/cl-utilities/usrlib/update-ports
(cherry picked from commit 21c9c10ab2fccaf60be9accb337e82541d497cc4)
This commit is contained in:
Sam Tannous
2015-05-10 15:42:47 -04:00
parent 88a5c4c89d
commit 3d44fbd0c9
5 changed files with 336 additions and 49 deletions

View File

@@ -1117,6 +1117,7 @@ class ifupdownMain(ifupdownBase):
self.ALL = True
self.WITH_DEPENDS = True
if new_ifaceobjdict:
# and now, ifaceobjdict is back to current config
self.ifaceobjdict = new_ifaceobjdict
self.dependency_graph = new_dependency_graph
@@ -1231,6 +1232,7 @@ class ifupdownMain(ifupdownBase):
if auto:
self.ALL = True
self.WITH_DEPENDS = True
# and now, we are back to the current config in ifaceobjdict
self.ifaceobjdict = new_ifaceobjdict
self.dependency_graph = new_dependency_graph
ifacenames = self.ifaceobjdict.keys()