Missing mandatory prefix for XML metadata "type"
Hi,
libyang is throwing below error while creating subscription:
Tag: operation-failed Type: application Severity: error Message: Missing mandatory prefix for XML metadata "type".
The RPC sent is
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="42"> <create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <filter type="xpath" xmlns:o-ran-supervision="urn:o-ran:supervision:1.0" select="/o-ran-supervision:*"/> </create-subscription> </rpc>
this is similar to issue https://github.com/CESNET/libyang/issues/1959
we are using libyang v3.5.0
Please suggest. Thank you.
As you correctly noticed, exactly the same issue was fixed in the past. I have also tried it with the current libyang version and it also worked so my advice is to update libyang, in case there was a regression.
Hi Michal,
Are you suggesting to upgrade libyang on server side?
Yes, that is the only advice I can give you.
Hi Michal,
our server uses the 3rd party code, can anything be done at client to send the subscription RPC with xml prefix for 'type' attribute?
the current RPC which is sent by client now is as below:
<create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <filter type="xpath" xmlns:o-ran-supervision="urn:o-ran:supervision:1.0" select="/o-ran-supervision:*"/> </create-subscription>
and the RPC which we expect the client to send:
<create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> <filter xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:type="xpath" xmlns:o-ran-supervision="urn:o-ran:supervision:1.0" nc:select="/o-ran-supervision:*"/> </create-subscription>
could you please suggest on this?
Yes, you can try sending such an RPC.