{"action":"created","issue":{"url":"https://api.github.com/repos/CESNET/Netopeer2/issues/49","repository_url":"https://api.github.com/repos/CESNET/Netopeer2","labels_url":"https://api.github.com/repos/CESNET/Netopeer2/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/CESNET/Netopeer2/issues/49/comments","events_url":"https://api.github.com/repos/CESNET/Netopeer2/issues/49/events","html_url":"https://github.com/CESNET/Netopeer2/issues/49","id":186811427,"number":49,"title":"Incorrect handling of the replace op. in edit-config request","user":{"login":"rastislavszabo","id":15926980,"avatar_url":"https://avatars.githubusercontent.com/u/15926980?v=3","gravatar_id":"","url":"https://api.github.com/users/rastislavszabo","html_url":"https://github.com/rastislavszabo","followers_url":"https://api.github.com/users/rastislavszabo/followers","following_url":"https://api.github.com/users/rastislavszabo/following{/other_user}","gists_url":"https://api.github.com/users/rastislavszabo/gists{/gist_id}","starred_url":"https://api.github.com/users/rastislavszabo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rastislavszabo/subscriptions","organizations_url":"https://api.github.com/users/rastislavszabo/orgs","repos_url":"https://api.github.com/users/rastislavszabo/repos","events_url":"https://api.github.com/users/rastislavszabo/events{/privacy}","received_events_url":"https://api.github.com/users/rastislavszabo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"michalvasko","id":12510224,"avatar_url":"https://avatars.githubusercontent.com/u/12510224?v=3","gravatar_id":"","url":"https://api.github.com/users/michalvasko","html_url":"https://github.com/michalvasko","followers_url":"https://api.github.com/users/michalvasko/followers","following_url":"https://api.github.com/users/michalvasko/following{/other_user}","gists_url":"https://api.github.com/users/michalvasko/gists{/gist_id}","starred_url":"https://api.github.com/users/michalvasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalvasko/subscriptions","organizations_url":"https://api.github.com/users/michalvasko/orgs","repos_url":"https://api.github.com/users/michalvasko/repos","events_url":"https://api.github.com/users/michalvasko/events{/privacy}","received_events_url":"https://api.github.com/users/michalvasko/received_events","type":"User","site_admin":false},"assignees":[{"login":"michalvasko","id":12510224,"avatar_url":"https://avatars.githubusercontent.com/u/12510224?v=3","gravatar_id":"","url":"https://api.github.com/users/michalvasko","html_url":"https://github.com/michalvasko","followers_url":"https://api.github.com/users/michalvasko/followers","following_url":"https://api.github.com/users/michalvasko/following{/other_user}","gists_url":"https://api.github.com/users/michalvasko/gists{/gist_id}","starred_url":"https://api.github.com/users/michalvasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalvasko/subscriptions","organizations_url":"https://api.github.com/users/michalvasko/orgs","repos_url":"https://api.github.com/users/michalvasko/repos","events_url":"https://api.github.com/users/michalvasko/events{/privacy}","received_events_url":"https://api.github.com/users/michalvasko/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-11-02T14:12:20Z","updated_at":"2016-12-01T09:39:56Z","closed_at":"2016-12-01T09:37:44Z","body":"Request to replace `GigabitEthernet0/8/0` config (that already exists in the datastore) with new values:\r\n\r\n```\r\n#779\r\n     <rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n       <edit-config>\r\n         <target>\r\n           <running/>\r\n         </target>\r\n         <config xmlns:xc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n           <interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\r\n             <interface xc:operation=\"replace\">\r\n               <name>GigabitEthernet0/8/0</name>\r\n               <type>ethernetCsmacd</type>\r\n               <ipv4 xmlns=\"urn:ietf:params:xml:ns:yang:ietf-ip\">\r\n                 <address>\r\n                   <ip>192.0.2.4</ip>\r\n                   <prefix-length>24</prefix-length>\r\n                 </address>\r\n               </ipv4>\r\n             </interface>\r\n           </interfaces>\r\n         </config>\r\n       </edit-config>\r\n     </rpc>\r\n##\r\n\r\n#93\r\n<rpc-reply message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><ok/></rpc-reply>\r\n##\r\n```\r\n\r\nThe only edit-like operation that comes to sysrepo is this one set-item:\r\n```\r\n[INF] (rp_dt_set_item_wrapper:559) Set item request running datastore, xpath: /ietf-interfaces:interfaces/interface[name='GigabitEthernet0/8/0']\r\n```\r\n\r\nAnd nothing actually changes in the datastore...\r\n\r\nFull Netopeer2 logs:\r\n```\r\n[2016/11/02 15:09:26.164570, 3] ssh_packet_socket_callback:  packet: read type 94 [len=28,padding=15,comp=12,payload=12]\r\n[2016/11/02 15:09:26.164579, 3] ssh_packet_process:  Dispatching handler for packet type 94\r\n[2016/11/02 15:09:26.164585, 3] channel_rcv_data:  Channel receiving 3 bytes data in 0 (local win=1278787 remote win=2094207)\r\n[2016/11/02 15:09:26.164592, 3] channel_default_bufferize:  placing 3 bytes into channel buffer (stderr=0)\r\n[2016/11/02 15:09:26.164597, 3] channel_rcv_data:  Channel windows are now (local win=1278784 remote win=2094207)\r\n[2016/11/02 15:09:26.164604, 3] ssh_channel_read_timeout:  Read (1) buffered : 2 bytes. Window: 1278784\r\n[2016/11/02 15:09:26.164612, 3] ssh_channel_read_timeout:  Read (1) buffered : 1 bytes. Window: 1278784\r\nnetopeer2-server[25700]: Session 1: received message:\r\n     <rpc message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n       <edit-config>\r\n         <target>\r\n           <running/>\r\n         </target>\r\n         <config xmlns:xc=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n           <interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\r\n             <interface xc:operation=\"replace\">\r\n               <name>GigabitEthernet0/8/0</name>\r\n               <ipv4 xmlns=\"urn:ietf:params:xml:ns:yang:ietf-ip\">\r\n                 <address>\r\n                   <ip>192.0.2.4</ip>\r\n                   <prefix-length>24</prefix-length>\r\n                 </address>\r\n               </ipv4>\r\n             </interface>\r\n           </interfaces>\r\n         </config>\r\n       </edit-config>\r\n     </rpc>\r\nnetopeer2-server[25700]: DICT: inserting \"rpc\" with collision \r\nnetopeer2-server[25700]: DICT: inserting \"message-id\" with collision \r\nnetopeer2-server[25700]: DICT: inserting \"101\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"urn:ietf:params:xml:ns:netconf:base:1.0\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"target\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"running\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"config\"\r\nnetopeer2-server[25700]: DICT: inserting \"xc\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"urn:ietf:params:xml:ns:netconf:base:1.0\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"interfaces\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"urn:ietf:params:xml:ns:yang:ietf-interfaces\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"interface\"\r\nnetopeer2-server[25700]: DICT: inserting \"operation\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"replace\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"name\"\r\nnetopeer2-server[25700]: DICT: inserting \"GigabitEthernet0/8/0\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"ipv4\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"urn:ietf:params:xml:ns:yang:ietf-ip\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"address\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"ip\"\r\nnetopeer2-server[25700]: DICT: inserting \"192.0.2.4\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"prefix-length\"\r\nnetopeer2-server[25700]: DICT: inserting \"24\" with collision \r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"urn:ietf:params:xml:ns:netconf:base:1.0\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"xc\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"merge\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"test-then-set\"\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"stop-on-error\"\r\nnetopeer2-server[25700]: Resolving unresolved data nodes and their constraints...\r\nnetopeer2-server[25700]: All data nodes and constraints resolved.\r\nnetopeer2-server[25700]: XPATH: expression \"/ietf-netconf:edit-config/target/*\":\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"ietf-netconf:edit-config\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"target\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"*\"\r\nnetopeer2-server[25700]: XPATH: eval_absolute_location_path parsed Operator(Path)[0]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[1]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[25]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"target\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[26]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[32]\r\nnetopeer2-server[25700]: DICT: inserting \"*\" with collision \r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[33]\r\nnetopeer2-server[25700]: XPATH: expression \"/ietf-netconf:edit-config/default-operation\":\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"ietf-netconf:edit-config\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"default-operation\"\r\nnetopeer2-server[25700]: XPATH: eval_absolute_location_path parsed Operator(Path)[0]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[1]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[25]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"default-operation\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[26]\r\nnetopeer2-server[25700]: XPATH: expression \"/ietf-netconf:edit-config/test-option\":\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"ietf-netconf:edit-config\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"test-option\"\r\nnetopeer2-server[25700]: XPATH: eval_absolute_location_path parsed Operator(Path)[0]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[1]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[25]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"test-option\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[26]\r\nnetopeer2-server[25700]: XPATH: expression \"/ietf-netconf:edit-config/error-option\":\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"ietf-netconf:edit-config\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"error-option\"\r\nnetopeer2-server[25700]: XPATH: eval_absolute_location_path parsed Operator(Path)[0]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[1]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[25]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"error-option\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[26]\r\nnetopeer2-server[25700]: XPATH: expression \"/ietf-netconf:edit-config/config\":\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"ietf-netconf:edit-config\"\r\nnetopeer2-server[25700]: XPATH:\tToken Operator(Path), in expression \"/\"\r\nnetopeer2-server[25700]: XPATH:\tToken NameTest, in expression \"config\"\r\nnetopeer2-server[25700]: XPATH: eval_absolute_location_path parsed Operator(Path)[0]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"edit-config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[1]\r\nnetopeer2-server[25700]: XPATH: eval_relative_location_path parsed Operator(Path)[25]\r\nnetopeer2-server[25700]: DICT: inserting (refcount) \"config\"\r\nnetopeer2-server[25700]: XPATH: eval_node_test              parsed NameTest[26]\r\nnetopeer2-server[25700]: EDIT_CONFIG: ds 30661888, defop 1, testopt 0, config:\r\n<interfaces xmlns=\"urn:ietf:params:xml:ns:yang:ietf-interfaces\">\r\n  <interface nc:operation=\"replace\">\r\n    <name>GigabitEthernet0/8/0</name>\r\n    <ipv4 xmlns=\"urn:ietf:params:xml:ns:yang:ietf-ip\">\r\n      <address>\r\n        <ip>192.0.2.4</ip>\r\n        <prefix-length>24</prefix-length>\r\n      </address>\r\n    </ipv4>\r\n  </interface>\r\n</interfaces>\r\nnetopeer2-server[25700]: (cl_request_process:416) Sending session-refresh request.\r\nnetopeer2-server[25700]: (cl_request_process:438) session-refresh request sent, waiting for response.\r\nnetopeer2-server[25700]: (cl_request_process:460) session-refresh response received, processing.\r\nnetopeer2-server[25700]: EDIT_CONFIG: list /ietf-interfaces:interfaces/interface[name='GigabitEthernet0/8/0'], operation 3\r\nnetopeer2-server[25700]: (cl_request_process:416) Sending set-item request.\r\nnetopeer2-server[25700]: (cl_request_process:438) set-item request sent, waiting for response.\r\nnetopeer2-server[25700]: (cl_request_process:460) set-item response received, processing.\r\nnetopeer2-server[25700]: EDIT_CONFIG: success (/ietf-interfaces:interfaces/interface[name='GigabitEthernet0/8/0']).\r\nnetopeer2-server[25700]: (cl_request_process:416) Sending commit request.\r\nnetopeer2-server[25700]: (cl_request_process:438) commit request sent, waiting for response.\r\nnetopeer2-server[25700]: (cl_request_process:460) commit response received, processing.\r\nnetopeer2-server[25700]: EDIT_CONFIG: done.\r\nnetopeer2-server[25700]: Session 1: sending message:\r\n\r\n#93\r\n\r\n[2016/11/02 15:09:26.204926, 3] ssh_socket_unbuffered_write:  Enabling POLLOUT for socket\r\n[2016/11/02 15:09:26.204942, 3] packet_send2:  packet: wrote [len=28,padding=13,comp=14,payload=14]\r\n[2016/11/02 15:09:26.204950, 3] channel_write_common:  channel_write wrote 5 bytes\r\nnetopeer2-server[25700]: Session 1: sending message:\r\n<rpc-reply message-id=\"101\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><ok/></rpc-reply>\r\n[2016/11/02 15:09:26.204976, 3] packet_send2:  packet: wrote [len=108,padding=5,comp=102,payload=102]\r\n[2016/11/02 15:09:26.205001, 3] channel_write_common:  channel_write wrote 93 bytes\r\n[2016/11/02 15:09:26.205049, 3] ssh_socket_unbuffered_write:  Enabling POLLOUT for socket\r\nnetopeer2-server[25700]: Session 1: sending message:\r\n\r\n##\r\n\r\n[2016/11/02 15:09:26.205097, 3] packet_send2:  packet: wrote [len=28,padding=14,comp=13,payload=13]\r\n[2016/11/02 15:09:26.205149, 3] channel_write_common:  channel_write wrote 4 bytes\r\n[2016/11/02 15:09:26.205203, 3] ssh_socket_unbuffered_write:  Enabling POLLOUT for socket\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/CESNET/Netopeer2/issues/comments/264125692","html_url":"https://github.com/CESNET/Netopeer2/issues/49#issuecomment-264125692","issue_url":"https://api.github.com/repos/CESNET/Netopeer2/issues/49","id":264125692,"user":{"login":"michalvasko","id":12510224,"avatar_url":"https://avatars.githubusercontent.com/u/12510224?v=3","gravatar_id":"","url":"https://api.github.com/users/michalvasko","html_url":"https://github.com/michalvasko","followers_url":"https://api.github.com/users/michalvasko/followers","following_url":"https://api.github.com/users/michalvasko/following{/other_user}","gists_url":"https://api.github.com/users/michalvasko/gists{/gist_id}","starred_url":"https://api.github.com/users/michalvasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalvasko/subscriptions","organizations_url":"https://api.github.com/users/michalvasko/orgs","repos_url":"https://api.github.com/users/michalvasko/repos","events_url":"https://api.github.com/users/michalvasko/events{/privacy}","received_events_url":"https://api.github.com/users/michalvasko/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T09:39:56Z","updated_at":"2016-12-01T09:39:56Z","body":"Hi,\r\nplease try it again and perhaps it will finally work as expected.\r\n\r\nRegards,\r\nMichal"}}
{"actor":{"display_login":"michalvasko"}}