Is 'leafref' condition enforced?

asked 2015-10-06 05:48:17 -0800

pbraun gravatar image

Hi,

Previously I posted this question, and this current one somehow relates to that.

So it seems that 'leafref' condition is not enforced by MD-SAL in the master branch.

Example: I have a model, which contains list of links, and list of services. A service contains reference to the links it is built on.

Although the model specifies that the service link must be part of the link list, this condition is not enforced by the controller.

container configuration {
    list connections {
        key id;
    }
    list services {
        config true;
        key id;
        leaf-list supportingConnections {
            type leafref {
                path "/configuration/connections/id";
            }
        }
    }
}

So I can create service with "supportingConnections": [ 1, 2, 3]" without creating those links beforehand.

Is it so by design? Is it a missing feature which will be added later to the code?

Regards, peter

edit retag flag offensive close merge delete