cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1028
Views
0
Helpful
1
Replies

configuration manipulation with APIC-EM

Cristian Ruta
Level 1
Level 1

Hello,

I am trying out the API of APIC-EM and I encounter problems in updating interface fields like : IP/mask, speed/duplex, description, mode.

Here is an example:

The POST body is:

[{

        "ipv4Address": "10.10.30.1",

        "ipv4Mask": "30",

        "id": "edbc9c9c-eef9-4f57-a6bd-4f07c902b557"

    }

]

Request URL

https://10.10.10.107:443/api/v0/interface

Response Body

{ "response": { "taskId": "917c54d5-0bd6-4b53-a04e-56822837ebed", "url": "/api/v0/task/917c54d5-0bd6-4b53-a04e-56822837ebed" }, "version": "0.0" }

Task is ok:

Request URL

https://10.10.10.107:443/api/v0/task/917c54d5-0bd6-4b53-a04e-56822837ebed

Response Body

{ "response": { "id": "917c54d5-0bd6-4b53-a04e-56822837ebed", "rootId": "917c54d5-0bd6-4b53-a04e-56822837ebed", "serviceType": "Inventory service", "progress": "Interface updated successfully #edbc9c9c-eef9-4f57-a6bd-4f07c902b557 ", "startTime": 1430148662699, "endTime": 1430148662725 }, "version": "0.0" }

With GET we see the updated info, also in the GUI

result is: {

    "version": "0.0",

    "response": {

        "ipv4Address": "10.10.30.1",

        "macAddress": "FC:5B:39:D4:4C:01",

        "vendor": "Cisco",

        "ipv4Mask": "30",

        "duplex": true,

        "serialNo": "FGL183710LP",

        "pid": "ISR4451-X/K9",

        "lastUpdated": "2015-04-27 15:30:12.629034+00",

        "status": "up",

        "numUpdates": 534,

        "interfaceType": "Physical",

        "deviceId": "5a89d2c4-9613-4a2e-900a-4122a900788a",

        "portName": "GigabitEthernet0/0/1",

        "portType": "ISR4451-X-4x1GE",

        "ospfSupport": true,

        "connectorType": "RJ-45",

        "id": "edbc9c9c-eef9-4f57-a6bd-4f07c902b557",

        "speed": 1000000,

        "avgUpdateFrequency": 181

    }

BUT in reality, the configuration on the network element is not updated:


ISR4451X-B#sh run int gi 0/0/1

Building configuration...

Current configuration : 194 bytes

!

interface GigabitEthernet0/0/1

description P2P link to 3560-X

ip address 10.10.30.65 255.255.255.252

speed 1000

no negotiation auto

service-policy input PM

service-policy output PM

end

ISR4451X-B#sh ip int gi 0/0/1

GigabitEthernet0/0/1 is up, line protocol is up

  Internet address is 10.10.30.65/30

  Broadcast address is 255.255.255.255

Is there a specific issue or I am not doing it in the right way?

I have also tried to delete and post a new interface but still does not work.

Thank you,

Cristian Ruta

ruta.cristian@gmail.com

1 Accepted Solution

Accepted Solutions

yawming
Cisco Employee
Cisco Employee

The /interface API is NOT for changing device state

View solution in original post

1 Reply 1

yawming
Cisco Employee
Cisco Employee

The /interface API is NOT for changing device state

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:


This community is intended for developer topics around Data Center technology and products. If you are looking for a non-developer topic about Data Center, you might find additional information in the Data Center and Cloud community