Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
When we use module in subject we receive traceback using static_ports key with force_replace settled at false.
Affected Module Name(s):
- cisco.mso.mso_schema_site_anp_epg_staticport
MSO version and MSO Platform
- V 4.2.3e and ND-based
APIC version and APIC Platform for Site Level Resources
- V 5.2(7g) and on-prem.
Collection versions
- cisco.mso 2.8.0
Output/ Error message
reduced:
"data": [{"op": "replace", "path": "/sites/65a18392228bd7433388d221-AUTONOMOUS_BD-EPG-APP/anps/L2_APP/epgs/1401_Heartbeat_AAAA_EPG/staticPorts/0", "value": {"deploymentImmediacy": "immediate", "mode": "regular", "path": "topology/pod-2/protpaths-1001-1002/pathep-[VPC_1_1_IPG]", "portEncapVlan": 1401, "type": "vpc"}}, {"op": "replace", "path": "/sites/65a18392228bd7433388d221-AUTONOMOUS_BD-EPG-APP/anps/L2_APP/epgs/1401_Heartbeat_AAAA_EPG/staticPorts/1", "value": {"deploymentImmediacy": "immediate", "mode": "regular", "path": "topology/pod-2/protpaths-1001-1002/pathep-[VPC_1_2_IPG]", "portEncapVlan": 1401, "type": "vpc"}}], "info": {"body": "{"code":400,"message":"staticPort path in site: ACME-PRODACI-01 anp: epg: must be unique","info":null}", "connection": "close", "content-language": "en", "content-length": "103", "content-type": "application/json", "date": "Wed, 24 Jul 2024 15:44:07 GMT", "msg": "HTTP Error 400: Bad Request", "server": "nginx", "status": 400, "strict-transport-security": "max-age=31536000; includeSubDomains", "url": "https://11.1.1.1/api/v1/schemas/sfsdfdfd?validate=false", "x-ratelimit-limit": "-1", "x-ratelimit-remaining": "-1", "x-ratelimit-reset": "1559582945"}, "msg": "MSO Error 400: staticPort path in site: ACME-PRODACI-01 anp: epg: must be unique", "payload": {"code": 400, "info": null, "message": "staticPort path in site: ACME-PRODACI-01 anp: epg: must be unique"}, "status": 400}
*
Expected Behavior
We expect that Ansible configure static ports on EPG in bulk fashion,
Playbook tasks to Reproduce
-
name: Configure static_binding
hosts: ndo
connection: local
vars:
schema: 65a18392228bd7433388d221
site: ACME-PRODACI-01
template: AUTONOMOUS_BD-EPG-APP
anp: L2_APP
epg: 1401_Heartbeat_AAAA_EPG
static_ports:
- deploy_immediacy: immediate
vlan: 1401
mode: regular
path: eth1/1
leaf: 1001
pod: pod-1tasks:
- name: Add static port to a site EPG from csv
cisco.mso.mso_schema_site_anp_epg_staticport:
host: "{{ ansible_host }}"
username: "{{ ansible_user }}"
password: "{{ ansible_password }}"
schema: "{{ schema }}"
site: "{{ site }}"
template: "{{ template }}"
anp: "{{ anp }}"
epg: "{{ epg }}"
static_ports: "{{static_ports}}"
force_replace: false
state: present
validate_certs: false
use_proxy: false
delegate_to: localhost
retries: 3
until: static_port_port is not failed
register: static_port_port
check_mode: "{{ mock }}"
throttle: 1
- name: Add static port to a site EPG from csv
Important Factoids
References
- #0000