Supporting bfd command in Ansible. (#64509)
This commit is contained in:
parent
20503d7078
commit
96b1efdce4
|
@ -59,6 +59,10 @@ options:
|
||||||
description: nve protocol
|
description: nve protocol
|
||||||
choices: ['enabled', 'disabled']
|
choices: ['enabled', 'disabled']
|
||||||
version_added: "2.9"
|
version_added: "2.9"
|
||||||
|
bfd:
|
||||||
|
description: bfd protocol
|
||||||
|
choices: ['enabled', 'disabled']
|
||||||
|
version_added: "2.10"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
|
@ -113,6 +117,8 @@ class OnyxProtocolModule(BaseOnyxModule):
|
||||||
disable="no protocol ospf"),
|
disable="no protocol ospf"),
|
||||||
nve=dict(name="nve", enable="protocol nve",
|
nve=dict(name="nve", enable="protocol nve",
|
||||||
disable="no protocol nve"),
|
disable="no protocol nve"),
|
||||||
|
bfd=dict(name="bfd", enable="protocol bfd",
|
||||||
|
disable="no protocol bfd"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -22,5 +22,6 @@
|
||||||
"dot1x": "disabled",
|
"dot1x": "disabled",
|
||||||
"bgp": "disabled",
|
"bgp": "disabled",
|
||||||
"priority-flow-control": "disabled",
|
"priority-flow-control": "disabled",
|
||||||
"ospf": "disabled"
|
"ospf": "disabled",
|
||||||
|
"bfd": "disabled"
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,3 +141,12 @@ class TestOnyxProtocolModule(TestOnyxModule):
|
||||||
def test_nve_disabled(self):
|
def test_nve_disabled(self):
|
||||||
set_module_args(dict(nve='disabled'))
|
set_module_args(dict(nve='disabled'))
|
||||||
self.execute_module(changed=False)
|
self.execute_module(changed=False)
|
||||||
|
|
||||||
|
def test_bfd_enable(self):
|
||||||
|
set_module_args(dict(bfd='enabled'))
|
||||||
|
commands = ['protocol bfd']
|
||||||
|
self.execute_module(changed=True, commands=commands)
|
||||||
|
|
||||||
|
def test_bfd_disabled(self):
|
||||||
|
set_module_args(dict(bfd='disabled'))
|
||||||
|
self.execute_module(changed=False)
|
||||||
|
|
Loading…
Reference in a new issue