netopeer2
netopeer2 copied to clipboard
RPC edit-config Failing
Hi,
We are sending the RPC edit-config with following xml:
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
<interface>
<name>eth0</name>
<enabled>true</enabled>
<ipv6 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip">
<address>
<ip>fe80::881b:1fff:fe58:f81e</ip>
<prefix-length>64</prefix-length>
</address>
</ipv6>
<mac-address xmlns="urn:o-ran:interfaces:1.0">8A:1B:1F:58:F8:1E</mac-address>
<vlan-id xmlns="urn:o-ran:interfaces:1.0">30</vlan-id>
<type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:l2vlan</type>
</interface>
</interfaces>
And it's failing with following error print: Tag: operation-failed Type: application Severity: error Message: Opaque (invalid) node "mac-address" cannot be created."
Any idea what could be the reason of above failure ?
Most likely that there is no mac-address schema node as child of interface in the namespace urn:o-ran:interfaces:1.0. It could only be added by augment this way so I would double-check that it is.
It was happening as "iana-if-type.yang" was not Installed but was Imported (as per sysrepoctl -l output). With older version i.e. 1.x of libnetconf, sysrepo and libyang the "iana-if-type.yang" was getting installed as Dependency by sysrepocfg but with 2.0 version it was not. So, we had to get it installed explicitly, which solved the issue.