mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
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>
This commit is contained in:
committed by
Ganesh Nalawade
parent
031655def0
commit
0cb0fa918f
@@ -55,6 +55,10 @@ options:
|
|||||||
ospf:
|
ospf:
|
||||||
description: OSPF protocol
|
description: OSPF protocol
|
||||||
choices: ['enabled', 'disabled']
|
choices: ['enabled', 'disabled']
|
||||||
|
nve:
|
||||||
|
description: nve protocol
|
||||||
|
choices: ['enabled', 'disabled']
|
||||||
|
version_added: "2.9"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
EXAMPLES = """
|
EXAMPLES = """
|
||||||
@@ -107,6 +111,8 @@ class OnyxProtocolModule(BaseOnyxModule):
|
|||||||
bgp=dict(name="bgp", enable="protocol bgp", disable="no protocol bgp"),
|
bgp=dict(name="bgp", enable="protocol bgp", disable="no protocol bgp"),
|
||||||
ospf=dict(name="ospf", enable="protocol ospf",
|
ospf=dict(name="ospf", enable="protocol ospf",
|
||||||
disable="no protocol ospf"),
|
disable="no protocol ospf"),
|
||||||
|
nve=dict(name="nve", enable="protocol nve",
|
||||||
|
disable="no protocol nve"),
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -132,3 +132,12 @@ class TestOnyxProtocolModule(TestOnyxModule):
|
|||||||
def test_ospf_disable(self):
|
def test_ospf_disable(self):
|
||||||
set_module_args(dict(ospf='disabled'))
|
set_module_args(dict(ospf='disabled'))
|
||||||
self.execute_module(changed=False)
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user