Posted on August 7, 2019 12:07 am
 |  Asked by Mateusz Jenek
 |  336 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

Is this already fixed? I'm using Eos 4.23.1F and I have the same issue
(Dennis van Leeuwen at February 4, 2020 8:04 am)
0
Posted by Carl Abou Jawdeh
Answered on February 17, 2020 1:14 am

I am having the same issue
Also having the same problem with Netconf

PUT/POST are working starting from 4.23.1F in RESTCONF, however there are some caveats, like it would fail if "ip address unnumbered" is configured on any interfaces, which is being worked on now. Netconf is a bit different, and should be discussed in a different topic. Might be better to open a case, send us your nc script if you're using python or the ssh command and running-config. Thanks, Tamas
(Tamas Plugor at February 17, 2020 2:20 pm)

Post your Answer

You must be logged in to post an answer.