Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
1.2.2, 1.1.3, 2.0.4
-
None
-
None
-
Operating System: All
Platform: All
-
8496
Description
Just tried carbon archetype with this model:
module archcarbon {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:archcarbon";
prefix "archcarbon";
revision "2015-01-05" {
description "Initial revision of archcarbon model";
}
container box {
list object {
key object-id;
leaf object-id {
type string;
}
leaf-list attributes {
type string;
min-elements 1;
max-elements 2;
}
}
}
}
Then tried PUT http://controller:8181/restconf/config/archcarbon:box/ with the bodies below:
1) Skip attributes is not allowed -> OK
{
"box": {
"object": [
{
"object-id":1,
}
]
}
}
2) Less attributes than min-elements is allowed -> NOK
{
"box": {
"object": [
{
"object-id":1,
"attributes": []
}
]
}
}
3) More attributes than max-elements is allowed -> NOK
{
"box": {
"object": [
{
"object-id":1,
"attributes": [
"object1",
"object2",
"object3"
]
}
]
}
}