Ram
Ram

Reputation: 341

Netconf edit-config

Is this RPC valid?

<rpc>
    <edit-config>
        <target>
            <candidate/>
        </target>
        <config>
            <interfaces>
                <interface operation="delete">
                    <name>fe-0/0/0</name>
                    <description>test-test</description>
                </interface>
            </interfaces>
        </config>
    </edit-config>
</rpc>

Should the leaf "description" be present in above RPC? The parent itself gets deleted and specifying "description" does not make sense. If a controller sends an XML to NE like this, should NE honour this XML? I believe it should be treated as a bug in controller.

Upvotes: 1

Views: 873

Answers (1)

Paulo Gomes
Paulo Gomes

Reputation: 166

As you said, the RPC doesn't really make sense, but that doesn't make it invalid. In this particular case, the description should not be present in the deleted interface (only keys need to be present). A flexible NETCONF server would ignore the description leaf and proceed with deleting the interface.

For more complex scenarios, you can have 'continue-on-error' error-option (https://www.rfc-editor.org/rfc/rfc6241#page-39), where operations are handled in best effort. In this case, it could happen that the delete itself would fail, in which case the description leaf would be processed, based on the default operation (which is 'merge'). In this case, it would behave as "delete interface-fe-0/0/0; if not possible, set description to 'test-test' ".

Upvotes: 0

Related Questions