cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1726
Views
0
Helpful
2
Replies

Cisco ACI setting port description for leaf ports

Under Fabric-Inventory-Pod x- Leafxxx-Interfaces-Physical Interfaces-Eth1/1 you can add a Description to that port.  Login to the leaf and do a show interface status shows the description.

Is there a way to set this description with ansible or terraform? I have not found a module for this, and I have tried using the rest api. But with no luck.

Has anyone done this?

 

I would like to be able to set the description with information extracted from dcTrack. Our DC guys does the cabling in our DC's and update dcTrack.  We can extract this information with api and want to use it for descripton as mentioned above.

1 Accepted Solution

Accepted Solutions

this seemed to solve the problem:

- name: ACI REST
hosts: localhost
connection: local
gather_facts: no

vars:
validate_certs: no

tasks:
- name: Using REST API with a JSON string
aci_rest:
hostname: 10.166.254.10
username: '{{ username }}'
password: '{{ password }}'
validate_certs: '{{ validate_certs }}'
method: post
path: /api/node/mo/uni/infra/hpaths-201_eth1_1.json
content: |
{
"infraHPathS": {
"attributes": {
"descr":"apic1"
}
}
}

View solution in original post

2 Replies 2

this seemed to solve the problem:

- name: ACI REST
hosts: localhost
connection: local
gather_facts: no

vars:
validate_certs: no

tasks:
- name: Using REST API with a JSON string
aci_rest:
hostname: 10.166.254.10
username: '{{ username }}'
password: '{{ password }}'
validate_certs: '{{ validate_certs }}'
method: post
path: /api/node/mo/uni/infra/hpaths-201_eth1_1.json
content: |
{
"infraHPathS": {
"attributes": {
"descr":"apic1"
}
}
}

O.K.
Level 1
Level 1

Hi, 

you can also use the cisco.aci.aci_access_port_block_to_access_port module, if you wish. I think it looks a bit nicer in the playbook. 

Regards.

Oz 

 

 

Save 25% on Day-2 Operations Add-On License