Posted on August 7, 2019 12:07 am
 |  Asked by Mateusz Jenek
 |  180 views
0
0
Print Friendly, PDF & Email

Hi!

I configured restconf management api on vEOS 4.22.0F. Fetching data (GET) works fine, but now I’m dealing with changing some configuration (PUT, PATCH, POST) and nothing happens. It’s probably my fault, but I can’t find what I’m doing wrong.

For example
GET /restconf/data/interfaces/interface=Management1/config
BODY: none
RETURN: 200 OK
{
“arista-intf-augments:arista-tpid”: “TPID_0X8100”,
“openconfig-interfaces:description”: “”,
“openconfig-interfaces:enabled”: true,
“arista-intf-augments:load-interval”: 300,
“openconfig-interfaces:loopback-mode”: false,
“openconfig-interfaces:mtu”: 0,
“openconfig-interfaces:name”: “Management1”,
“openconfig-interfaces:type”: “ethernetCsmacd”
}

PUT & POST /restconf/data/interfaces/interface=Management1/config
BODY:
{
“openconfig-interfaces:description”: “description”
}
RETURN: 200 OK
{
“openconfig-interfaces:description”: “description”
}

PATCH /restconf/data/interfaces/interface=Management1/config
BODY:
{
“openconfig-interfaces:description”: “description”
}
RETURN: 200 OK
{
“arista-intf-augments:arista-tpid”: “TPID_0X8100”,
“openconfig-interfaces:description”: “”,
“openconfig-interfaces:enabled”: true,
“arista-intf-augments:load-interval”: 300,
“openconfig-interfaces:loopback-mode”: false,
“openconfig-interfaces:mtu”: 0,
“openconfig-interfaces:name”: “Management1”,
“openconfig-interfaces:type”: “ethernetCsmacd”
}

It works the same when I try to send full body:
{
“arista-intf-augments:arista-tpid”: “TPID_0X8100”,
“openconfig-interfaces:description”: “description”,
“openconfig-interfaces:enabled”: true,
“arista-intf-augments:load-interval”: 300,
“openconfig-interfaces:loopback-mode”: false,
“openconfig-interfaces:mtu”: 0,
“openconfig-interfaces:name”: “Management1”,
“openconfig-interfaces:type”: “ethernetCsmacd”
}

0
Posted by Tamas Plugor
Answered on August 7, 2019 10:46 am

Hi Mateusz,

You did it the right way, unfortunately when using PUT and POST currently the CLI commands are not generated after the updates are registered in the YANG server. We’re tracking this under BUG398831 and will be fixed in an upcoming release. If you’d be interested in a patch for a specific release, best would be to open a support case by sending an email to support@arista.com

Thanks,
Tamas

Post your Answer

You must be logged in to post an answer.