简体   繁体   English

Netconf 编辑配置

[英]Netconf edit-config

Is this RPC valid?这个RPC有效吗?

<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?上面的 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?如果控制器像这样向 NE 发送 XML,NE 是否应该遵守此 XML? I believe it should be treated as a bug in controller.我认为它应该被视为控制器中的错误。

As you said, the RPC doesn't really make sense, but that doesn't make it invalid.正如您所说,RPC 并没有真正的意义,但这并不使它无效。 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.灵活的 NETCONF 服务器将忽略描述叶并继续删除接口。

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.对于更复杂的场景,您可以使用 'continue-on-error' 错误选项 ( https://www.rfc-editor.org/rfc/rfc6241#page-39 ),以最大努力处理操作。 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' ".在这种情况下,它将表现为“删除 interface-fe-0/0/0;如果不可能,将描述设置为 'test-test'”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM