[sysrepo-devel] augmented if-interface aooears to no longer work
Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco)
lmacko at cisco.com
Tue Oct 11 14:57:48 UTC 2016
Hi,
there is definitely some issue in Netopeer2 I'll report it. However, try this request
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<edit-config xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
<target>
<running/>
</target>
<config>
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces" nc:operation="merge">
<interface nc:operation="merge">
<name>ip-4</name>
<description>descr_ip-1</description>
<type>ethernetCsmacd</type>
<interface-config xmlns="http://www.advaoptical.com/ns/def-interfaces">
<owner-tag>my interface</owner-tag>
</interface-config>
</interface>
</interfaces>
</config>
</edit-config>
</rpc>
it works for me
Regards,
Lukas
> -----Original Message-----
> From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of
> Joan Landry
> Sent: Tuesday, October 11, 2016 1:45 PM
> To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)
> <raszabo at cisco.com>; sysrepo-devel at sysrepo.org
> Subject: Re: [sysrepo-devel] augmented if-interface aooears to no longer work
>
> Sorry that was my error in reporting the issue.
> I only get back the ietf-part - not the augmented part.
>
> Get-config
> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <data>
> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
> <interface>
> <name>ip-7</name>
> <type>ethernetCsmacd</type>
> <description>etla-bcdescr_gig-a123456</description>
> </interface>
> </interfaces>
> </data>
> </rpc-reply>
>
>
> netopeer2-server[29966]: Session 2: received message:
> <?xml version="1.0" encoding="UTF-8"?>
> <rpc message-id="35"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <source>
> <candidate/>
> </source>
> <filter> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
> </interfaces>
> </filter>
> </get-config>
> </rpc>
> netopeer2-server[29966]: DICT: inserting "rpc" with collision ne
>
>
> This was the edit-config:
> [2016/10/11 07:40:14.346566, 3] ssh_packet_socket_callback: packet: read
> type 94 [len=956,padding=6,comp=949,payload=949]
> [2016/10/11 07:40:14.346707, 3] ssh_packet_process: Dispatching handler for
> packet type 94
> [2016/10/11 07:40:14.346737, 3] channel_rcv_data: Channel receiving 940
> bytes data in 0 (local win=1266237 remote win=39567818)
> [2016/10/11 07:40:14.346762, 3] channel_default_bufferize: placing 940 bytes
> into channel buffer (stderr=0)
> [2016/10/11 07:40:14.346785, 3] channel_rcv_data: Channel windows are now
> (local win=1265297 remote win=39567818)
> [2016/10/11 07:40:14.346816, 3] ssh_channel_read_timeout: Read (1) buffered
> : 940 bytes. Window: 1265297
> [2016/10/11 07:40:14.346842, 3] ssh_channel_read_timeout: Read (1) buffered
> : 939 bytes. Window: 1265297
> [2016/10/11 07:40:14.346868, 3] ssh_channel_read_timeout: Read (1) buffered
> : 938 bytes. Window: 1265297
> [2016/10/11 07:40:14.346892, 3] ssh_channel_read_timeout: Read (1) buffered
> : 937 bytes. Window: 1265297
> [2016/10/11 07:40:14.346916, 3] ssh_channel_read_timeout: Read (1) buffered
> : 936 bytes. Window: 1265297
> [2016/10/11 07:40:14.346939, 3] ssh_channel_read_timeout: Read (1) buffered
> : 935 bytes. Window: 1265297
> [2016/10/11 07:40:14.346966, 3] ssh_channel_read_timeout: Read (930)
> buffered : 934 bytes. Window: 1265297
> [2016/10/11 07:40:14.346992, 3] ssh_channel_read_timeout: Read (1) buffered
> : 4 bytes. Window: 1265297
> [2016/10/11 07:40:14.347016, 3] ssh_channel_read_timeout: Read (1) buffered
> : 3 bytes. Window: 1265297
> [2016/10/11 07:40:14.347041, 3] ssh_channel_read_timeout: Read (1) buffered
> : 2 bytes. Window: 1265297
> [2016/10/11 07:40:14.347065, 3] ssh_channel_read_timeout: Read (1) buffered
> : 1 bytes. Window: 1265297
> netopeer2-server[29966]: Session 2: received message:
> <?xml version="1.0" encoding="UTF-8"?>
> <rpc message-id="34"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <target>
> <candidate/>
> </target>
> <config><if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"
> xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type"
> xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
> <if:interface nc:operation="merge">
> <if:name>ip-7</if:name>
> <if:type>ethernetCsmacd</if:type>
> <if:description>etla-bcdescr_gig-a123456</if:description>
> <interface-config xmlns="http://www.advaoptical.com/ns/def-
> interfaces" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
> nc:operation="merge">
> <owner-tag>abcd</owner-tag>
> </interface-config>
> </if:interface>
> </if:interfaces>
>
>
> </config>
> </edit-config>
> </rpc>
> netopeer2-server[29966]: DICT: inserting "rpc" with collision
> netopeer2-server[29966]: DICT: inserting "message-id" with collision
> netopeer2-server[29966]: DICT: inserting "34" with collision
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:netconf:base:1.0"
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:netconf:base:1.0"
> netopeer2-server[29966]: DICT: inserting (refcount) "target"
> netopeer2-server[29966]: DICT: inserting (refcount) "candidate"
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) "config"
> netopeer2-server[29966]: DICT: inserting (refcount) "interfaces"
> netopeer2-server[29966]: DICT: inserting (refcount) "if"
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:yang:ietf-interfaces"
> netopeer2-server[29966]: DICT: inserting (refcount) "ianaift"
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:yang:iana-if-type"
> netopeer2-server[29966]: DICT: inserting (refcount) "nc"
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:netconf:base:1.0"
> netopeer2-server[29966]: DICT: inserting (refcount) "interface"
> netopeer2-server[29966]: DICT: inserting "operation" with collision
> netopeer2-server[29966]: DICT: inserting (refcount) "merge"
> netopeer2-server[29966]: DICT: inserting (refcount) "name"
> netopeer2-server[29966]: DICT: inserting "ip-7" with collision
> netopeer2-server[29966]: DICT: inserting (refcount) "type"
> netopeer2-server[29966]: DICT: inserting (refcount) "ethernetCsmacd"
> netopeer2-server[29966]: DICT: inserting (refcount) "description"
> netopeer2-server[29966]: DICT: inserting "etla-bcdescr_gig-a123456" with
> collision
> netopeer2-server[29966]: DICT: inserting "interface-config" with collision
> netopeer2-server[29966]: DICT: inserting "http://www.advaoptical.com/ns/def-
> interfaces" with collision
> netopeer2-server[29966]: DICT: inserting (refcount) "nc"
> netopeer2-server[29966]: DICT: inserting (refcount)
> "urn:ietf:params:xml:ns:netconf:base:1.0"
> netopeer2-server[29966]: DICT: inserting (refcount) "operation"
> netopeer2-server[29966]: DICT: inserting (refcount) "merge"
> netopeer2-server[29966]: DICT: inserting (refcount) "owner-tag"
> netopeer2-server[29966]: DICT: inserting "abcd" with collision
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) ""
> netopeer2-server[29966]: DICT: inserting (refcount) "merge"
> netopeer2-server[29966]: DICT: inserting (refcount) "test-then-set"
> netopeer2-server[29966]: DICT: inserting (refcount) "stop-on-error"
> netopeer2-server[29966]: Resolving unresolved data nodes and their
> constraints...
> netopeer2-server[29966]: All data nodes and constraints resolved.
> netopeer2-server[29966]: XPATH: expression "/ietf-netconf:edit-
> config/target/*":
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "ietf-
> netconf:edit-config"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "target"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "*"
> netopeer2-server[29966]: XPATH: eval_absolute_location_path parsed
> Operator(Path)[0]
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[1]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[25]
> netopeer2-server[29966]: DICT: inserting (refcount) "target"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[26]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[32]
> netopeer2-server[29966]: DICT: inserting (refcount) "*"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[33]
> netopeer2-server[29966]: XPATH: expression "/ietf-netconf:edit-config/default-
> operation":
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "ietf-
> netconf:edit-config"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression
> "default-operation"
> netopeer2-server[29966]: XPATH: eval_absolute_location_path parsed
> Operator(Path)[0]
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[1]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[25]
> netopeer2-server[29966]: DICT: inserting (refcount) "default-operation"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[26]
> netopeer2-server[29966]: XPATH: expression "/ietf-netconf:edit-config/test-
> option":
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "ietf-
> netconf:edit-config"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "test-
> option"
> netopeer2-server[29966]: XPATH: eval_absolute_location_path parsed
> Operator(Path)[0]
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[1]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[25]
> netopeer2-server[29966]: DICT: inserting (refcount) "test-option"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[26]
> netopeer2-server[29966]: XPATH: expression "/ietf-netconf:edit-config/error-
> option":
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "ietf-
> netconf:edit-config"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "error-
> option"
> netopeer2-server[29966]: XPATH: eval_absolute_location_path parsed
> Operator(Path)[0]
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[1]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[25]
> netopeer2-server[29966]: DICT: inserting (refcount) "error-option"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[26]
> netopeer2-server[29966]: XPATH: expression "/ietf-netconf:edit-config/config":
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "ietf-
> netconf:edit-config"
> netopeer2-server[29966]: XPATH: Token Operator(Path), in expression "/"
> netopeer2-server[29966]: XPATH: Token NameTest, in expression "config"
> netopeer2-server[29966]: XPATH: eval_absolute_location_path parsed
> Operator(Path)[0]
> netopeer2-server[29966]: DICT: inserting (refcount) "edit-config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[1]
> netopeer2-server[29966]: XPATH: eval_relative_location_path parsed
> Operator(Path)[25]
> netopeer2-server[29966]: DICT: inserting (refcount) "config"
> netopeer2-server[29966]: XPATH: eval_node_test parsed NameTest[26]
> netopeer2-server[29966]: DICT: inserting (refcount) "ethernetCsmacd"
> netopeer2-server[29966]: DICT: inserting (refcount) "ethernetCsmacd"
> netopeer2-server[29966]: EDIT_CONFIG: ds 8195392, defop 1, testopt 0, config:
> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
> <interface nc:operation="merge">
> <name>ip-7</name>
> <type>ethernetCsmacd</type>
> <description>etla-bcdescr_gig-a123456</description>
> </interface>
> </interfaces>
> netopeer2-server[29966]: EDIT_CONFIG: list /ietf-
> interfaces:interfaces/interface[name='ip-7'], operation 1
> netopeer2-server[29966]: (cl_request_process:416) Sending set-item request.
> netopeer2-server[29966]: (cl_request_process:438) set-item request sent,
> waiting for response.
> netopeer2-server[29966]: (cl_request_process:460) set-item response received,
> processing.
> netopeer2-server[29966]: EDIT_CONFIG: success (/ietf-
> interfaces:interfaces/interface[name='ip-7']).
> netopeer2-server[29966]: EDIT_CONFIG: leaf /ietf-
> interfaces:interfaces/interface[name='ip-7']/type, operation 1
> netopeer2-server[29966]: (cl_request_process:416) Sending set-item request.
> netopeer2-server[29966]: (cl_request_process:438) set-item request sent,
> waiting for response.
> netopeer2-server[29966]: (cl_request_process:460) set-item response received,
> processing.
> netopeer2-server[29966]: EDIT_CONFIG: success (/ietf-
> interfaces:interfaces/interface[name='ip-7']/type).
> netopeer2-server[29966]: EDIT_CONFIG: leaf /ietf-
> interfaces:interfaces/interface[name='ip-7']/description, operation 1
> netopeer2-server[29966]: (cl_request_process:416) Sending set-item request.
> netopeer2-server[29966]: (cl_request_process:438) set-item request sent,
> waiting for response.
> netopeer2-server[29966]: (cl_request_process:460) set-item response received,
> processing.
> netopeer2-server[29966]: EDIT_CONFIG: success (/ietf-
> interfaces:interfaces/interface[name='ip-7']/description).
> netopeer2-server[29966]: (cl_request_process:416) Sending validate request.
> netopeer2-server[29966]: (cl_request_process:438) validate request sent,
> waiting for response.
> netopeer2-server[29966]: (cl_request_process:460) validate response received,
> processing.
> netopeer2-server[29966]: EDIT_CONFIG: done.
> netopeer2-server[29966]: Session 2: sending message:
>
> #92
>
> [2016/10/11 07:40:14.361356, 3] ssh_socket_unbuffered_write: Enabling
> POLLOUT for socket
> [2016/10/11 07:40:14.361628, 3] packet_send2: packet: wrote
> [len=28,padding=13,comp=14,payload=14]
> [2016/10/11 07:40:14.361739, 3] channel_write_common: channel_write
> wrote 5 bytes
> netopeer2-server[29966]: Session 2: sending message:
> <rpc-reply message-id="34"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
> [2016/10/11 07:40:14.362236, 3] packet_send2: packet: wrote
> [len=108,padding=6,comp=101,payload=101]
> [2016/10/11 07:40:14.362358, 3] channel_write_common: channel_write
> wrote 92 bytes
> [2016/10/11 07:40:14.362488, 3] ssh_socket_unbuffered_write: Enabling
> POLLOUT for socket
> netopeer2-server[29966]: Session 2: sending message:
>
> ##
>
> [2016/10/11 07:40:14.363093, 3] packet_send2: packet: wrote
> [len=28,padding=14,comp=13,payload=13]
> [2016/10/11 07:40:14.363343, 3] channel_write_common: channel_write
> wrote 4 bytes
> [2016/10/11 07:40:14.363458, 3] ssh_socket_unbuffered_write: Enabling
> POLLOUT for socket
>
>
>
> -----Original Message-----
> From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)
> [mailto:raszabo at cisco.com]
> Sent: Tuesday, October 11, 2016 7:15 AM
> To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
> Subject: RE: augmented if-interface aooears to no longer work
>
> Hi,
>
> Your edit-config goes into candidate datastore, whereas the get-config goes
> into running.
> In order to put your changes from candidate to running you need to issue a
> commit.
>
> Rastislav
>
> -----Original Message-----
> From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of
> Joan Landry
> Sent: Tuesday, October 11, 2016 12:54 PM
> To: sysrepo-devel at sysrepo.org
> Subject: [sysrepo-devel] augmented if-interface aooears to no longer work
>
> Prior to the merge from devel to master I was able to edit-config and get back
> data for an augmented if-interface model.
>
> Now when I edit the same data I get back an empty result.
>
> Did something change that makes augmenting the ietf-interface yang model not
> possible?
> I am able to augment the ietf-system yang model with no issues.
>
> The model is simple:
> augment "/if:interfaces/if:interface" {
> container interface-config {
> leaf owner-tag {
> type string;
> }
> }
> }
>
> Edit-config:
> Netopeer2-server[25054]: Session 1: received message:
> <?xml version="1.0" encoding="UTF-8"?>
> <rpc message-id="37"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <target>
> <candidate/>
> </target>
> <config> <if:interfaces xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-
> interfaces" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
> nc:operation="merge">
> <if:interface nc:operation="merge">
> <if:name>ip-4</if:name>
> <if:description>descr_ip-1</if:description>
> <if:type>ianaift:ethernetCsmacd</if:type>
> <defif:interface-config xmlns="http://www.advaoptical.com/ns/def-
> interfaces" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
> nc:operation="merge">
> <owner-tag>my interface</owner-tag>
> </defif:interface-config>
> </if:interface>
> </if:interfaces>
> </config>
> </edit-config>
> </rpc>
>
> RPC OK Reply 37 for session 1:
>
>
> ----the data returned is empty
> get-config
> RPC Data Reply 38 for session 1:
> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <data/>
> </rpc-reply>
>
>
> Netopeer2-server[25054]: Session 1: received message:
> <?xml version="1.0" encoding="UTF-8"?>
> <rpc message-id="38"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <source>
> <running/>
> </source>
> <filter> <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"
> xmlns:ensembleif="http://www.advaoptical.com/ns/adva-ensemble-
> interfaces">
> </interfaces>
> </filter>
> </get-config>
> </rpc>
> netopeer2-server[25054]: DICT: inserting "rpc" with collision
> netopeer2-server[25054]: DICT: inserting "message-id" with collision
> _______________________________________________
> sysrepo-devel mailing list
> sysrepo-devel at sysrepo.org
> http://lists.sysrepo.org/listinfo/sysrepo-devel
> _______________________________________________
> sysrepo-devel mailing list
> sysrepo-devel at sysrepo.org
> http://lists.sysrepo.org/listinfo/sysrepo-devel
More information about the sysrepo-devel
mailing list