Supporting bfd command in Ansible. (#64509)

pull/66279/head
Sara-Touqan 5 years ago committed by ansibot
parent 20503d7078
commit 96b1efdce4

@ -59,6 +59,10 @@ options:
description: nve protocol
choices: ['enabled', 'disabled']
version_added: "2.9"
bfd:
description: bfd protocol
choices: ['enabled', 'disabled']
version_added: "2.10"
"""
EXAMPLES = """
@ -113,6 +117,8 @@ class OnyxProtocolModule(BaseOnyxModule):
disable="no protocol ospf"),
nve=dict(name="nve", enable="protocol nve",
disable="no protocol nve"),
bfd=dict(name="bfd", enable="protocol bfd",
disable="no protocol bfd"),
)
@classmethod

@ -22,5 +22,6 @@
"dot1x": "disabled",
"bgp": "disabled",
"priority-flow-control": "disabled",
"ospf": "disabled"
"ospf": "disabled",
"bfd": "disabled"
}

@ -141,3 +141,12 @@ class TestOnyxProtocolModule(TestOnyxModule):
def test_nve_disabled(self):
set_module_args(dict(nve='disabled'))
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…
Cancel
Save