Hello netmod group,

We've run into following situation with NETCONF and we would like to know your 
opinion on what's the correct behavior here:

Model (root non-presence container with nested list) :

container mapping-nodes {
    list mapping-node{
        key "id";
        leaf id {
            type string;
        }
    }
}

Netconf edit-config RPC (replacing mapping-node entry with none operation for 
mapping-nodes container, in an empty data store):

    <edit-config>
        ...
        <default-operation>none</default-operation>
        <config>
            <mapping-nodes xmlns="urn:opendaylight:mdsal:mapping:test">
                <mapping-node xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" 
a:operation="replace">
                    <id>node1-put</id>
                </mapping-node>
            </mapping-nodes>
        </config>
    </edit-config>

And the question here is: Whether the edit should fail or not ?
The problem is that mapping-nodes container does not exist and in edit-config 
rpc, there's "none" operation associated to it.
Our first assumption was that the resulting data structure should be invalid 
due to missing root container and rpc should fail.
However, the container is non-presence (exists only for organizing the 
hierarchy of data nodes), which means that it may be created/deleted as child 
nodes appear/disappear.
In which case, the operation doesn't have to fail and can create mapping-nodes 
container even if "none" operation is associated with it.

Regards,
Maros
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to