Closed EvgeniiVR closed 2 months ago
and some output from cli debug
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" cl:username="root" xmlns:cl="http://clicon.org/lib" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="42"><get-config><source><candidate/></source><nc:filter nc:type="xpath" nc:select="/main:routing/vrf:table/vrf:id" xmlns:main="urn:com.example:yang:main" xmlns:vrf="urn:com.example:yang:vrf"/></get-config></rpc>
##
Apr 18 16:11:48.008299: clixon_msg_rcv11:599: Recv: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><routing xmlns="urn:com.example:yang:main"><table xmlns="urn:com.example:yang:vrf"><id>10</id><name>VRF-10</name></table><table xmlns="urn:com.example:yang:vrf"><id>20</id><name>VRF-20</name></table><table xmlns="urn:com.example:yang:vrf"><id>30</id><name>VRF-30</name></table></routing></data></rpc-reply>
Apr 18 16:11:48.008671: clixon_msg_send:354: Send [/usr/local/var/run/cli.sock]:
#416
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" cl:username="root" xmlns:cl="http://clicon.org/lib" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="42"><get-config><source><candidate/></source><nc:filter nc:type="xpath" nc:select="/main:routing/vrf:table[vrf:id='20']/vrf:name" xmlns:main="urn:com.example:yang:main" xmlns:vrf="urn:com.example:yang:vrf"/></get-config></rpc>
##
Apr 18 16:11:48.009011: clixon_msg_rcv11:599: Recv: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><routing xmlns="urn:com.example:yang:main"><table xmlns="urn:com.example:yang:vrf"><id>20</id><name>VRF-20</name></table></routing></data></rpc-reply>
Apr 18 16:11:48.009335: clixon_msg_send:354: Send [/usr/local/var/run/cli.sock]:
#446
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" cl:username="root" xmlns:cl="http://clicon.org/lib" message-id="42"><edit-config><target><candidate/></target><default-operation>none</default-operation><config><routing xmlns="urn:com.example:yang:main"><table xmlns="urn:com.example:yang:vrf" nc:operation="replace"><id>20</id><name>VRF-20</name></table></routing></config></edit-config></rpc>
As we can see autocli sends "replace" operation in this case
This is a re-occurring question and has to do with he nature of NETCONF operations (see https://datatracker.ietf.org/doc/html/rfc6241#section-7.2
) and the autocli "set" command. You should probably use merge
instead.
I added a new subsection in the user guide to clarify, see https://clixon-docs.readthedocs.io/en/latest/cli.html#netconf-operations
Thanks for pointing this out.
Hello @olofhagsand, Got your point. Thank you for clarifying and strong support!
Hello team,
not sure if this question should be addressed to clixon space, probably to cligen, pls correct me if I'm wrong. Noticed unexpected behavior in case we re-enter top level command for the list element -> candidate config flushes all existing nodes within this element. Let me describe the issue in more details w/ example:
Entering list of "set" commands
Checking candidate
Commit. Backend debug output
Re-enter top level command for any element within existin list
> set routing table 10 VRF-10
Checking candidate
Candidate misses previously configured nodes.
Commit. Backend debug output
And we can see that internal nodes have "delete" flags, however we didn't push explicit cmd to delete them.
Is it expected behavior or not? pls advise.