diff --git a/lib/ansible/modules/network/onyx/onyx_protocol.py b/lib/ansible/modules/network/onyx/onyx_protocol.py index ce5c6360ba0..60c4d12bbdd 100644 --- a/lib/ansible/modules/network/onyx/onyx_protocol.py +++ b/lib/ansible/modules/network/onyx/onyx_protocol.py @@ -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 diff --git a/test/units/modules/network/onyx/fixtures/onyx_protocols_show.cfg b/test/units/modules/network/onyx/fixtures/onyx_protocols_show.cfg index 8379ef21925..fd4549cdf29 100644 --- a/test/units/modules/network/onyx/fixtures/onyx_protocols_show.cfg +++ b/test/units/modules/network/onyx/fixtures/onyx_protocols_show.cfg @@ -22,5 +22,6 @@ "dot1x": "disabled", "bgp": "disabled", "priority-flow-control": "disabled", - "ospf": "disabled" + "ospf": "disabled", + "bfd": "disabled" } diff --git a/test/units/modules/network/onyx/test_onyx_protocols.py b/test/units/modules/network/onyx/test_onyx_protocols.py index 8dee5b832f5..c81dd8ee601 100644 --- a/test/units/modules/network/onyx/test_onyx_protocols.py +++ b/test/units/modules/network/onyx/test_onyx_protocols.py @@ -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)