eos_lacp_interfaces : Fix to - lacp port-priority not set when… (#64530)

* Fix bug 64453
This commit is contained in:
GomathiselviS 2019-11-13 09:31:21 -05:00 committed by Nathaniel Case
parent 83927c3437
commit 143bafec9a
2 changed files with 4 additions and 3 deletions

View file

@ -199,15 +199,15 @@ class Lacp_interfaces(ConfigBase):
def generate_commands(interface, to_set, to_remove):
commands = []
for key in to_remove.keys():
commands.append("no lacp {0}".format(key.replace("_", "-")))
for key, value in to_set.items():
if value is None:
continue
commands.append("lacp {0} {1}".format(key.replace("_", "-"), value))
for key in to_remove.keys():
commands.append("no lacp {0}".format(key.replace("_", "-")))
if commands:
commands.insert(0, "interface {0}".format(interface))

View file

@ -5,6 +5,7 @@
config:
- name: Ethernet1
rate: fast
port_priority: 45
other_config:
- name: Ethernet2
rate: fast