Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

using RESTful api to edit the Augment content

recently I do some experiment with NETConf connector in ODL, I follow the step from the tutorial "http://sdnhub.org/tutorials/opendaylight-tutorial/experimenting-with-netconf-connector-in-opendaylight/"

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!

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

recently I do some experiment with NETConf connector in ODL, I follow the step from the tutorial "http://sdnhub.org/tutorials/opendaylight-tutorial/experimenting-with-netconf-connector-in-opendaylight/"

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">

 <savi-instance>

      <savi-method>savi-dhcpv4</savi-method>

      <enable>true</enable>

      <preference>2</preference>

      <if-attributes>

           <if-attribute>

                <ifname>eth2</ifname>

                <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>
           </if-attribute>              
      </if-attributes>
</savi-instance>

</savi-instances> ' http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/savi2/yang-ext:mount/ietf-savi:savi/savi-instances

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!