using RESTful api to edit the Augment content "Unknown child(ren) node(s) detected"

asked 2016-03-09 17:22:29 -0700

amy gravatar image

updated 2016-03-09 22:26:15 -0700

recently I do some experiment with NETConf connector in ODL, I follow the step from the tutorial ""

I manage the device's information through the RESTful API, but in the YANG models, there are some augment model. I failed editing the augment content, and confused why failed.

so I want to know how to edit augment model with RESTful API, and please give me an example to help me, thanks a lot!

here I list my edit content: '''

curl -u admin:admin -v -X PUT -H "Content-Type: application/xml" -d '

<savi-instances xmlns="urn:ietf:params:xml:ns:yang:ietf-savi">








                <trust-attribute xmlns="urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4">false</trust-attribute>
                <dhcp-trust xmlns:dhcpv4="urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4">false</dhcp-trust>
                <dhcp-snooping xmlns:dhcpv4="urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4">true</dhcp-snooping>
                <data-snooping xmlns:dhcpv4="urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4">false</data-snooping>
                <validating xmlns:dhcpv4="urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4">true</validating>

' http://localhost:8181/restconf/config...

the error message is " {"errors":{"error":[{"error-type":"protocol","error-tag":"malformed-message","error-message":"Error parsing input: Unknown child(ren) node(s) detected, identified by: (urn:ietf:params:xml:ns:yang:ietf-savi-dhcpv4)trust-attribute, in: list if-attribute"}]}} "

I beg your help!

edit retag flag offensive close merge delete