mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
nxos_evpn_global refactor (#24919)
* nxos_evpn_global refactor Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * ansibot told me to do this Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
4ac135c1b5
commit
4066b03a4c
2 changed files with 9 additions and 8 deletions
|
@ -16,10 +16,11 @@
|
||||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
ANSIBLE_METADATA = {
|
||||||
'status': ['preview'],
|
'metadata_version': '1.0',
|
||||||
'supported_by': 'community'}
|
'status': ['preview'],
|
||||||
|
'supported_by': 'community'
|
||||||
|
}
|
||||||
|
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
|
@ -50,11 +51,13 @@ commands:
|
||||||
type: list
|
type: list
|
||||||
sample: ['nv overlay evpn']
|
sample: ['nv overlay evpn']
|
||||||
'''
|
'''
|
||||||
|
|
||||||
from ansible.module_utils.basic import AnsibleModule
|
from ansible.module_utils.basic import AnsibleModule
|
||||||
from ansible.module_utils.nxos import get_config, load_config
|
from ansible.module_utils.nxos import get_config, load_config
|
||||||
from ansible.module_utils.nxos import nxos_argument_spec
|
from ansible.module_utils.nxos import nxos_argument_spec
|
||||||
from ansible.module_utils.nxos import check_args as nxos_check_args
|
from ansible.module_utils.nxos import check_args as nxos_check_args
|
||||||
|
|
||||||
|
|
||||||
def check_args(module, warnings):
|
def check_args(module, warnings):
|
||||||
nxos_check_args(module, warnings)
|
nxos_check_args(module, warnings)
|
||||||
|
|
||||||
|
@ -62,6 +65,7 @@ def check_args(module, warnings):
|
||||||
if module.params[key] is not None:
|
if module.params[key] is not None:
|
||||||
warnings.append('argument %s is no longer supported, ignoring value' % key)
|
warnings.append('argument %s is no longer supported, ignoring value' % key)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
nv_overlay_evpn=dict(required=True, type='bool'),
|
nv_overlay_evpn=dict(required=True, type='bool'),
|
||||||
|
@ -74,8 +78,7 @@ def main():
|
||||||
|
|
||||||
argument_spec.update(nxos_argument_spec)
|
argument_spec.update(nxos_argument_spec)
|
||||||
|
|
||||||
module = AnsibleModule(argument_spec=argument_spec,
|
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True)
|
||||||
supports_check_mode=True)
|
|
||||||
|
|
||||||
result = {'changed': False}
|
result = {'changed': False}
|
||||||
|
|
||||||
|
@ -105,4 +108,3 @@ def main():
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
|
@ -467,7 +467,6 @@ lib/ansible/modules/network/nxos/nxos_aaa_server_host.py
|
||||||
lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py
|
lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py
|
||||||
lib/ansible/modules/network/nxos/nxos_command.py
|
lib/ansible/modules/network/nxos/nxos_command.py
|
||||||
lib/ansible/modules/network/nxos/nxos_config.py
|
lib/ansible/modules/network/nxos/nxos_config.py
|
||||||
lib/ansible/modules/network/nxos/nxos_evpn_global.py
|
|
||||||
lib/ansible/modules/network/nxos/nxos_facts.py
|
lib/ansible/modules/network/nxos/nxos_facts.py
|
||||||
lib/ansible/modules/network/nxos/nxos_feature.py
|
lib/ansible/modules/network/nxos/nxos_feature.py
|
||||||
lib/ansible/modules/network/nxos/nxos_gir.py
|
lib/ansible/modules/network/nxos/nxos_gir.py
|
||||||
|
|
Loading…
Reference in a new issue