Posted on August 3, 2020 11:49 pm
 |  Asked by Andrzej Mięsiak
 |  61 views
0
0
Print Friendly, PDF & Email

Hello,

I have tried to use Arista NETCONF with ydk (YANG Development Kit), and ydk have problems parsing get-config rpc response from Arista switch (it was get-config interface with filter – plese see attached file for details).

The problem seem to be caused by “time-modified” attribute in “data” XML tag, which according to ydk mainteners,
does not conform to NETCONF standard. Could anyone shed some light on this? I have tested with cEOS-lab-4.24.1.1F.

Attachments:
0
Posted by Lokesh Charora
Answered on August 4, 2020 2:02 pm

Hello Anderzej,

time-modified attribute isn't defined in the default namespace, so this causes confusion for some clients who looks in the default namespace to find the attribute but cannot find it.

To work around this, we should register a module namespace along the lines of "http://arista.com/yang/arista/datastore", prefix "ards" and register that in
this element, e.g.,

<data xmlns:ards="http://arista.com/yang/arista/datastore" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" ards:time-modified="..."</data>

Basically this means adding this attribute to the start element, and changing the "xml:",attr"" tag for time-modified to look like, e.g.,

TimeModified time.Time `xml:"http://arista.com/yang/arista/datastore time-modified,attr"`

Let me know if this helps.

Thanks
Lokesh

Post your Answer

You must be logged in to post an answer.