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

How to add filter for leaf node in get-config query of restconf. Gets " must be Container or List yang type" error.

This is my yang module.

container configuration { config true; container system { description "System parameters"; leaf host-name { type string { length "1 .. 255"; } } leaf time-zone { type string; } } }

How to write restconf get-config query to filter only host-name.

http://<ip>:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/ { "system": { "time-zone": "America/New_York", "host-name": "foo" } }

http://<ip>:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/host-name

{ "errors": { "error": [ { "error-type": "protocol", "error-tag": "invalid-value", "error-message": "URI has bad format. Node \"host-name\" must be Container or List yang type." } ] } }

How to add filter for leaf node in get-config query of restconf. Gets " must be Container or List yang type" error.

This is my yang module.

container configuration {
    config true;
    container system {
         description "System parameters";
          leaf host-name {
                type string {
                     length "1 .. 255";
                }
          }
          leaf time-zone {
                type string;
          }
     }
}

} http://ip:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/ { "system": { "time-zone": "America/New_York", "host-name": "foo" } } How to write restconf get-config query to filter only host-name.

http://<ip>:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/ { "system": { "time-zone": "America/New_York", "host-name": "foo" } }

http://<ip>:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/host-name

host-name ? http://ip:8080/restconf/config/opendaylight-inventory:nodes/node/m10schemanew/yang-ext:mount/configuration:configuration/system/host-name { "errors": { "error": [ { "error-type": "protocol", "error-tag": "invalid-value", "error-message": "URI has bad format. Node \"host-name\" must be Container or List yang type." } ] } }

}