|
|
|
@ -14,9 +14,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
|
|
|
DOCUMENTATION = r'''
|
|
|
|
DOCUMENTATION = r'''
|
|
|
|
---
|
|
|
|
---
|
|
|
|
module: mso_schema_site_anp_epg_staticport
|
|
|
|
module: mso_schema_site_anp_epg_staticport
|
|
|
|
short_description: Manage site EPG static ports in schema template
|
|
|
|
short_description: Manage site-local EPG static ports in schema template
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Manage site EPG static ports in schema template on Cisco ACI Multi-Site.
|
|
|
|
- Manage site-local EPG static ports in schema template on Cisco ACI Multi-Site.
|
|
|
|
author:
|
|
|
|
author:
|
|
|
|
- Dag Wieers (@dagwieers)
|
|
|
|
- Dag Wieers (@dagwieers)
|
|
|
|
version_added: '2.8'
|
|
|
|
version_added: '2.8'
|
|
|
|
@ -66,7 +66,7 @@ options:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The port encap VLAN id of the static port.
|
|
|
|
- The port encap VLAN id of the static port.
|
|
|
|
type: int
|
|
|
|
type: int
|
|
|
|
immediacy:
|
|
|
|
deployment_immediacy:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The deployment immediacy of the static port.
|
|
|
|
- The deployment immediacy of the static port.
|
|
|
|
- C(immediate) means B(Deploy immediate).
|
|
|
|
- C(immediate) means B(Deploy immediate).
|
|
|
|
@ -110,7 +110,7 @@ EXAMPLES = r'''
|
|
|
|
leaf: 101
|
|
|
|
leaf: 101
|
|
|
|
path: eth1/1
|
|
|
|
path: eth1/1
|
|
|
|
vlan: 126
|
|
|
|
vlan: 126
|
|
|
|
immediacy: immediate
|
|
|
|
deployment_immediacy: immediate
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
delegate_to: localhost
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
|
|
@ -183,7 +183,7 @@ def main():
|
|
|
|
leaf=dict(type='str'), # This parameter is not required for querying all objects
|
|
|
|
leaf=dict(type='str'), # This parameter is not required for querying all objects
|
|
|
|
path=dict(type='str'), # This parameter is not required for querying all objects
|
|
|
|
path=dict(type='str'), # This parameter is not required for querying all objects
|
|
|
|
vlan=dict(type='int'), # This parameter is not required for querying all objects
|
|
|
|
vlan=dict(type='int'), # This parameter is not required for querying all objects
|
|
|
|
immediacy=dict(type='str', choices=['immediate', 'lazy']),
|
|
|
|
deployment_immediacy=dict(type='str', choices=['immediate', 'lazy']),
|
|
|
|
mode=dict(type='str', choices=['native', 'regular', 'untagged']),
|
|
|
|
mode=dict(type='str', choices=['native', 'regular', 'untagged']),
|
|
|
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
|
|
|
state=dict(type='str', default='present', choices=['absent', 'present', 'query']),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -207,7 +207,7 @@ def main():
|
|
|
|
leaf = module.params['leaf']
|
|
|
|
leaf = module.params['leaf']
|
|
|
|
path = module.params['path']
|
|
|
|
path = module.params['path']
|
|
|
|
vlan = module.params['vlan']
|
|
|
|
vlan = module.params['vlan']
|
|
|
|
immediacy = module.params['immediacy']
|
|
|
|
deployment_immediacy = module.params['deployment_immediacy']
|
|
|
|
mode = module.params['mode']
|
|
|
|
mode = module.params['mode']
|
|
|
|
state = module.params['state']
|
|
|
|
state = module.params['state']
|
|
|
|
|
|
|
|
|
|
|
|
@ -266,7 +266,7 @@ def main():
|
|
|
|
mso.fail_json(msg="Static port '{portpath}' not found".format(portpath=portpath))
|
|
|
|
mso.fail_json(msg="Static port '{portpath}' not found".format(portpath=portpath))
|
|
|
|
mso.exit_json()
|
|
|
|
mso.exit_json()
|
|
|
|
|
|
|
|
|
|
|
|
ports_path = '/sites/{0}/anps/{1}/epgs/{2}/staticports'.format(site_template, anp_idx, epg_idx)
|
|
|
|
ports_path = '/sites/{0}/anps/{1}/epgs/{2}/staticPorts'.format(site_template, anp_idx, epg_idx)
|
|
|
|
ops = []
|
|
|
|
ops = []
|
|
|
|
|
|
|
|
|
|
|
|
mso.previous = mso.existing
|
|
|
|
mso.previous = mso.existing
|
|
|
|
@ -277,13 +277,13 @@ def main():
|
|
|
|
|
|
|
|
|
|
|
|
elif state == 'present':
|
|
|
|
elif state == 'present':
|
|
|
|
if not mso.existing:
|
|
|
|
if not mso.existing:
|
|
|
|
if immediacy is None:
|
|
|
|
if deployment_immediacy is None:
|
|
|
|
immediacy = 'lazy'
|
|
|
|
deployment_immediacy = 'lazy'
|
|
|
|
if mode is None:
|
|
|
|
if mode is None:
|
|
|
|
mode = 'untagged'
|
|
|
|
mode = 'untagged'
|
|
|
|
|
|
|
|
|
|
|
|
payload = dict(
|
|
|
|
payload = dict(
|
|
|
|
deploymentImmediacy=immediacy,
|
|
|
|
deploymentImmediacy=deployment_immediacy,
|
|
|
|
mode=mode,
|
|
|
|
mode=mode,
|
|
|
|
path=portpath,
|
|
|
|
path=portpath,
|
|
|
|
portEncapVlan=vlan,
|
|
|
|
portEncapVlan=vlan,
|
|
|
|
|