diff options
author | anasbadaha <43231942+anasbadaha@users.noreply.github.com> | 2019-05-11 15:09:48 +0300 |
---|---|---|
committer | Ganesh Nalawade <ganesh634@gmail.com> | 2019-05-11 08:09:48 -0400 |
commit | 0cb0fa918fbbaedbe7b21cc832e8faef63393db8 (patch) | |
tree | dc7d133dc5d65fe5ffe7c483977990088079005f | |
parent | 031655def0bb8cafb95199bd0145a9330d1995c7 (diff) | |
download | ansible-0cb0fa918fbbaedbe7b21cc832e8faef63393db8.tar.gz |
Adding Support for NVE Protocol in onyx_protocol (#55513)
* Adding Support for NVE Protocol in onyx_protocol
Signed-off-by: Anas Badaha <anasb@mellanox.com>
* Fix Pep8 Failures in onyx_protocol.py
Signed-off-by: Anas Badaha <anasb@mellanox.com>
-rw-r--r-- | lib/ansible/modules/network/onyx/onyx_protocol.py | 6 | ||||
-rw-r--r-- | test/units/modules/network/onyx/test_onyx_protocols.py | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/ansible/modules/network/onyx/onyx_protocol.py b/lib/ansible/modules/network/onyx/onyx_protocol.py index 7594413612..ce5c6360ba 100644 --- a/lib/ansible/modules/network/onyx/onyx_protocol.py +++ b/lib/ansible/modules/network/onyx/onyx_protocol.py @@ -55,6 +55,10 @@ options: ospf: description: OSPF protocol choices: ['enabled', 'disabled'] + nve: + description: nve protocol + choices: ['enabled', 'disabled'] + version_added: "2.9" """ EXAMPLES = """ @@ -107,6 +111,8 @@ class OnyxProtocolModule(BaseOnyxModule): bgp=dict(name="bgp", enable="protocol bgp", disable="no protocol bgp"), ospf=dict(name="ospf", enable="protocol ospf", disable="no protocol ospf"), + nve=dict(name="nve", enable="protocol nve", + disable="no protocol nve"), ) @classmethod diff --git a/test/units/modules/network/onyx/test_onyx_protocols.py b/test/units/modules/network/onyx/test_onyx_protocols.py index 2353a40632..8dee5b832f 100644 --- a/test/units/modules/network/onyx/test_onyx_protocols.py +++ b/test/units/modules/network/onyx/test_onyx_protocols.py @@ -132,3 +132,12 @@ class TestOnyxProtocolModule(TestOnyxModule): def test_ospf_disable(self): set_module_args(dict(ospf='disabled')) self.execute_module(changed=False) + + def test_nve_enable(self): + set_module_args(dict(nve='enabled')) + commands = ['protocol nve'] + self.execute_module(changed=True, commands=commands) + + def test_nve_disabled(self): + set_module_args(dict(nve='disabled')) + self.execute_module(changed=False) |