From rkrejci at cesnet.cz Wed Nov 2 08:04:57 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 2 Nov 2016 09:04:57 +0100 Subject: [sysrepo-devel] NETCONF event notifications notes In-Reply-To: References: <9d096f99-c260-6147-025d-a091c2671d9a@cesnet.cz> Message-ID: <2448b03e-ea6d-9ae0-062f-561f44e9987f@cesnet.cz> Hi, I have somehow forgot to answer to this mail. I have just created issue 489 regarding the event time. ad netconf-capability-change - I'm not sure that it should replace it, but the meaning is the same. ad netconf-config-change - isn't it just connected with the sr_commit() and sr_copy_config()? Radek Dne 24.10.2016 v 12:21 Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) napsal(a): > Hi Radek, > > Sorry for the late response, I'm crazy busy during these days. > > As for the event time - this isn't a problem, we can add It. You can open an issue on GitHub for this. > > As for ietf-netconf-notifications: Okay, we can put it into default sysrepo installation. > - reg. netconf-capability-change: Should this replace sr_module_install_cb and sr_feature_enable_cb API (at least form Netopeer PoV)? This shouldn't be much of work. > - reg. netconf-config-change: This would require quite a lot of coding in sysrepo, this would be done probably some time later. > > Rastislav > > -----Original Message----- > From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Radek Krej?? > Sent: Wednesday, October 19, 2016 10:09 AM > To: sysrepo-devel at sysrepo.org > Subject: [sysrepo-devel] NETCONF event notifications notes > > Hi, > based on my current experiences with NETCONF event notifications implementation in netopeer server, I have written down some notes about my ideas and expectation related to the event notification implementation in netopeer and sysrepo: > > 1) for replay functionality, sysrepo will implement a storage for Event records > 2) the records are created by calling sr_event_notif_send*() > 3) together with the record, also the event time is recorded and stored > 4) the Events storage allows filtering when reading content, ideally using xpath, minimally according to the schemas where the notification is defined and definitely according to the time (by specifying time window) > 5) sysrepo will internally (always) provide ietf-netconf-notifications schema and it will generate "netconf-config-change" and "netconf-capability-change" notifications (other notifications from the schema will be generated by the Netopeer server and recorded by sysrepo as any other notification, important is that, similarly as ietf-netconf-acm, the ietf-netconf-notifications will be always present in sysrepo) > > sysrepo already has a basic support for notifications and as we already discussed, mainly the event storage is a kind of long-term goal. However, I would like to have some of the mentioned features in some short term: > - event time - when processing sr_event_notif_send*(), sysrepo can automatically add a timestamp to the sysrepo notifications sent to event subscribers - sysrepo should be (from the beginning) the central authorityrecording the event time > - ietf-netconf-notifications - sysrepo would have this schema internally, it is not necessary to create netconf-config-change and netconf-capability-change notification immediately, but because I would like to have some of the other notifications in netopeer server, it would be good to avoid unnecessary changes - for now, I would have to install the schema into the sysrepo as part of netopeer2-server installation (or having it internally in netopeer server), but later the functionality will be in sysrepo and I will be forced to change it again > > These notes are just ideas, they are not set in stone, so I'm looking forward for your feedback. > > Radek > > - ietf-netconf-notification can be found in RFC 6470 > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From raszabo at cisco.com Wed Nov 2 08:28:46 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Wed, 2 Nov 2016 08:28:46 +0000 Subject: [sysrepo-devel] NETCONF event notifications notes In-Reply-To: <2448b03e-ea6d-9ae0-062f-561f44e9987f@cesnet.cz> References: <9d096f99-c260-6147-025d-a091c2671d9a@cesnet.cz> <2448b03e-ea6d-9ae0-062f-561f44e9987f@cesnet.cz> Message-ID: <79aa989673c346078e585d2905364580@XCH-RCD-002.cisco.com> Hi Radek, > ad netconf-config-change - isn't it just connected with the sr_commit() and sr_copy_config()? Yes, the only issue is to properly generate this leaf: leaf target { type instance-identifier; description "Topmost node associated with the configuration change. A server SHOULD set this object to the node within the datastore that is being altered. A server MAY set this object to one of the ancestors of the actual node that was changed, or omit this object, if the exact node is not known."; } Maybe we could skip generating this for the first iteration? To properly handle all commits and copy-configs, it would require generating multiple notifications, since this is just a leaf, not a leaf-list.. Rastislav -----Original Message----- From: Radek Krej?? [mailto:rkrejci at cesnet.cz] Sent: Wednesday, November 2, 2016 9:05 AM To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) ; sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] NETCONF event notifications notes Hi, I have somehow forgot to answer to this mail. I have just created issue 489 regarding the event time. ad netconf-capability-change - I'm not sure that it should replace it, but the meaning is the same. ad netconf-config-change - isn't it just connected with the sr_commit() and sr_copy_config()? Radek Dne 24.10.2016 v 12:21 Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) napsal(a): > Hi Radek, > > Sorry for the late response, I'm crazy busy during these days. > > As for the event time - this isn't a problem, we can add It. You can open an issue on GitHub for this. > > As for ietf-netconf-notifications: Okay, we can put it into default sysrepo installation. > - reg. netconf-capability-change: Should this replace sr_module_install_cb and sr_feature_enable_cb API (at least form Netopeer PoV)? This shouldn't be much of work. > - reg. netconf-config-change: This would require quite a lot of coding in sysrepo, this would be done probably some time later. > > Rastislav > > -----Original Message----- > From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Radek Krej?? > Sent: Wednesday, October 19, 2016 10:09 AM > To: sysrepo-devel at sysrepo.org > Subject: [sysrepo-devel] NETCONF event notifications notes > > Hi, > based on my current experiences with NETCONF event notifications implementation in netopeer server, I have written down some notes about my ideas and expectation related to the event notification implementation in netopeer and sysrepo: > > 1) for replay functionality, sysrepo will implement a storage for Event records > 2) the records are created by calling sr_event_notif_send*() > 3) together with the record, also the event time is recorded and stored > 4) the Events storage allows filtering when reading content, ideally using xpath, minimally according to the schemas where the notification is defined and definitely according to the time (by specifying time window) > 5) sysrepo will internally (always) provide ietf-netconf-notifications schema and it will generate "netconf-config-change" and "netconf-capability-change" notifications (other notifications from the schema will be generated by the Netopeer server and recorded by sysrepo as any other notification, important is that, similarly as ietf-netconf-acm, the ietf-netconf-notifications will be always present in sysrepo) > > sysrepo already has a basic support for notifications and as we already discussed, mainly the event storage is a kind of long-term goal. However, I would like to have some of the mentioned features in some short term: > - event time - when processing sr_event_notif_send*(), sysrepo can automatically add a timestamp to the sysrepo notifications sent to event subscribers - sysrepo should be (from the beginning) the central authorityrecording the event time > - ietf-netconf-notifications - sysrepo would have this schema internally, it is not necessary to create netconf-config-change and netconf-capability-change notification immediately, but because I would like to have some of the other notifications in netopeer server, it would be good to avoid unnecessary changes - for now, I would have to install the schema into the sysrepo as part of netopeer2-server installation (or having it internally in netopeer server), but later the functionality will be in sysrepo and I will be forced to change it again > > These notes are just ideas, they are not set in stone, so I'm looking forward for your feedback. > > Radek > > - ietf-netconf-notification can be found in RFC 6470 > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From rkrejci at cesnet.cz Wed Nov 2 08:30:51 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 2 Nov 2016 09:30:51 +0100 Subject: [sysrepo-devel] NETCONF event notifications notes In-Reply-To: <79aa989673c346078e585d2905364580@XCH-RCD-002.cisco.com> References: <9d096f99-c260-6147-025d-a091c2671d9a@cesnet.cz> <2448b03e-ea6d-9ae0-062f-561f44e9987f@cesnet.cz> <79aa989673c346078e585d2905364580@XCH-RCD-002.cisco.com> Message-ID: There is SHOULD and MAY, so I think that it is not a problem if you do not generate it in the first iteration. Radek Dne 2.11.2016 v 09:28 Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) napsal(a): > Hi Radek, > >> ad netconf-config-change - isn't it just connected with the sr_commit() and sr_copy_config()? > Yes, the only issue is to properly generate this leaf: > > leaf target { > type instance-identifier; > description > "Topmost node associated with the configuration change. > A server SHOULD set this object to the node within > the datastore that is being altered. A server MAY > set this object to one of the ancestors of the actual > node that was changed, or omit this object, if the > exact node is not known."; > } > > Maybe we could skip generating this for the first iteration? To properly handle all commits and copy-configs, it would require generating multiple notifications, since this is just a leaf, not a leaf-list.. > > Rastislav > > -----Original Message----- > From: Radek Krej?? [mailto:rkrejci at cesnet.cz] > Sent: Wednesday, November 2, 2016 9:05 AM > To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) ; sysrepo-devel at sysrepo.org > Subject: Re: [sysrepo-devel] NETCONF event notifications notes > > Hi, > I have somehow forgot to answer to this mail. > > I have just created issue 489 regarding the event time. > > ad netconf-capability-change - I'm not sure that it should replace it, but the meaning is the same. > ad netconf-config-change - isn't it just connected with the sr_commit() and sr_copy_config()? > > Radek > > > Dne 24.10.2016 v 12:21 Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) napsal(a): >> Hi Radek, >> >> Sorry for the late response, I'm crazy busy during these days. >> >> As for the event time - this isn't a problem, we can add It. You can open an issue on GitHub for this. >> >> As for ietf-netconf-notifications: Okay, we can put it into default sysrepo installation. >> - reg. netconf-capability-change: Should this replace sr_module_install_cb and sr_feature_enable_cb API (at least form Netopeer PoV)? This shouldn't be much of work. >> - reg. netconf-config-change: This would require quite a lot of coding in sysrepo, this would be done probably some time later. >> >> Rastislav >> >> -----Original Message----- >> From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Radek Krej?? >> Sent: Wednesday, October 19, 2016 10:09 AM >> To: sysrepo-devel at sysrepo.org >> Subject: [sysrepo-devel] NETCONF event notifications notes >> >> Hi, >> based on my current experiences with NETCONF event notifications implementation in netopeer server, I have written down some notes about my ideas and expectation related to the event notification implementation in netopeer and sysrepo: >> >> 1) for replay functionality, sysrepo will implement a storage for Event records >> 2) the records are created by calling sr_event_notif_send*() >> 3) together with the record, also the event time is recorded and stored >> 4) the Events storage allows filtering when reading content, ideally using xpath, minimally according to the schemas where the notification is defined and definitely according to the time (by specifying time window) >> 5) sysrepo will internally (always) provide ietf-netconf-notifications schema and it will generate "netconf-config-change" and "netconf-capability-change" notifications (other notifications from the schema will be generated by the Netopeer server and recorded by sysrepo as any other notification, important is that, similarly as ietf-netconf-acm, the ietf-netconf-notifications will be always present in sysrepo) >> >> sysrepo already has a basic support for notifications and as we already discussed, mainly the event storage is a kind of long-term goal. However, I would like to have some of the mentioned features in some short term: >> - event time - when processing sr_event_notif_send*(), sysrepo can automatically add a timestamp to the sysrepo notifications sent to event subscribers - sysrepo should be (from the beginning) the central authorityrecording the event time >> - ietf-netconf-notifications - sysrepo would have this schema internally, it is not necessary to create netconf-config-change and netconf-capability-change notification immediately, but because I would like to have some of the other notifications in netopeer server, it would be good to avoid unnecessary changes - for now, I would have to install the schema into the sysrepo as part of netopeer2-server installation (or having it internally in netopeer server), but later the functionality will be in sysrepo and I will be forced to change it again >> >> These notes are just ideas, they are not set in stone, so I'm looking forward for your feedback. >> >> Radek >> >> - ietf-netconf-notification can be found in RFC 6470 >> >> _______________________________________________ >> sysrepo-devel mailing list >> sysrepo-devel at sysrepo.org >> http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From Milan.Lenco at pantheon.tech Wed Nov 2 09:30:31 2016 From: Milan.Lenco at pantheon.tech (=?iso-8859-2?Q?Milan_Len=E8o?=) Date: Wed, 2 Nov 2016 09:30:31 +0000 Subject: [sysrepo-devel] How to use operation data provider in this? In-Reply-To: <1963999420.957112.1477438879040@mail.yahoo.com> References: <65073869.87443.1476402145245.ref@mail.yahoo.com> <65073869.87443.1476402145245@mail.yahoo.com> <1476478341431.71003@pantheon.tech> <24742940.1876930.1476746882714@mail.yahoo.com> <1476780770245.63205@pantheon.tech> <2042598613.245171.1476819677927@mail.yahoo.com>, <1963999420.957112.1477438879040@mail.yahoo.com> Message-ID: <1478079031815.21958@pantheon.tech> Hi Jimmy, Sorry for a late response, but I accidentally missed your email in all the communication that is going on right now. I recommend you to open an issue in github (https://github.com/sysrepo/sysrepo/issues) everytime you have any problem with sysrepo, rather than sending emails directly. There it will certainly not get overlooked by us. Now regarding your issue: Firstly, from the schema you posted before it doesn't seem that com-oplink-device-common is a submodule, but rather a module on it's own (import used instead of include). I have tried com-att-device with a made up version of module com-oplink-device-common (I didn't find its schema in our communication), but didn't experience any issues. Very recently, however, there have been some patches committed to master that fix certain cases related to operational data introduced into the module through the USES statement. Could you please pull the latest master and re-try? If the issue still exists, please file an issue report on github and if it is possible also attach the content of com-oplink-device-common and com-att-device, at least the relevant parts if they are too long. Thanks, Milan ________________________________ Od: Jimmy Jin Odoslan?: 26. okt?bra 2016 1:41 Komu: Milan Len?o K?pia: Sysrepo-public Predmet: Re: [sysrepo-devel] How to use operation data provider in this? Hi Milan, Just pull the master and I did more testing seems here is what I saw: 1) if a operational data is in a submodule. as in the following case, operational data device-physical is defined in submodule com-oplink-device-common; 2) after sr_dp_get_items_subscribe(sess, xpath...) is called ( for ANY xpath); 3) sr_get_??? (sess, xpath...) for ANY xpath will fail with the SAME error (it is always on the FIRST occurrence, where a operational data is in a submodule) [ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for "MODULE:xpath-to-submodulel/SUBMODULE:xpath-in-submodule." as in the following example [ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical If I remove config false from device-physical, then the error will happen in the next place, where a operational data is in a submodule. if I don't call sr_dp_get_items_subscribe in 2), then everything works as usual. Please confirm. thanks, Jimmy ________________________________ From: Jimmy Jin To: Milan Len?o Cc: Sysrepo-public Sent: Tuesday, October 18, 2016 12:41 PM Subject: Re: [sysrepo-devel] How to use operation data provider in this? thanks Milan. We have a pretty big yang model, so I just use a small subset to test the subscription. You are right the schema is fixed and I re-installed modules: module com-att-device{ namespace "http://com/att/device"; import com-oplink-device-common { prefix com-oplink-device-common; } prefix "com-att-device"; container open-optical-device{ container physical{ uses com-oplink-device-common:device-physical; config false; } list ports{ key "port-id"; leaf port-id { type uint32; } container port { leaf target-power { type uint32; } leaf current-power { type uint32; config false; } } } } } But still got the same error message: [ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical Here is my thoughts: In rp_dt_xpath_requests_state_data(), it failed on rp_dt_validate_node_xpath(rp_ctx->dm_ctx, NULL, sub->xpath, NULL, &state_data_node); where the sub->xpath is /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical seems that rp_dt_validate_node_xpath can not handle the submodule com-oplink-device-common: in the xpath? best, Jimmy MilanLen?o Software Developer S?dlo / Mlynsk? Nivy 56 / 821 05 Bratislava / Slovakia R&D centrum / Janka Kr??a 9 / 974 01 Bansk? Bystrica / Slovakia / Milan.Lenco at pantheon.tech reception: +421 2 206 65 114 / www.pantheon.sk [logo] ________________________________ From: Milan Len?o To: Jimmy Jin Cc: Sysrepo-public Sent: Tuesday, October 18, 2016 1:52 AM Subject: Re: [sysrepo-devel] How to use operation data provider in this? Hi Jimmy, Is this the full schema? I see a reference to a module com-att-device-common inside a uses clause, which I suppose is imported somewhere at the top of com-att-device and it's yang schema is present in the "yang" subdirectory of the repository, otherwise libyang wouldn't parse it. Also, based on the error, sysrepo expects this path to exists: /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical Have you changed the prefix com-oplink-device-common to com-att-device-common in the schema? Anytime you change a yang schema, in needs to be re-installed (using sysrepoctl, not manual copying) for sysrepo to re-run static analysis to gather some metadata from the module for the purpose of more effective processing in the runtime. Regards, Milan ________________________________ Od: Jimmy Jin Odoslan?: 18. okt?bra 2016 1:28 Komu: Milan Len?o K?pia: Sysrepo-public Predmet: Re: [sysrepo-devel] How to use operation data provider in this? Hi Milan, I pulled latest master and still had some issues: schema: module com-att-device{ namespace "http://com/att/device"; prefix "com-att-device"; container open-optical-device{ container physical{ uses com-att-device-common:device-physical; config false; } list ports{ key "port-id"; leaf port-id { type uint32; } container port { leaf target-power { type uint32; } leaf current-power { type uint32; config false; } } } } } provider: sr_dp_get_items_subscribe(session, "/com-att-device:open-optical-device/ports/port/port-current-power", data_provider_cb, NULL,... requestor: sr_get_items_iter(session, "/com-att-device:open-optical-device/ports/port/port-current-power", &iter); when requstor is called, sysrepod had error: [ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical [ERR] (rp_dt_prepare_data:811) rp_dt_xpath_requests_state_data failed [ERR] (rp_dt_get_values_wrapper_with_opts:966) rp_dt_prepare_data failed [ERR] (rp_dt_get_values_wrapper_with_opts:995) Copying values from nodes failed for xpath '/com-att-device:open-optical-device/ports/port/port-current-power' [ERR] (rp_get_items_req_process:516) Get items failed for '/com-att-device:open-optical-device/ports/port/port-current-power', session id=501286277. the error in first line seems very strange. Any idea? thanks, Jimmy ________________________________ From: Milan Len?o To: Jimmy Jin Cc: Sysrepo-public Sent: Friday, October 14, 2016 1:52 PM Subject: Re: [sysrepo-devel] How to use operation data provider in this? Hi Jimmy, it turned out that there is a bug in sysrepo that occurs in a scenario when state data are inside configurable list, just like in your case. So firstly, thanks for helping to discover and navigate this issue. The patch is ready in this pull request: https://github.com/sysrepo/sysrepo/pull/424. Once it is reviewed, it will be merged to master, most likely on Monday. You will then need to update your local copy of the master branch to the latest version (will be 0.4.3). Now regarding sr_dp_get_items_subscribe: when you are subscribing for state data, always use xpath without predicates, as if to reference the schema node rather then a data node. So in your case, you may directly subscribe the provider to "/com-att-device:ports/port/current-power" or to any predecessor of the current-power schema node. Your attempt to use "/com-att-device:ports" was also correct, just the aforementioned bug caused sysrepo to incorrectly process the data returned by the provider. Your state data provider will be asked to provide values for the predicate-less xpath "/com-att-device:ports/port/current-power", so it is expected to return value for every port in the ports list that there is (or there can be, provider may or may not track the list of all ports currently configured). E.g.: values[0].xpath = strdup("/com-att-device:ports[port-id='0']/port/current-power"); values[0].data.uint32_val = 10; values[1].xpath = strdup("/com-att-device:ports[port-id='1']/port/current-power"); values[1].data.uint32_val = 15; values[2].xpath = strdup("/com-att-device:ports[port-id='2']/port/current-power"); values[2].data.uint32_val = 5; etc. The truth is that this topic is under-documented in sysrepo and in the following two weeks we are planing to improve the documentation and focus also on this area in detail. Regards, Milan ________________________________ Od: Jimmy Jin Odoslan?: 14. okt?bra 2016 1:42 Komu: sysrepo-devel at sysrepo.org Predmet: [sysrepo-devel] How to use operation data provider in this? Hi, when operation data and conf data are mixed in a sub tree, I can not make the data provide callback working. here is the schema example: module com-att-device{ namespace "http://com/att/device"; prefix "com-att-device"; list ports{ leaf port-id { type uint32; } container port { leaf target-power { type uint32; } leaf current-power { type uint32; config false; } } } } I like to implement a data provider for current-power, but had no luck so far. I am not sure what xpath I should use in this call: sr_dp_get_items_subscribe(session, xpath.....). seems xpath =" /com-att-device:ports" is not working. Because it is a list, so i can not specify the path all the way to current-power, is wildcard support? like: /com-att-device:ports[port-id='?']/port/current-power. thanks in advance. Jimmy MilanLen?o Software Developer S?dlo / Mlynsk? Nivy 56 / 821 05 Bratislava / Slovakia R&D centrum / Janka Kr??a 9 / 974 01 Bansk? Bystrica / Slovakia / Milan.Lenco at pantheon.tech reception: +421 2 206 65 114 / www.pantheon.sk [logo] -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Thu Nov 3 15:34:58 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Thu, 3 Nov 2016 15:34:58 +0000 Subject: [sysrepo-devel] not able to delete an ietf-interface Message-ID: <2c715aeacc504cb6bc24ce5825667015@advaoptical.com> I am not able to delete an ietf interface - the following netopeer debug shows that the operation is delete But he msg sent to sysrepo does not contain the delete information - so the interface does not get deleted. Any ideas if this is a bug or if I am doing something wrong. Thanks [2016/11/03 11:25:53.223464, 3] ssh_channel_read_timeout: Read (1) buffered : 1 bytes. Window: 1257423 netopeer2-server[28284]: Session 1: received message: ip-2 netopeer2-server[28284]: DICT: inserting "rpc" with collision netopeer2-server[28284]: DICT: inserting "message-id" with collision netopeer2-server[28284]: DICT: inserting "51" with collision netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[28284]: DICT: inserting (refcount) "target" netopeer2-server[28284]: DICT: inserting (refcount) "candidate" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "config" netopeer2-server[28284]: DICT: inserting (refcount) "interfaces" netopeer2-server[28284]: DICT: inserting (refcount) "if" netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:yang:ietf-interfaces" netopeer2-server[28284]: DICT: inserting "operation" with collision netopeer2-server[28284]: DICT: inserting (refcount) "delete" netopeer2-server[28284]: DICT: inserting (refcount) "interface" netopeer2-server[28284]: DICT: inserting (refcount) "operation" netopeer2-server[28284]: DICT: inserting (refcount) "delete" netopeer2-server[28284]: DICT: inserting (refcount) "name" netopeer2-server[28284]: DICT: inserting "ip-2" with collision netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "merge" netopeer2-server[28284]: DICT: inserting (refcount) "test-then-set" netopeer2-server[28284]: DICT: inserting (refcount) "stop-on-error" netopeer2-server[28284]: Resolving unresolved data nodes and their constraints... netopeer2-server[28284]: All data nodes and constraints resolved. netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/target/*": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "target" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "*" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "target" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[32] netopeer2-server[28284]: DICT: inserting (refcount) "*" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[33] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/default-operation": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "default-operation" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "default-operation" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/test-option": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "test-option" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "test-option" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/error-option": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "error-option" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "error-option" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/config": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "config" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: Ignoring "operation" attribute in "interfaces" element. netopeer2-server[28284]: Ignoring "operation" attribute in "interface" element. netopeer2-server[28284]: EDIT_CONFIG: ds 8316224, defop 1, testopt 0, config: ip-2 netopeer2-server[28284]: EDIT_CONFIG: list /ietf-interfaces:interfaces/interface[name='ip-2'], operation 1 netopeer2-server[28284]: (cl_request_process:416) Sending set-item request. netopeer2-server[28284]: (cl_request_process:438) set-item request sent, waiting for response. netopeer2-server[28284]: (cl_request_process:460) set-item response received, processing. netopeer2-server[28284]: EDIT_CONFIG: success (/ietf-interfaces:interfaces/interface[name='ip-2']). netopeer2-server[28284]: (cl_request_process:416) Sending validate request. netopeer2-server[28284]: (cl_request_process:438) validate request sent, waiting for response. netopeer2-server[28284]: (cl_request_process:460) validate response received, processing. netopeer2-server[28284]: EDIT_CONFIG: done. netopeer2-server[28284]: Session 1: sending message: #92 [2016/11/03 11:25:53.250444, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2016/11/03 11:25:53.250490, 3] packet_send2: packet: wrote [len=28,padding=13,comp=14,payload=14] [2016/11/03 11:25:53.250515, 3] channel_write_common: channel_write wrote 5 bytes netopeer2-server[28284]: Session 1: sending message: [2016/11/03 11:25:53.250588, 3] packet_send2: packet: wrote [len=108,padding=6,comp=101,payload=101] [2016/11/03 11:25:53.250614, 3] channel_write_common: channel_write wrote 92 bytes [2016/11/03 11:25:53.250646, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket netopeer2-server[28284]: Session 1: sending message: ## [2016/11/03 11:25:53.250713, 3] packet_send2: packet: wrote [len=28,padding=14,comp=13,payload=13] [2016/11/03 11:25:53.250739, 3] channel_write_common: channel_write wrote 4 bytes [2016/11/03 11:25:53.250767, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Thu Nov 3 15:40:01 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Thu, 3 Nov 2016 15:40:01 +0000 Subject: [sysrepo-devel] not able to delete an ietf-interface In-Reply-To: <2c715aeacc504cb6bc24ce5825667015@advaoptical.com> References: <2c715aeacc504cb6bc24ce5825667015@advaoptical.com> Message-ID: Hi, It seems to be a bug in Netopeer. I reported a similar issue, but with "replace" operation yesterday: https://github.com/CESNET/Netopeer2/issues/49 Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Thursday, November 3, 2016 4:35 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] not able to delete an ietf-interface I am not able to delete an ietf interface - the following netopeer debug shows that the operation is delete But he msg sent to sysrepo does not contain the delete information - so the interface does not get deleted. Any ideas if this is a bug or if I am doing something wrong. Thanks [2016/11/03 11:25:53.223464, 3] ssh_channel_read_timeout: Read (1) buffered : 1 bytes. Window: 1257423 netopeer2-server[28284]: Session 1: received message: ip-2 netopeer2-server[28284]: DICT: inserting "rpc" with collision netopeer2-server[28284]: DICT: inserting "message-id" with collision netopeer2-server[28284]: DICT: inserting "51" with collision netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[28284]: DICT: inserting (refcount) "target" netopeer2-server[28284]: DICT: inserting (refcount) "candidate" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "config" netopeer2-server[28284]: DICT: inserting (refcount) "interfaces" netopeer2-server[28284]: DICT: inserting (refcount) "if" netopeer2-server[28284]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:yang:ietf-interfaces" netopeer2-server[28284]: DICT: inserting "operation" with collision netopeer2-server[28284]: DICT: inserting (refcount) "delete" netopeer2-server[28284]: DICT: inserting (refcount) "interface" netopeer2-server[28284]: DICT: inserting (refcount) "operation" netopeer2-server[28284]: DICT: inserting (refcount) "delete" netopeer2-server[28284]: DICT: inserting (refcount) "name" netopeer2-server[28284]: DICT: inserting "ip-2" with collision netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "" netopeer2-server[28284]: DICT: inserting (refcount) "merge" netopeer2-server[28284]: DICT: inserting (refcount) "test-then-set" netopeer2-server[28284]: DICT: inserting (refcount) "stop-on-error" netopeer2-server[28284]: Resolving unresolved data nodes and their constraints... netopeer2-server[28284]: All data nodes and constraints resolved. netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/target/*": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "target" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "*" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "target" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[32] netopeer2-server[28284]: DICT: inserting (refcount) "*" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[33] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/default-operation": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "default-operation" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "default-operation" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/test-option": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "test-option" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "test-option" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/error-option": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "error-option" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "error-option" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: XPATH: expression "/ietf-netconf:edit-config/config": netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[28284]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[28284]: XPATH: Token NameTest, in expression "config" netopeer2-server[28284]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[28284]: DICT: inserting (refcount) "edit-config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[28284]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[28284]: DICT: inserting (refcount) "config" netopeer2-server[28284]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[28284]: Ignoring "operation" attribute in "interfaces" element. netopeer2-server[28284]: Ignoring "operation" attribute in "interface" element. netopeer2-server[28284]: EDIT_CONFIG: ds 8316224, defop 1, testopt 0, config: ip-2 netopeer2-server[28284]: EDIT_CONFIG: list /ietf-interfaces:interfaces/interface[name='ip-2'], operation 1 netopeer2-server[28284]: (cl_request_process:416) Sending set-item request. netopeer2-server[28284]: (cl_request_process:438) set-item request sent, waiting for response. netopeer2-server[28284]: (cl_request_process:460) set-item response received, processing. netopeer2-server[28284]: EDIT_CONFIG: success (/ietf-interfaces:interfaces/interface[name='ip-2']). netopeer2-server[28284]: (cl_request_process:416) Sending validate request. netopeer2-server[28284]: (cl_request_process:438) validate request sent, waiting for response. netopeer2-server[28284]: (cl_request_process:460) validate response received, processing. netopeer2-server[28284]: EDIT_CONFIG: done. netopeer2-server[28284]: Session 1: sending message: #92 [2016/11/03 11:25:53.250444, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2016/11/03 11:25:53.250490, 3] packet_send2: packet: wrote [len=28,padding=13,comp=14,payload=14] [2016/11/03 11:25:53.250515, 3] channel_write_common: channel_write wrote 5 bytes netopeer2-server[28284]: Session 1: sending message: [2016/11/03 11:25:53.250588, 3] packet_send2: packet: wrote [len=108,padding=6,comp=101,payload=101] [2016/11/03 11:25:53.250614, 3] channel_write_common: channel_write wrote 92 bytes [2016/11/03 11:25:53.250646, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket netopeer2-server[28284]: Session 1: sending message: ## [2016/11/03 11:25:53.250713, 3] packet_send2: packet: wrote [len=28,padding=14,comp=13,payload=13] [2016/11/03 11:25:53.250739, 3] channel_write_common: channel_write wrote 4 bytes [2016/11/03 11:25:53.250767, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjin62 at yahoo.com Thu Nov 3 21:43:23 2016 From: jjin62 at yahoo.com (Jimmy Jin) Date: Thu, 3 Nov 2016 21:43:23 +0000 (UTC) Subject: [sysrepo-devel] How to use operation data provider in this? In-Reply-To: <1478079031815.21958@pantheon.tech> References: <65073869.87443.1476402145245.ref@mail.yahoo.com> <65073869.87443.1476402145245@mail.yahoo.com> <1476478341431.71003@pantheon.tech> <24742940.1876930.1476746882714@mail.yahoo.com> <1476780770245.63205@pantheon.tech> <2042598613.245171.1476819677927@mail.yahoo.com> <1963999420.957112.1477438879040@mail.yahoo.com> <1478079031815.21958@pantheon.tech> Message-ID: <728591103.816860.1478209403273@mail.yahoo.com> Milan,Tried latest master and operational data in a sub module (uses statement in yang model) is working!!? An issue of sysrepod crush is reported in github, issue 512.? thanks for the help,Jimmy From: Milan Len?o To: Jimmy Jin Cc: Sysrepo-public Sent: Wednesday, November 2, 2016 2:30 AM Subject: Re: [sysrepo-devel] How to use operation data provider in this? #yiv2294607444 #yiv2294607444 --P{margin-top:0;margin-bottom:0;}#yiv2294607444 --P {margin-top:0;margin-bottom:0;}#yiv2294607444 --P {margin-top:0;margin-bottom:0;}#yiv2294607444 -- --P {margin-top:0;margin-bottom:0;}#yiv2294607444 Hi Jimmy, Sorry for a late response, but I accidentally missed your?email in?all the communication that is going?on right now.?I recommend you to open an?issue in github (https://github.com/sysrepo/sysrepo/issues) everytime you have any problem with sysrepo, rather than sending emails directly. There it will certainly not get overlooked by us. Now regarding your issue:Firstly, from the schema you posted before it doesn't seem that com-oplink-device-common is a submodule, but rather a module on it's own (import used instead of include). I have triedcom-att-device with a made up?version of module com-oplink-device-common (I didn't find its schema in our communication), but didn't experience any issues. Very recently, however, there have been some patches committed to master that fix certain cases related to operational data introduced into the module through the USES statement. Could you please pull the latest master and re-try? If the issue still exists, please file an issue report on github and if it is possible also attach the content of com-oplink-device-common and com-att-device, at least the relevant parts if they are too long. Thanks,Milan Od: Jimmy Jin Odoslan?: 26. okt?bra 2016 1:41 Komu: Milan Len?o K?pia: Sysrepo-public Predmet: Re: [sysrepo-devel] How to use operation data provider in this??Hi Milan, Just pull the master and I did more testing seems here is what I saw:1) if a operational data is in a submodule. as in the following case, operational data device-physical is defined in submodule?com-oplink-device-common;2) after?sr_dp_get_items_subscribe(sess, xpath...) is called ( for ANY xpath);3) sr_get_??? (sess, xpath...) for ANY xpath will fail with the SAME error (it is always on the FIRST occurrence, where a operational data is in a submodule) [ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for "MODULE:xpath-to-submodulel/SUBMODULE:xpath-in-submodule." as in the following example[ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical If I remove config false from device-physical, then the error will happen in the next place, ?where a operational data is in a submodule. if I don't call sr_dp_get_items_subscribe in 2), then everything works as usual. Please confirm. thanks,Jimmy From: Jimmy Jin To: Milan Len?o Cc: Sysrepo-public Sent: Tuesday, October 18, 2016 12:41 PM Subject: Re: [sysrepo-devel] How to use operation data provider in this? thanks Milan. We have a pretty big yang model, so I just use a small subset to test the subscription. You are right the schema is fixed and I re-installed modules: module com-att-device{ ? namespace "http://com/att/device"; ?? import com-oplink-device-common {? ? prefix com-oplink-device-common;? }? prefix "com-att-device";? container open-optical-device{? ? container physical{? ? ? uses com-oplink-device-common:device-physical;? ? ? config false;? ? } ??? list ports{ ? ? ? ??? ? ? key "port-id";????? leaf port-id { ??????? type uint32; ????? } ????? container port {??????? leaf target-power {???????? ??????????? type uint32; ??????? }??????? leaf current-power {? ? ?? ????? type uint32;?????????? config false; ?? ? ?? }? ?? }? ?}? }} But still got the same error message:[ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical Here is my thoughts:In rp_dt_xpath_requests_state_data(), it failed on rp_dt_validate_node_xpath(rp_ctx->dm_ctx, NULL,? ? ? ? ? ? ? ? ? ? sub->xpath, NULL, &state_data_node); where the sub->xpath is ?/com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical seems that rp_dt_validate_node_xpath can not handle the submodule?com-oplink-device-common:?in the xpath? best,Jimmy MilanLen?oSoftware Developer S?dlo?/?Mlynsk? Nivy 56 /821 05 Bratislava/ Slovakia R&D centrum?/?Janka Kr??a 9?/?974 01 Bansk? Bystrica?/?Slovakia /Milan.Lenco at pantheon.tech reception: +421 2 206 65 114/www.pantheon.sk? From: Milan Len?o To: Jimmy Jin Cc: Sysrepo-public Sent: Tuesday, October 18, 2016 1:52 AM Subject: Re: [sysrepo-devel] How to use operation data provider in this? #yiv2294607444 #yiv2294607444 -- --P {margin-top:0;margin-bottom:0;}#yiv2294607444 --P {margin-top:0;margin-bottom:0;}#yiv2294607444 Hi Jimmy, Is this the full schema? I see a reference to a modulecom-att-device-common inside auses clause, which I suppose is imported somewhere at the top of?com-att-device and it's yang schema is present in the "yang" subdirectory of the repository, otherwise libyang wouldn't parse it. Also, based on the error, sysrepo expects this path to exists: /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physicalHave you changed the prefixcom-oplink-device-common to com-att-device-common?in the schema? Anytime you change a yang schema, in needs to be re-installed (using sysrepoctl, not manual copying) for sysrepo to re-run static analysis to gather?some metadata from the module for the purpose of more effective processing in the runtime. Regards,Milan Od: Jimmy Jin Odoslan?: 18. okt?bra 2016 1:28 Komu: Milan Len?o K?pia: Sysrepo-public Predmet: Re: [sysrepo-devel] How to use operation data provider in this??Hi Milan,I pulled latest master and still had some issues: schema:module com-att-device{ ? namespace "http://com/att/device"; ? prefix "com-att-device"; ? container open-optical-device{? ? container physical{? ? ? uses com-att-device-common:device-physical;? ? ? config false;? ? } ??? list ports{ ? ? ? ??? ? ? key "port-id";????? leaf port-id { ??????? type uint32; ????? } ????? container port {??????? leaf target-power {???????? ??????????? type uint32; ??????? }??????? leaf current-power {? ? ?? ????? type uint32;?????????? config false; ?? ? ?? }? ?? }? ?}? }} provider:sr_dp_get_items_subscribe(session, "/com-att-device:open-optical-device/ports/port/port-current-power", data_provider_cb, NULL,... requestor:sr_get_items_iter(session, "/com-att-device:open-optical-device/ports/port/port-current-power", &iter); when requstor is called, sysrepod had error:[ERR] (rp_dt_xpath_requests_state_data:684) Unable to find schema node for /com-att-device:open-optical-device/physical/com-oplink-device-common:device-physical[ERR] (rp_dt_prepare_data:811) rp_dt_xpath_requests_state_data failed[ERR] (rp_dt_get_values_wrapper_with_opts:966) rp_dt_prepare_data failed[ERR] (rp_dt_get_values_wrapper_with_opts:995) Copying values from nodes failed for xpath '/com-att-device:open-optical-device/ports/port/port-current-power'[ERR] (rp_get_items_req_process:516) Get items failed for '/com-att-device:open-optical-device/ports/port/port-current-power', session id=501286277. ?the error in first line seems very strange. Any idea? thanks,Jimmy From: Milan Len?o To: Jimmy Jin Cc: Sysrepo-public Sent: Friday, October 14, 2016 1:52 PM Subject: Re: [sysrepo-devel] How to use operation data provider in this? #yiv2294607444 #yiv2294607444 -- -- --P {margin-top:0;margin-bottom:0;}#yiv2294607444 Hi Jimmy, it turned out that there is a bug in sysrepo that occurs in a scenario when state data are inside configurable list, just like in your case. So firstly, thanks for helping to discover and navigate this issue. The patch is ready in this?pull request: https://github.com/sysrepo/sysrepo/pull/424. Once it is reviewed, it will be merged to master, most likely on Monday. You will then need to update your local copy of the master branch to the latest version (will be 0.4.3). Now regarding sr_dp_get_items_subscribe: when you are?subscribing for state data, always use xpath without predicates, as if to reference the schema node rather then a data node. So in your case, you may directly subscribe the provider to "/com-att-device:ports/port/current-power" or to any predecessor of the current-power schema node.?Your attempt?to use "/com-att-device:ports" was also correct, just the aforementioned bug caused sysrepo to incorrectly process the data returned by the provider.Your state data provider will be asked to provide values for the predicate-less xpath "/com-att-device:ports/port/current-power", so it is expected to return value for every port in the ports list that there is (or there can be, provider may or may not track the list of all ports currently configured). E.g.: values[0].xpath =? strdup("/com-att-device:ports[port-id='0']/port/current-power");values[0].data.uint32_val = 10; values[1].xpath =? strdup("/com-att-device:ports[port-id='1']/port/current-power");values[1].data.uint32_val = 15; values[2].xpath =? strdup("/com-att-device:ports[port-id='2']/port/current-power");values[2].data.uint32_val = 5; etc. The truth is that this topic is under-documented in sysrepo and in the following two weeks we are planing to improve the documentation and focus also on this area in detail. Regards,Milan Od: Jimmy Jin Odoslan?: 14. okt?bra 2016 1:42 Komu: sysrepo-devel at sysrepo.org Predmet: [sysrepo-devel] How to use operation data provider in this??Hi,when operation data and conf data are mixed in a sub tree, I can not make the data provide callback working. here is the schema example: module com-att-device{ ? namespace "http://com/att/device"; ? prefix "com-att-device";??? list ports{????? ????? leaf port-id { ??????? type uint32; ????? } ????? container port {??????? leaf target-power {??????? ??????????? type uint32; ??????? }??????? leaf current-power { ? ?? ????? type uint32;?????????? config false; ?? ? ?? }? ?? }? }} I like to implement a data provider for current-power, but had no luck so far. I am not sure what xpath I should use in this call:sr_dp_get_items_subscribe(session, xpath.....).seems xpath =" /com-att-device:ports" is not working. Because it is a list, so i can not specify the path all the way to current-power, is wildcard support? like:/com-att-device:ports[port-id='?']/port/current-power. thanks in advance.Jimmy MilanLen?o Software Developer S?dlo?/?Mlynsk? Nivy 56 / 821 05 Bratislava/ Slovakia R&D centrum?/?Janka Kr??a 9?/?974 01 Bansk? Bystrica?/?Slovakia /Milan.Lenco at pantheon.tech reception: +421 2 206 65 114/www.pantheon.sk? -------------- next part -------------- An HTML attachment was scrubbed... URL: From luka.perkov at sartura.hr Sun Nov 6 00:17:15 2016 From: luka.perkov at sartura.hr (Luka Perkov) Date: Sun, 6 Nov 2016 01:17:15 +0100 Subject: [sysrepo-devel] Sysrepo: One YANG compilation error In-Reply-To: <3ea7b8ed-88e2-08d5-69f6-813e7079370a@cisco.com> References: <3ea7b8ed-88e2-08d5-69f6-813e7079370a@cisco.com> Message-ID: Hi Benoit, I've noticed that there were no replies to your email... Anyhow in the latest compilation executed on November 4th all tests are passed :) Thanks, Luka On Fri, Oct 28, 2016 at 1:43 PM, Benoit Claise wrote: > Hi guys, > > See http://www.claise.be/2016/07/ietf-yang-modules-statistiques/ > Sysrepo > > - All* Internal YANG data models from github * > and* > Related stats * > - All* Application-related YANG data models from github * > and* > Related stats * > > One compilation error at http://www.claise.be/ > SysrepoInternalYANGPageCompilation.html, FYI. > > Regards, B. > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bclaise at cisco.com Sun Nov 6 07:15:02 2016 From: bclaise at cisco.com (Benoit Claise) Date: Sun, 6 Nov 2016 08:15:02 +0100 Subject: [sysrepo-devel] Sysrepo: One YANG compilation error In-Reply-To: References: <3ea7b8ed-88e2-08d5-69f6-813e7079370a@cisco.com> Message-ID: <97ce7e25-4628-4dd3-fedc-914896c8a31d@cisco.com> Thanks Luka. B. > Hi Benoit, > > I've noticed that there were no replies to your email... Anyhow in the > latest compilation executed on November 4th all tests are passed :) > > Thanks, > Luka > > > On Fri, Oct 28, 2016 at 1:43 PM, Benoit Claise > wrote: > > Hi guys, > > See http://www.claise.be/2016/07/ietf-yang-modules-statistiques/ > > Sysrepo > > * All_Internal YANG data models from github _ > and__Related > stats_ _ > * All_Application-related YANG data models from github _ > and_Related > stats _ > > One compilation error at > http://www.claise.be/SysrepoInternalYANGPageCompilation.html > , FYI. > > Regards, B. > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Mon Nov 7 12:22:24 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Mon, 7 Nov 2016 12:22:24 +0000 Subject: [sysrepo-devel] rpc reply ok when error is detected in sysrepo Message-ID: <746f9aa7865c4f369681230cc3987f17@advaoptical.com> When I enter an invalid configuration using the when clause I get an rpc-ok reply, However I have determined that the error was detected in sysrepo and the config does not get loaded into the data store - but the issue is that the user does not know about the error. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=3, count=0. [DBG] (rp_validate_req_process:1042) Processing validate request. [DBG] (dm_ly_log_cb:815) libyang error: When condition "../interface-type = 'int-abc'" not satisfied. (path: /ietf-interfaces:interfaces/interface[name='def-3']/one-interfaces:interface-config/def) [DBG] (dm_validate_session_data_trees:2125) Validation failed for ietf-interfaces module [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=3, current count=1. [DBG] (cm_msg_enqueue_cb:1650) New message enqueued into CM message queue. I was doing some negative testing and expected to get a rpc-error response as the when clause is not correct, as accurately detected by sysrepo - But instead I got an rpc-ok I suspect the error was not sent back to netopeer. Should I open a ticket on this or is there something I am doing wrong. thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Tue Nov 8 13:50:06 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Tue, 8 Nov 2016 13:50:06 +0000 Subject: [sysrepo-devel] rpc reply ok when error is detected in sysrepo In-Reply-To: <746f9aa7865c4f369681230cc3987f17@advaoptical.com> References: <746f9aa7865c4f369681230cc3987f17@advaoptical.com> Message-ID: <00e7d65d2f5c464a8e8e5877302d12f6@XCH-RCD-002.cisco.com> Hi, This may be an issue in Sysrepo, but we would need to see more logs that just this short snippet. Please open an issue on Github, we will look into it. Thanks, Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Monday, November 7, 2016 1:22 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] rpc reply ok when error is detected in sysrepo When I enter an invalid configuration using the when clause I get an rpc-ok reply, However I have determined that the error was detected in sysrepo and the config does not get loaded into the data store - but the issue is that the user does not know about the error. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=3, count=0. [DBG] (rp_validate_req_process:1042) Processing validate request. [DBG] (dm_ly_log_cb:815) libyang error: When condition "../interface-type = 'int-abc'" not satisfied. (path: /ietf-interfaces:interfaces/interface[name='def-3']/one-interfaces:interface-config/def) [DBG] (dm_validate_session_data_trees:2125) Validation failed for ietf-interfaces module [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=3, current count=1. [DBG] (cm_msg_enqueue_cb:1650) New message enqueued into CM message queue. I was doing some negative testing and expected to get a rpc-error response as the when clause is not correct, as accurately detected by sysrepo - But instead I got an rpc-ok I suspect the error was not sent back to netopeer. Should I open a ticket on this or is there something I am doing wrong. thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From boii at wwczuc.net Fri Nov 4 05:39:24 2016 From: boii at wwczuc.net (=?utf-8?B?6JGb5qSN?=) Date: Fri, 4 Nov 2016 13:39:24 +0800 Subject: [sysrepo-devel] =?utf-8?b?5Zue5aSN77ya5aaC5L2V5YGa5aW9LuS8gS4=?= =?utf-8?b?5LiaLumHhy7otK3vvIzpmY0u5L2OLui/kC7okKUu5oiQLuacrA==?= Message-ID: <204268731335D03A29680D6A0EEB4683@wwczuc.net> From: ?? / boii at wwczuc.net To: sysrepo-devel at sysrepo.org Sent: 2016-11-4/13:39:31 ??????. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Milan.Lenco at pantheon.tech Thu Nov 10 12:05:03 2016 From: Milan.Lenco at pantheon.tech (=?iso-8859-2?Q?Milan_Len=E8o?=) Date: Thu, 10 Nov 2016 12:05:03 +0000 Subject: [sysrepo-devel] sysrepo v. 0.5.0 released Message-ID: <1478779503727.20302@pantheon.tech> Hi, we have just released sysrepo version 0.5.0 which contains the following new features: * SR_SUBSCR_EV_ENABLED notification event (subscriber can be notified about configuration that was copied from startup to running, allows reusing of the code for subscriber callbacks to read startup configuration), * sr_plugin_health_check_cb plugins API for checking whether the plugin/managed application is healthy, * helpers API: sr_val_set_string renamed to sr_val_set_str_data & modified, added sr_val_build_str_data, sr_val_build_xpath and some more helpers, * added some examples & documentation, * many bugfixes. Regards, Milan MilanLen?o Software Developer S?dlo / Mlynsk? Nivy 56 / 821 05 Bratislava / Slovakia R&D centrum / Janka Kr??a 9 / 974 01 Bansk? Bystrica / Slovakia / Milan.Lenco at pantheon.tech reception: +421 2 206 65 114 / www.pantheon.sk [logo] -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Thu Nov 10 16:47:04 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Thu, 10 Nov 2016 16:47:04 +0000 Subject: [sysrepo-devel] how to block user from editing the running Message-ID: <96c7328e8c1241c69c4145dbcf861c05@advaoptical.com> Is there a way to prevent (not allow) the user to directly edit the running date store. I would like to make sure the users can only edit the candidate - and issue a commit to change the running. But not sure how to block this - any ideas? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Tue Nov 15 12:50:32 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Tue, 15 Nov 2016 12:50:32 +0000 Subject: [sysrepo-devel] how to block user from editing the running In-Reply-To: <96c7328e8c1241c69c4145dbcf861c05@advaoptical.com> References: <96c7328e8c1241c69c4145dbcf861c05@advaoptical.com> Message-ID: <63ecb1082b9a4eaa96c7c57fb3267224@XCH-RCD-002.cisco.com> Hi, There is no API that would force running datastore to be non-writeable in Sysrepo. Anyway, if this was demanded, I would rather put the switch to disable writeable-running capability to Netopeer2 server and not into datastore. Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Thursday, November 10, 2016 5:47 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] how to block user from editing the running Is there a way to prevent (not allow) the user to directly edit the running date store. I would like to make sure the users can only edit the candidate - and issue a commit to change the running. But not sure how to block this - any ideas? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From fan.changhu at zte.com.cn Wed Nov 16 08:05:04 2016 From: fan.changhu at zte.com.cn (=?UTF-8?B?6IyD5piM6JmOIA==?=) Date: Wed, 16 Nov 2016 16:05:04 +0800 (CST) Subject: [sysrepo-devel] =?utf-8?q?an_idea_about_Operational_Data_API?= Message-ID: <201611161605045283652@zte.com.cn> SGksIGFsbDoNCg0KICBJIGZvdW5kIHRoYXQgJ3NyX2RwX2dldF9pdGVtc19jYicgaXMgY2FsbGVk IG1hbnkgdGltZXMgaW4gYSAnZ2V0JyByZXF1ZXN0IGZvciBvbmUgc3Vic2NyaWJlciBpZiB0aGVy ZSBhcmUgbWFueSBzdGF0ZSBub2RlcyBpbiBzY2hlbWEuIEhvd2V2ZXIsIHRoaXMgbWF5IGNhdXNl IHByb2JsZW0gd2hlbiB0aGUgc3RhdGUgZGF0YSBpcyBzdG9yZWQgaW4gYW5vdGhlciBzZXJ2aWNl LCBzdWNoIGFzIGEgcmVtb3RlIGhvc3QsIHdlIG5lZWQgc2VuZCBtYW55IG1lc3NhZ2VzIHRvIHRo ZSByZW1vdGUgaG9zdCB0byBnZXQgdGhlIHN0YXRlIGRhdGEuIENhbiB3ZSBqdXN0IGNhbGwgJ3Ny X2RwX2dldF9pdGVtc19jYicgb25jZSB3aXRoIGFsbCBuZWVkZWQgeHBhdGhzLCB0aGVuIHRoZSBz dWJzY3JpYmVyIGNhbiByZXR1cm4gYWxsIHN0YXRlIGRhdGEgb25jZS4NCg0KDQoNCg0KDQoNCg0K DQoNCg0KDQoNCg0KDQogPC9kaXY= -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhatkj at gmail.com Fri Nov 18 15:06:05 2016 From: bhatkj at gmail.com (krishnaprasad bhat) Date: Fri, 18 Nov 2016 20:36:05 +0530 Subject: [sysrepo-devel] How to increase timeout against operation data callback Message-ID: Hi, all: Is their any easy way to increase the timeout value so that GET request doesn't timeout, to accommodate the scenario where in the operational data provider callback (i.e. registered via sr_dp_get_items_subscribe api ) takes longer to process. Thanks, Krishna -------------- next part -------------- An HTML attachment was scrubbed... URL: From Milan.Lenco at pantheon.tech Fri Nov 18 15:14:30 2016 From: Milan.Lenco at pantheon.tech (=?iso-8859-2?Q?Milan_Len=E8o?=) Date: Fri, 18 Nov 2016 15:14:30 +0000 Subject: [sysrepo-devel] How to increase timeout against operation data callback In-Reply-To: References: Message-ID: <1479482069761.64128@pantheon.tech> Hi, currently the timeout for operational data retrieval is not CMake-configurable. It is only defined by macro RP_OPER_DATA_REQ_TIMEOUT in src/request_processor.c If you feel this is worth of propagating to CMake configuration, then please file an enhancement request on github: https://github.com/sysrepo/sysrepo/issues Thanks, Milan ________________________________ Od: krishnaprasad bhat Odoslan?: 18. novembra 2016 16:06 Komu: sysrepo-devel at sysrepo.org Predmet: [sysrepo-devel] How to increase timeout against operation data callback Hi, all: Is their any easy way to increase the timeout value so that GET request doesn't timeout, to accommodate the scenario where in the operational data provider callback (i.e. registered via sr_dp_get_items_subscribe api ) takes longer to process. Thanks, Krishna MilanLen?o Software Developer S?dlo / Mlynsk? Nivy 56 / 821 05 Bratislava / Slovakia R&D centrum / Janka Kr??a 9 / 974 01 Bansk? Bystrica / Slovakia / Milan.Lenco at pantheon.tech reception: +421 2 206 65 114 / www.pantheon.sk [logo] -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhatkj at gmail.com Fri Nov 18 15:40:57 2016 From: bhatkj at gmail.com (krishnaprasad bhat) Date: Fri, 18 Nov 2016 21:10:57 +0530 Subject: [sysrepo-devel] How to increase timeout against operation data callback In-Reply-To: <1479482069761.64128@pantheon.tech> References: <1479482069761.64128@pantheon.tech> Message-ID: Hi Milan, Thank you. Personally i feel it would be worth. So i have created the issue https://github.com/sysrepo/sysrepo/issues/550 -Krishna On Fri, Nov 18, 2016 at 8:44 PM, Milan Len?o wrote: > Hi, > > > currently the timeout for operational data retrieval is not > CMake-configurable. It is only defined by macro RP_OPER_DATA_REQ_TIMEOUT in > src/request_processor.c > > If you feel this is worth of propagating to CMake configuration, then > please file an enhancement request on github: https://github.com/sysrepo/ > sysrepo/issues > > > Thanks, > > Milan > ------------------------------ > *Od:* krishnaprasad bhat > *Odoslan?:* 18. novembra 2016 16:06 > *Komu:* sysrepo-devel at sysrepo.org > *Predmet:* [sysrepo-devel] How to increase timeout against operation data > callback > > Hi, all: > Is their any easy way to increase the timeout value so that GET request > doesn't timeout, to accommodate the scenario where in the operational data > provider callback (i.e. registered via sr_dp_get_items_subscribe api ) > takes longer to process. > > Thanks, > Krishna > > MilanLen?o > > Software Developer > > > S?dlo / Mlynsk? Nivy 56 / 821 05 Bratislava / Slovakia > R&D centrum / Janka Kr??a 9 / 974 01 Bansk? Bystrica / Slovakia > / Milan.Lenco at pantheon.tech > reception: +421 2 206 65 114 / www.pantheon.sk > > [image: logo] > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Tue Nov 22 12:04:38 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Tue, 22 Nov 2016 12:04:38 +0000 Subject: [sysrepo-devel] an idea about Operational Data API In-Reply-To: <201611161605045283652@zte.com.cn> References: <201611161605045283652@zte.com.cn> Message-ID: <87514b67e62244ac830454949fa75231@XCH-RCD-002.cisco.com> Hi, Currently it isn?t ?officially? possible. But in fact, you can do it ? provide all nested data in the first callback, and ignore the rest ones (provide no data in those). This trick should work for you. Anyway, we could get rid of the nested callbacks using some new subscription option - you can open an issue on Github for this, we will mark it as enhancement and process it sometime later. Thanks, Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of ??? Sent: Wednesday, November 16, 2016 9:05 AM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] an idea about Operational Data API Hi, all: I found that 'sr_dp_get_items_cb' is called many times in a 'get' request for one subscriber if there are many state nodes in schema. However, this may cause problem when the state data is stored in another service, such as a remote host, we need send many messages to the remote host to get the state data. Can we just call 'sr_dp_get_items_cb' once with all needed xpaths, then the subscriber can return all state data once. From luka.perkov at sartura.hr Wed Nov 23 08:57:55 2016 From: luka.perkov at sartura.hr (Luka Perkov) Date: Wed, 23 Nov 2016 09:57:55 +0100 Subject: [sysrepo-devel] an idea about Operational Data API In-Reply-To: <201611161605045283652@zte.com.cn> References: <201611161605045283652@zte.com.cn> Message-ID: Hi, this is very interesting request. Can you please explain us the use-case which you are trying to cover by using sysrepo in this way? Thanks, Luka On Wed, Nov 16, 2016 at 9:05 AM, ??? wrote: > Hi, all: > > I found that 'sr_dp_get_items_cb' is called many times in a 'get' > request for one subscriber if there are many state nodes in schema. > However, this may cause problem when the state data is stored in another > service, such as a remote host, we need send many messages to the remote > host to get the state data. Can we just call 'sr_dp_get_items_cb' once with > all needed xpaths, then the subscriber can return all state data once. > > > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fan.changhu at zte.com.cn Wed Nov 23 12:32:36 2016 From: fan.changhu at zte.com.cn (fan.changhu at zte.com.cn) Date: Wed, 23 Nov 2016 20:32:36 +0800 (CST) Subject: [sysrepo-devel] =?utf-8?q?an_idea_about_Operational_Data_API?= References: 201611161605045283652@zte.com.cn, CAKQ-criet9sQszk00uefehOC4fQBZ180++xFs61onVBwvC46dA@mail.gmail.com Message-ID: <201611232032363561049@zte.com.cn> SGksDQoNCg0KQ29uc2lkZXIgYSBkZXZpY2UgdGhhdCBpbmNsdWRlcyBvbmUgbWFpbiBkZXZpY2Ug YW5kIGEgZmV3IHN1YiBkZXZpY2VzLCBvbmx5IHRoZSBtYWluIGRldmljZSBoYXMgTkVUQ09ORiBp bnRlcmZhY2UgYW5kIGlzIG1hbmFnZWQgYnkgTkVUQ09ORiBtYW5hZ2VyLCBidXQgc29tZSBzdGF0 ZSBkYXRhIGlzIGhvbGQgYnkgdGhlIHN1YiBkZXZpY2VzIGFuZCBuZWVkIGJlIGdvdCBieSBuZXR3 b3JrIG1lc3NhZ2UuIElmIEkgaGF2ZSAxMCBzdGF0ZSBub2Rlcywgc3lzcmVwbyB3aWxsIGNhbGwg J3NyX2RwX2dldF9pdGVtc19jYicgMTAgdGltZXMsIHRoaXMgbWVhbnMgMTAgbWVzc2FnZXMgYW5k IDEwICogdGltZW91dCB0byB3YWl0Lg0KDQoNCg0KDQpJIGhhdmUgb3BlbiBhbiBpc3N1ZSBhYm91 dCB0aGlzIGluIGdpdGh1YiBhcyBzdWdnZXN0aW9uIGJ5IFJhc3Rpc2xhdiwgd2UgY2FuIGRpc2N1 c3MgaXQgdGhlcmUgaWYgbmVjZXNzb3J5Lg0KDQoNCg0KDQoNCg0KDQoNCg0KT3JpZ2luYWwgTWFp bA0KDQoNCg0KU2VuZGVyOiBMdWthUGVya292DQpUbzogRmFuQ2hhbmdIdQ0KQ0M6IO+8nHN5c3Jl cG8tZGV2ZWxAc3lzcmVwby5vcmfvvJ4NCkRhdGU6IDIwMTYvMTEvMjMgMTY6NTgNClN1YmplY3Q6 IFJlOiBbc3lzcmVwby1kZXZlbF0gYW4gaWRlYSBhYm91dCBPcGVyYXRpb25hbCBEYXRhIEFQSQ0K DQoNCg0KDQoNCg0KSGksDQp0aGlzIGlzIHZlcnkgaW50ZXJlc3RpbmcgcmVxdWVzdC4gQ2FuIHlv dSBwbGVhc2UgZXhwbGFpbiB1cyB0aGUgdXNlLWNhc2Ugd2hpY2ggeW91IGFyZSB0cnlpbmcgdG8g Y292ZXIgYnkgdXNpbmcgc3lzcmVwbyBpbiB0aGlzIHdheT8NCg0KVGhhbmtzLA0KTHVrYQ0KDQoN Cg0KDQoNCk9uIFdlZCwgTm92IDE2LCAyMDE2IGF0IDk6MDUgQU0sIOiMg+aYjOiZjiDvvJxmYW4u Y2hhbmdodUB6dGUuY29tLmNu77yeIHdyb3RlOg0KDQpIaSwgYWxsOg0KDQogIEkgZm91bmQgdGhh dCAnc3JfZHBfZ2V0X2l0ZW1zX2NiJyBpcyBjYWxsZWQgbWFueSB0aW1lcyBpbiBhICdnZXQnIHJl cXVlc3QgZm9yIG9uZSBzdWJzY3JpYmVyIGlmIHRoZXJlIGFyZSBtYW55IHN0YXRlIG5vZGVzIGlu IHNjaGVtYS4gSG93ZXZlciwgdGhpcyBtYXkgY2F1c2UgcHJvYmxlbSB3aGVuIHRoZSBzdGF0ZSBk YXRhIGlzIHN0b3JlZCBpbiBhbm90aGVyIHNlcnZpY2UsIHN1Y2ggYXMgYSByZW1vdGUgaG9zdCwg d2UgbmVlZCBzZW5kIG1hbnkgbWVzc2FnZXMgdG8gdGhlIHJlbW90ZSBob3N0IHRvIGdldCB0aGUg c3RhdGUgZGF0YS4gQ2FuIHdlIGp1c3QgY2FsbCAnc3JfZHBfZ2V0X2l0ZW1zX2NiJyBvbmNlIHdp dGggYWxsIG5lZWRlZCB4cGF0aHMsIHRoZW4gdGhlIHN1YnNjcmliZXIgY2FuIHJldHVybiBhbGwg c3RhdGUgZGF0YSBvbmNlLi4NCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQog77ycL2Rpdg0K DQpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KIHN5c3Jl cG8tZGV2ZWwgbWFpbGluZyBsaXN0DQogc3lzcmVwby1kZXZlbEBzeXNyZXBvLm9yZw0KIGh0dHA6 Ly9saXN0cy5zeXNyZXBvLm9yZy9saXN0aW5mby9zeXNyZXBvLWRldmVs -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvasko at cesnet.cz Fri Nov 25 14:16:09 2016 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Fri, 25 Nov 2016 15:16:09 +0100 Subject: [sysrepo-devel] NETCONF user mapped to system user Message-ID: <7293-58384780-2d-6f329000@211854554> Hi, first I will explain what I did. I am working on TLS authentication for netopeer2-server and today have managed to crash sysrepod. When authenticating using SSH, we require the username to be one also existing in the system. However, this is not true for TLS because all the personal information (certificate) is received from the client (unlike SSH when we need to get the user password from the system). Sysrepod printed the message [ERR] (sm_session_create:422) Cannot retrieve credentials of the effective user (default_ca): Invalid username? and crashed. We think the fix will be that netopeer2-server will check that the user exists (or sysrepod can return a nice error, it should not matter as both of them are on a single machine) and if not, the TLS connection will be terminated. Sadly, it is not possible to check the username existence when setting NETCONF TLS authentication options. So, what I mainly wanted to say is that sysrepod forces all NETCONF users to also be system users. Are we all ok with this, it will not be ever changed (maybe the new NACM could avoid it)? Regards, Michal From raszabo at cisco.com Fri Nov 25 14:32:41 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Fri, 25 Nov 2016 14:32:41 +0000 Subject: [sysrepo-devel] NETCONF user mapped to system user In-Reply-To: <7293-58384780-2d-6f329000@211854554> References: <7293-58384780-2d-6f329000@211854554> Message-ID: Hi, Please open an issue on github for the crash, if possible please also provide the backtrace - we will fix it. We can also return some nicer error (e.g. SR_ERR_UNKNOWN_USER or so) for this case. > So, what I mainly wanted to say is that sysrepod forces all NETCONF users to also be system users. Yes and no. If you used sr_session_start instead of sr_session_start_user, you would get no error, but all the operations would be authorized as for the user who is running the netopeer2-server (= in case of root, effectively no authorization, since everything will be permitted). > Are we all ok with this, it will not be ever changed (maybe the new NACM could avoid it)? I would vote for allowing only system users to access sysrepo, but yes, with NACM, this could be avoided and we could also support 'virtual' NETCONF users. Thanks, Rastislav -----Original Message----- From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Michal Va?ko Sent: Friday, November 25, 2016 3:16 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] NETCONF user mapped to system user Hi, first I will explain what I did. I am working on TLS authentication for netopeer2-server and today have managed to crash sysrepod. When authenticating using SSH, we require the username to be one also existing in the system. However, this is not true for TLS because all the personal information (certificate) is received from the client (unlike SSH when we need to get the user password from the system). Sysrepod printed the message [ERR] (sm_session_create:422) Cannot retrieve credentials of the effective user (default_ca): Invalid username? and crashed. We think the fix will be that netopeer2-server will check that the user exists (or sysrepod can return a nice error, it should not matter as both of them are on a single machine) and if not, the TLS connection will be terminated. Sadly, it is not possible to check the username existence when setting NETCONF TLS authentication options. So, what I mainly wanted to say is that sysrepod forces all NETCONF users to also be system users. Are we all ok with this, it will not be ever changed (maybe the new NACM could avoid it)? Regards, Michal _______________________________________________ sysrepo-devel mailing list sysrepo-devel at sysrepo.org http://lists.sysrepo.org/listinfo/sysrepo-devel From JoLandry at advaoptical.com Sun Nov 27 11:54:37 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Sun, 27 Nov 2016 11:54:37 +0000 Subject: [sysrepo-devel] how to block user from editing the running In-Reply-To: <63ecb1082b9a4eaa96c7c57fb3267224@XCH-RCD-002.cisco.com> References: <96c7328e8c1241c69c4145dbcf861c05@advaoptical.com> <63ecb1082b9a4eaa96c7c57fb3267224@XCH-RCD-002.cisco.com> Message-ID: Is there a way to change this capability - via some type of enabale/disable option? If so can you point me to what I need to modify to make the capabilities to not include writable-running? Meaning I want to only allow the user to use the edit-config on candidate - then commit to running. And not allow direct editing of running. Thanks, From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com] Sent: Tuesday, November 15, 2016 7:51 AM To: Joan Landry ; sysrepo-devel at sysrepo.org Subject: RE: how to block user from editing the running Hi, There is no API that would force running datastore to be non-writeable in Sysrepo. Anyway, if this was demanded, I would rather put the switch to disable writeable-running capability to Netopeer2 server and not into datastore. Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Thursday, November 10, 2016 5:47 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] how to block user from editing the running Is there a way to prevent (not allow) the user to directly edit the running date store. I would like to make sure the users can only edit the candidate - and issue a commit to change the running. But not sure how to block this - any ideas? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From lmacko at cisco.com Mon Nov 28 07:06:46 2016 From: lmacko at cisco.com (Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco)) Date: Mon, 28 Nov 2016 07:06:46 +0000 Subject: [sysrepo-devel] how to block user from editing the running In-Reply-To: References: <96c7328e8c1241c69c4145dbcf861c05@advaoptical.com> <63ecb1082b9a4eaa96c7c57fb3267224@XCH-RCD-002.cisco.com> Message-ID: <0215b95d89d3408da5004bef1ec355c3@XCH-ALN-015.cisco.com> Hi Joan, currently, there is no option for that. However, there is an ongoing discussion https://github.com/sysrepo/sysrepo/issues/571 about the subject. Regards, Lukas From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Sunday, November 27, 2016 12:55 PM To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) ; sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] how to block user from editing the running Is there a way to change this capability - via some type of enabale/disable option? If so can you point me to what I need to modify to make the capabilities to not include writable-running? Meaning I want to only allow the user to use the edit-config on candidate - then commit to running. And not allow direct editing of running. Thanks, From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com] Sent: Tuesday, November 15, 2016 7:51 AM To: Joan Landry >; sysrepo-devel at sysrepo.org Subject: RE: how to block user from editing the running Hi, There is no API that would force running datastore to be non-writeable in Sysrepo. Anyway, if this was demanded, I would rather put the switch to disable writeable-running capability to Netopeer2 server and not into datastore. Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Thursday, November 10, 2016 5:47 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] how to block user from editing the running Is there a way to prevent (not allow) the user to directly edit the running date store. I would like to make sure the users can only edit the candidate - and issue a commit to change the running. But not sure how to block this - any ideas? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Mon Nov 28 14:10:21 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Mon, 28 Nov 2016 14:10:21 +0000 Subject: [sysrepo-devel] rollback on error Message-ID: <0d6449a7e7f4434e99d5407b08f4c410@advaoptical.com> I have done an edit-config on candidate - followed by a commit to running. The commit fails as expected - since I put an invalid configuration on purpose. Then I do a get on candidate and still see the original invalid config entry - which I expected should no longer exist. I expected that the candidate data store should not contain the invalid entry. Do you know if rollback on error works or is it possibly something I am not doing correctly? thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Mon Nov 28 14:23:30 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Mon, 28 Nov 2016 15:23:30 +0100 Subject: [sysrepo-devel] rollback on error In-Reply-To: <0d6449a7e7f4434e99d5407b08f4c410@advaoptical.com> References: <0d6449a7e7f4434e99d5407b08f4c410@advaoptical.com> Message-ID: <25532044-1599-3741-f1a2-1676a4c2e2d6@cesnet.cz> Hi, your edit-config on candidate was successful, so the changes are part of your candidate. From your text I'm not sure why the commit failed, respectively what exactly means that the configuration is invalid. Was it because some restriction in YANG module was violated? Then please provide the module and data, because already the edit-config on candidate was supposed to fail. Otherwise (e.g. a validation callback on running returned the information that the data are invalid?), it is IMO a correct behavior - no changes are reflected in running (any partial changes performed before the error are rolled back) and the source of the configuration data (candidate datastore) is unchanged. Regards, Radek Dne 28.11.2016 v 15:10 Joan Landry napsal(a): > > I have done an edit-config on candidate ? followed by a commit to running. > > > > The commit fails as expected ? since I put an invalid configuration on purpose. > > > > Then I do a get on candidate and still see the original invalid config entry ? which I expected should no longer exist. > > > > I expected that the candidate data store should not contain the invalid entry. > > > > Do you know if rollback on error works or is it possibly something I am not doing correctly? > > thanks > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel From JoLandry at advaoptical.com Mon Nov 28 15:24:49 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Mon, 28 Nov 2016 15:24:49 +0000 Subject: [sysrepo-devel] how to modify capabilities Message-ID: Is there a way to modify the capabilities? For example I would like to be able to not support the "replace" option - but it is not clear how to remove that from a capabilities list. thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Mon Nov 28 15:37:16 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Mon, 28 Nov 2016 16:37:16 +0100 Subject: [sysrepo-devel] how to modify capabilities In-Reply-To: References: Message-ID: No, edit-config's "replace" is part of the basic NETCONF specification. Regards, Radek Dne 28.11.2016 v 16:24 Joan Landry napsal(a): > > Is there a way to modify the capabilities? > > > > For example I would like to be able to not support the ?replace? option ? but it is not clear how to remove that from a capabilities list. > > > > thanks > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel From JoLandry at advaoptical.com Mon Nov 28 18:28:03 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Mon, 28 Nov 2016 18:28:03 +0000 Subject: [sysrepo-devel] notifications Message-ID: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> Does anyone know the status of notification support availability? Also, is there any example code for sending a notification? -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Mon Nov 28 21:31:20 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Mon, 28 Nov 2016 21:31:20 +0000 Subject: [sysrepo-devel] rollback on error In-Reply-To: <25532044-1599-3741-f1a2-1676a4c2e2d6@cesnet.cz> References: <0d6449a7e7f4434e99d5407b08f4c410@advaoptical.com> <25532044-1599-3741-f1a2-1676a4c2e2d6@cesnet.cz> Message-ID: The yang was fine - so the failure was not upon the edit-config, but rather upon the commit. I guess what you are saying is that the rollback on error only pertains to the running data store and in this case the running did not get changed. I was trying to figure out how a user can delete the contents of the "candidate" data store without having to disconnect and reconnect the session. Do you know if there is a way to clear the candidate data store - once a user decided it is not what they want or has system level errors in it? -----Original Message----- From: Radek Krej?? [mailto:rkrejci at cesnet.cz] Sent: Monday, November 28, 2016 9:24 AM To: Joan Landry ; sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] rollback on error Hi, your edit-config on candidate was successful, so the changes are part of your candidate. From your text I'm not sure why the commit failed, respectively what exactly means that the configuration is invalid. Was it because some restriction in YANG module was violated? Then please provide the module and data, because already the edit-config on candidate was supposed to fail. Otherwise (e.g. a validation callback on running returned the information that the data are invalid?), it is IMO a correct behavior - no changes are reflected in running (any partial changes performed before the error are rolled back) and the source of the configuration data (candidate datastore) is unchanged. Regards, Radek Dne 28.11.2016 v 15:10 Joan Landry napsal(a): > > I have done an edit-config on candidate - followed by a commit to running. > > > > The commit fails as expected - since I put an invalid configuration on purpose. > > > > Then I do a get on candidate and still see the original invalid config entry - which I expected should no longer exist. > > > > I expected that the candidate data store should not contain the invalid entry. > > > > Do you know if rollback on error works or is it possibly something I am not doing correctly? > > thanks > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel From lmacko at cisco.com Tue Nov 29 07:51:39 2016 From: lmacko at cisco.com (Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco)) Date: Tue, 29 Nov 2016 07:51:39 +0000 Subject: [sysrepo-devel] notifications In-Reply-To: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> References: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> Message-ID: <075a44418c2d46c58c039fe886d4d019@XCH-ALN-015.cisco.com> Hi, notifications are already supported API can be found here https://github.com/sysrepo/sysrepo/blob/master/inc/sysrepo.h#L1441-L1542 an example of sending a notification is here https://github.com/sysrepo/sysrepo/blob/master/examples/rpc_example.c#L104-L109 Regards, Lukas From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Monday, November 28, 2016 7:28 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] notifications Does anyone know the status of notification support availability? Also, is there any example code for sending a notification? -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Tue Nov 29 08:39:05 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Tue, 29 Nov 2016 09:39:05 +0100 Subject: [sysrepo-devel] rollback on error In-Reply-To: References: <0d6449a7e7f4434e99d5407b08f4c410@advaoptical.com> <25532044-1599-3741-f1a2-1676a4c2e2d6@cesnet.cz> Message-ID: <5c716207-70ac-4dcb-944b-9df93f0f7dd1@cesnet.cz> No, rollback-on-error can occur only _during_ the edit-config on any datastore, from RFC 6241: If an error condition occurs ..., the server will stop processing the operation and restore the specified configuration to its complete state at the start of this operation. So you cannot expect rollback-on-error as a result of any other operation (e.g. commit) than edit-config. What you probably want to do with the candidate datastore is discard-changes, but that is a standalone operation that must be invoked by NETCONF client. Regards, Radek Dne 28.11.2016 v 22:31 Joan Landry napsal(a): > The yang was fine - so the failure was not upon the edit-config, but rather upon the commit. > > I guess what you are saying is that the rollback on error only pertains to the running data store and in this case the running did not get changed. > > I was trying to figure out how a user can delete the contents of the "candidate" data store without having to disconnect and reconnect the session. > > Do you know if there is a way to clear the candidate data store - once a user decided it is not what they want or has system level errors in it? > > > > -----Original Message----- > From: Radek Krej?? [mailto:rkrejci at cesnet.cz] > Sent: Monday, November 28, 2016 9:24 AM > To: Joan Landry ; sysrepo-devel at sysrepo.org > Subject: Re: [sysrepo-devel] rollback on error > > Hi, > > your edit-config on candidate was successful, so the changes are part of your candidate. From your text I'm not sure why the commit failed, respectively what exactly means that the configuration is invalid. Was it because some restriction in YANG module was violated? Then please provide the module and data, because already the edit-config on candidate was supposed to fail. Otherwise (e.g. a validation callback on running returned the information that the data are invalid?), it is IMO a correct behavior - no changes are reflected in running (any partial changes performed before the error are rolled back) and the source of the configuration data (candidate datastore) is unchanged. > > Regards, > Radek > > > Dne 28.11.2016 v 15:10 Joan Landry napsal(a): >> I have done an edit-config on candidate - followed by a commit to running. >> >> >> >> The commit fails as expected - since I put an invalid configuration on purpose. >> >> >> >> Then I do a get on candidate and still see the original invalid config entry - which I expected should no longer exist. >> >> >> >> I expected that the candidate data store should not contain the invalid entry. >> >> >> >> Do you know if rollback on error works or is it possibly something I am not doing correctly? >> >> thanks >> >> >> >> >> >> _______________________________________________ >> sysrepo-devel mailing list >> sysrepo-devel at sysrepo.org >> http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From rkrejci at cesnet.cz Tue Nov 29 08:51:47 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Tue, 29 Nov 2016 09:51:47 +0100 Subject: [sysrepo-devel] notifications In-Reply-To: <075a44418c2d46c58c039fe886d4d019@XCH-ALN-015.cisco.com> References: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> <075a44418c2d46c58c039fe886d4d019@XCH-ALN-015.cisco.com> Message-ID: just a note - they are supported in sysrepo, in Netopeer2 they are not yet fully supported. It shouldn't need much work (I already have some working base code), but because of the busy end of the year, I'm not sure when I'll be able to finish it. Regards, Radek Dne 29.11.2016 v 08:51 Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) napsal(a): > > Hi, > > notifications are already supported API can be found here https://github.com/sysrepo/sysrepo/blob/master/inc/sysrepo.h#L1441-L1542 > > an example of sending a notification is here > > https://github.com/sysrepo/sysrepo/blob/master/examples/rpc_example.c#L104-L109 > > > > Regards, > > Lukas > > > > > > *From:*sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] *On Behalf Of *Joan Landry > *Sent:* Monday, November 28, 2016 7:28 PM > *To:* sysrepo-devel at sysrepo.org > *Subject:* [sysrepo-devel] notifications > > > > Does anyone know the status of notification support availability? > > > > Also, is there any example code for sending a notification? > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From raszabo at cisco.com Tue Nov 29 09:08:05 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Tue, 29 Nov 2016 09:08:05 +0000 Subject: [sysrepo-devel] NETCONF user mapped to system user References: <7293-58384780-2d-6f329000@211854554> Message-ID: Hi, The crash has been fixed, Sysrepo now returns SR_ERR_INVAL_USER error for invalid (non-existing) users. Thanks, Rastislav -----Original Message----- From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) Sent: Friday, November 25, 2016 3:33 PM To: 'Michal Va?ko' ; sysrepo-devel at sysrepo.org Subject: RE: [sysrepo-devel] NETCONF user mapped to system user Hi, Please open an issue on github for the crash, if possible please also provide the backtrace - we will fix it. We can also return some nicer error (e.g. SR_ERR_UNKNOWN_USER or so) for this case. > So, what I mainly wanted to say is that sysrepod forces all NETCONF users to also be system users. Yes and no. If you used sr_session_start instead of sr_session_start_user, you would get no error, but all the operations would be authorized as for the user who is running the netopeer2-server (= in case of root, effectively no authorization, since everything will be permitted). > Are we all ok with this, it will not be ever changed (maybe the new NACM could avoid it)? I would vote for allowing only system users to access sysrepo, but yes, with NACM, this could be avoided and we could also support 'virtual' NETCONF users. Thanks, Rastislav -----Original Message----- From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Michal Va?ko Sent: Friday, November 25, 2016 3:16 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] NETCONF user mapped to system user Hi, first I will explain what I did. I am working on TLS authentication for netopeer2-server and today have managed to crash sysrepod. When authenticating using SSH, we require the username to be one also existing in the system. However, this is not true for TLS because all the personal information (certificate) is received from the client (unlike SSH when we need to get the user password from the system). Sysrepod printed the message [ERR] (sm_session_create:422) Cannot retrieve credentials of the effective user (default_ca): Invalid username? and crashed. We think the fix will be that netopeer2-server will check that the user exists (or sysrepod can return a nice error, it should not matter as both of them are on a single machine) and if not, the TLS connection will be terminated. Sadly, it is not possible to check the username existence when setting NETCONF TLS authentication options. So, what I mainly wanted to say is that sysrepod forces all NETCONF users to also be system users. Are we all ok with this, it will not be ever changed (maybe the new NACM could avoid it)? Regards, Michal _______________________________________________ sysrepo-devel mailing list sysrepo-devel at sysrepo.org http://lists.sysrepo.org/listinfo/sysrepo-devel From JoLandry at advaoptical.com Tue Nov 29 17:06:35 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Tue, 29 Nov 2016 17:06:35 +0000 Subject: [sysrepo-devel] issue with make install Message-ID: <1aab19c2c71743399ffef4fff327e26f@advaoptical.com> I just did a git pull on sysrepo master and I am seeing a make install error Any ideas? - Installing: /usr/local/include/sysrepo-cpp/Connection.h CMake Error at swig/lua51/cmake_install.cmake:36 (FILE): file INSTALL cannot find "/mnt/images/netopeer2/sysrepo/build/swig/lua51/libsysrepoLua51.so". Call Stack (most recent call first): swig/cmake_install.cmake:84 (INCLUDE) cmake_install.cmake:148 (INCLUDE) make: *** [install] Error 1 [root at Florida build]# -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Tue Nov 29 18:57:08 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Tue, 29 Nov 2016 18:57:08 +0000 Subject: [sysrepo-devel] make install of sysrepo gives error Message-ID: <3beb8508067747c1aab6e8d89f2f8861@advaoptical.com> I just updated to the latest master branch - started from a fresh install And I get this: -- Installing: /usr/include/sysrepo-cpp/Connection.h CMake Error at swig/lua51/cmake_install.cmake:36 (FILE): file INSTALL cannot find "/mnt/images/netopeer2/sysrepo/build/swig/lua51/libsysrepoLua51.so". Call Stack (most recent call first): swig/cmake_install.cmake:84 (INCLUDE) cmake_install.cmake:148 (INCLUDE) make: *** [install] Error 1 when I look in that directory there is no file libsysrepoLua51.so [root at Florida build]# cd /mnt/images/netopeer2/sysrepo/build/swig/lua51/ [root at Florida lua51]# ls CMakeFiles examples libSysrepo_Lua.so cmake_install.cmake liblibsysrepoLua51.so Makefile CTestTestfile.cmake libsysrepoLua51LUA_wrap.cxx I tried to copy libSysrepo_Lua.so to file libsysrepoLua51.so To complete the make install - but when I run sysrepo I get a lot of errors One of which is [root at Florida tmp]# sysrepoctl --uninstall --module=abc-interfaces-ip Uninstalling the module abc-interfaces-ip'... Segmentation fault Any ideas what I doing wrong?? Also when I copy -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Tue Nov 29 20:34:54 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Tue, 29 Nov 2016 20:34:54 +0000 Subject: [sysrepo-devel] sr_list_schema Message-ID: Is there a known issue with using sr_list_schema function? I upgraded to the master branch and prior to this the printing of the schema looked like this ======= iana-if-type ============ ======= ietf-interfaces ============ ======= ietf-ip ============ ======= ietf-inet-types ============ ======= ietf-yang-types ============ ======= ietf-netconf-monitoring ============ ======= ietf-netconf-acm ============ ======= ietf-netconf ============ ======= ietf-netconf-with-defaults ============ ======= iana-crypt-hash ============ ======= ietf-system ============ == I did not change the code to printout the schemas and now I get this: ======= iana-if-type ============ ======= hX\ufffd\ufffd\ufffd ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= /etc/sysrepo/yang/ietf-yang-types at 2013-07-15.yang ============ ======= 2016-09-21 ============ ======= (null) ============ ======= ncwd ============ ======= urn:ietf:params:xml:ns:netconf:base:1.0 ============ code: rc = sr_list_schemas(session, &schemas, &cnt); if (SR_ERR_OK != rc) { fprintf(stderr, "failed to retrieve schemas: %s\n", sr_strerror(rc)); } else { size_t idx; for (idx=0; idx < cnt; idx++) { printf("======= %s ============\n",schemas[idx].module_name); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Tue Nov 29 23:20:38 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Tue, 29 Nov 2016 23:20:38 +0000 Subject: [sysrepo-devel] does replace work Message-ID: <014b70d7e25d493abf1aeed07283cd3d@advaoptical.com> I am able to see that the replace option works if I place the operation at the leaf level but if I place the replace on the list and change a value of a leaf the value does not change when I do a get Is it possibly a bug in sysrepo? I sent the following rpc changing from 3m to 2m But when I do a get on the candidate after the replace edit-config I do not see the change. Should I open up a bug report on this? I am using Master branch. Netopeer window: [2016/11/29 18:15:38.815031, 3] ssh_packet_socket_callback: packet: read type 94 [len=892,padding=18,comp=873,payload=873] [2016/11/29 18:15:38.816148, 3] ssh_packet_process: Dispatching handler for packet type 94 [2016/11/29 18:15:38.816187, 3] channel_rcv_data: Channel receiving 864 bytes data in 0 (local win=1258510 remote win=39558034) [2016/11/29 18:15:38.816211, 3] channel_default_bufferize: placing 864 bytes into channel buffer (stderr=0) [2016/11/29 18:15:38.816235, 3] channel_rcv_data: Channel windows are now (local win=1257646 remote win=39558034) [2016/11/29 18:15:38.816269, 3] ssh_channel_read_timeout: Read (1) buffered : 864 bytes. Window: 1257646 [2016/11/29 18:15:38.816295, 3] ssh_channel_read_timeout: Read (1) buffered : 863 bytes. Window: 1257646 [2016/11/29 18:15:38.816320, 3] ssh_channel_read_timeout: Read (1) buffered : 862 bytes. Window: 1257646 [2016/11/29 18:15:38.816344, 3] ssh_channel_read_timeout: Read (1) buffered : 861 bytes. Window: 1257646 [2016/11/29 18:15:38.816368, 3] ssh_channel_read_timeout: Read (1) buffered : 860 bytes. Window: 1257646 [2016/11/29 18:15:38.816392, 3] ssh_channel_read_timeout: Read (1) buffered : 859 bytes. Window: 1257646 [2016/11/29 18:15:38.816418, 3] ssh_channel_read_timeout: Read (854) buffered : 858 bytes. Window: 1257646 [2016/11/29 18:15:38.816689, 3] ssh_channel_read_timeout: Read (1) buffered : 4 bytes. Window: 1257646 [2016/11/29 18:15:38.816716, 3] ssh_channel_read_timeout: Read (1) buffered : 3 bytes. Window: 1257646 [2016/11/29 18:15:38.816747, 3] ssh_channel_read_timeout: Read (1) buffered : 2 bytes. Window: 1257646 [2016/11/29 18:15:38.816772, 3] ssh_channel_read_timeout: Read (1) buffered : 1 bytes. Window: 1257646 netopeer2-server[5062]: Session 1: received message: mmm 2m 16384 0 16384 true true netopeer2-server[5062]: DICT: inserting "rpc" with collision netopeer2-server[5062]: DICT: inserting "message-id" with collision netopeer2-server[5062]: DICT: inserting "49" with collision netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting (refcount) "target" netopeer2-server[5062]: DICT: inserting (refcount) "candidate" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "config" netopeer2-server[5062]: DICT: inserting (refcount) "ensemble-config" netopeer2-server[5062]: DICT: inserting (refcount) "ensemblecfg" netopeer2-server[5062]: DICT: inserting (refcount) "http://www.advaoptical.com/ns/adva-ensemble-config" netopeer2-server[5062]: DICT: inserting (refcount) "rate-profiles" netopeer2-server[5062]: DICT: inserting (refcount) "http://www.advaoptical.com/ns/adva-ensemble-rate-profile" netopeer2-server[5062]: DICT: inserting (refcount) "rate-profile" netopeer2-server[5062]: DICT: inserting (refcount) "nc" netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting "operation" with collision netopeer2-server[5062]: DICT: inserting (refcount) "replace" netopeer2-server[5062]: DICT: inserting (refcount) "name" netopeer2-server[5062]: DICT: inserting "mmm" with collision netopeer2-server[5062]: DICT: inserting (refcount) "cir" netopeer2-server[5062]: DICT: inserting "2m" with collision netopeer2-server[5062]: DICT: inserting (refcount) "cbs" netopeer2-server[5062]: DICT: inserting "16384" with collision netopeer2-server[5062]: DICT: inserting (refcount) "eir" netopeer2-server[5062]: DICT: inserting (refcount) "0" netopeer2-server[5062]: DICT: inserting (refcount) "ebs" netopeer2-server[5062]: DICT: inserting (refcount) "16384" netopeer2-server[5062]: DICT: inserting (refcount) "color-enabled" netopeer2-server[5062]: DICT: inserting (refcount) "true" netopeer2-server[5062]: DICT: inserting (refcount) "coupling-enabled" netopeer2-server[5062]: DICT: inserting (refcount) "true" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "merge" netopeer2-server[5062]: DICT: inserting (refcount) "test-then-set" netopeer2-server[5062]: DICT: inserting (refcount) "stop-on-error" netopeer2-server[5062]: Resolving unresolved data nodes and their constraints... netopeer2-server[5062]: All data nodes and constraints resolved. netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/target/*": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "target" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "*" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "target" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[32] netopeer2-server[5062]: DICT: inserting (refcount) "*" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[33] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/default-operation": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "default-operation" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "default-operation" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/test-option": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "test-option" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "test-option" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/error-option": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "error-option" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "error-option" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/config": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "config" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: EDIT_CONFIG: ds 8811280, defop 1, testopt 0, config: mmm 2m 16384 0 16384 true true netopeer2-server[5062]: EDIT_CONFIG: list /adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm'], operation 3 netopeer2-server[5062]: (cl_request_process:420) Sending set-item request. netopeer2-server[5062]: (cl_request_process:442) set-item request sent, waiting for response. netopeer2-server[5062]: (cl_request_process:464) set-item response received, processing. netopeer2-server[5062]: EDIT_CONFIG: success (/adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm']). netopeer2-server[5062]: (cl_request_process:420) Sending validate request. netopeer2-server[5062]: (cl_request_process:442) validate request sent, waiting for response. netopeer2-server[5062]: (cl_request_process:464) validate response received, processing. netopeer2-server[5062]: EDIT_CONFIG: done. netopeer2-server[5062]: Session 1: sending message: #92 [2016/11/29 18:15:38.841193, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2016/11/29 18:15:38.841347, 3] packet_send2: packet: wrote [len=28,padding=13,comp=14,payload=14] [2016/11/29 18:15:38.841537, 3] channel_write_common: channel_write wrote 5 bytes netopeer2-server[5062]: Session 1: sending message: [2016/11/29 18:15:38.841890, 3] packet_send2: packet: wrote [len=108,padding=6,comp=101,payload=101] [2016/11/29 18:15:38.842158, 3] channel_write_common: channel_write wrote 92 bytes [2016/11/29 18:15:38.842372, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket netopeer2-server[5062]: Session 1: sending message: ## [2016/11/29 18:15:38.842749, 3] packet_send2: packet: wrote [len=28,padding=14,comp=13,payload=13] [2016/11/29 18:15:38.843024, 3] channel_write_common: channel_write wrote 4 bytes [2016/11/29 18:15:38.843177, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket Sysrepo window [DBG] (cm_conn_read_cb:1060) fd 6 readable [DBG] (cm_conn_read_cb:1073) 137 bytes of data received on fd 6 [DBG] (cm_conn_read_cb:1083) fd 6 would block [DBG] (cm_conn_in_buff_process:1013) New message of size 133 bytes received. [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=4, current count=1. [DBG] (rp_msg_process:3146) Threads: active=0/4, 1 requests in queue [DBG] (rp_worker_thread_execute:2874) Thread id=140737299695360 signaled. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=5, count=0. [DBG] (rp_set_item_req_process:907) Processing set_item request. [INF] (rp_dt_set_item_wrapper:559) Set item request candidate datastore, xpath: /adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm'] [DBG] (dm_get_data_info:1744) Module adva-ensemble-config already loaded [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=4, current count=1. [DBG] (rp_worker_thread_execute:2862) Thread id=140737299695360 will wait. [DBG] (cm_msg_enqueue_cb:1668) New message enqueued into CM message queue. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=5, count=0. [DBG] (cm_conn_out_buff_flush:505) Sending 27 bytes of data. [DBG] (cm_conn_out_buff_flush:511) 27 bytes of data sent. [DBG] (cm_conn_read_cb:1060) fd 6 readable [DBG] (cm_conn_read_cb:1073) 28 bytes of data received on fd 6 [DBG] (cm_conn_read_cb:1083) fd 6 would block [DBG] (cm_conn_in_buff_process:1013) New message of size 24 bytes received. [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=5, current count=1. [DBG] (rp_msg_process:3146) Threads: active=0/4, 1 requests in queue [DBG] (rp_worker_thread_execute:2874) Thread id=140737316480768 signaled. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=6, count=0. [DBG] (rp_validate_req_process:1061) Processing validate request. [DBG] (dm_validate_session_data_trees:2175) Validation succeeded for 'adva-ensemble-config' module [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=5, current count=1. [DBG] (rp_worker_thread_execute:2862) Thread id=140737316480768 will wait. [DBG] (cm_msg_enqueue_cb:1668) New message enqueued into CM message queue. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=6, count=0. [DBG] (cm_conn_out_buff_flush:505) Sending 30 bytes of data. [DBG] (cm_conn_out_buff_flush:511) 30 bytes of data sent. -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Wed Nov 30 02:28:12 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Wed, 30 Nov 2016 02:28:12 +0000 Subject: [sysrepo-devel] notifications In-Reply-To: References: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> <075a44418c2d46c58c039fe886d4d019@XCH-ALN-015.cisco.com> Message-ID: <6fc504588452498e9e176793975cb7cf@advaoptical.com> Is there a way to turn on this capability, for testing purposes. I am trying to test sending a notification but I think MgSoft browser does not allow you to register for a notification unless the capability is announced. Else is there another way to test this? Thanks -----Original Message----- From: Radek Krej?? [mailto:rkrejci at cesnet.cz] Sent: Tuesday, November 29, 2016 3:52 AM To: Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) ; Joan Landry ; sysrepo-devel at sysrepo.org Subject: Re: [sysrepo-devel] notifications just a note - they are supported in sysrepo, in Netopeer2 they are not yet fully supported. It shouldn't need much work (I already have some working base code), but because of the busy end of the year, I'm not sure when I'll be able to finish it. Regards, Radek Dne 29.11.2016 v 08:51 Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) napsal(a): > > Hi, > > notifications are already supported API can be found here https://github.com/sysrepo/sysrepo/blob/master/inc/sysrepo.h#L1441-L1542 > > an example of sending a notification is here > > https://github.com/sysrepo/sysrepo/blob/master/examples/rpc_example.c#L104-L109 > > > > Regards, > > Lukas > > > > > > *From:*sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] *On Behalf Of *Joan Landry > *Sent:* Monday, November 28, 2016 7:28 PM > *To:* sysrepo-devel at sysrepo.org > *Subject:* [sysrepo-devel] notifications > > > > Does anyone know the status of notification support availability? > > > > Also, is there any example code for sending a notification? > > > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From raszabo at cisco.com Wed Nov 30 07:41:28 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Wed, 30 Nov 2016 07:41:28 +0000 Subject: [sysrepo-devel] issue with make install In-Reply-To: <1aab19c2c71743399ffef4fff327e26f@advaoptical.com> References: <1aab19c2c71743399ffef4fff327e26f@advaoptical.com> Message-ID: <4a8f57a33b1b4462b9a8845bb0c8c2f0@XCH-RCD-002.cisco.com> Mislav, can you please check this? I guess that Joan is getting the error because they don't have Lua installed. Thanks From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Tuesday, November 29, 2016 6:07 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] issue with make install I just did a git pull on sysrepo master and I am seeing a make install error Any ideas? - Installing: /usr/local/include/sysrepo-cpp/Connection.h CMake Error at swig/lua51/cmake_install.cmake:36 (FILE): file INSTALL cannot find "/mnt/images/netopeer2/sysrepo/build/swig/lua51/libsysrepoLua51.so". Call Stack (most recent call first): swig/cmake_install.cmake:84 (INCLUDE) cmake_install.cmake:148 (INCLUDE) make: *** [install] Error 1 [root at Florida build]# -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Wed Nov 30 07:55:40 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Wed, 30 Nov 2016 07:55:40 +0000 Subject: [sysrepo-devel] does replace work In-Reply-To: <014b70d7e25d493abf1aeed07283cd3d@advaoptical.com> References: <014b70d7e25d493abf1aeed07283cd3d@advaoptical.com> Message-ID: <12ee000d8b3e460486e642bfe7dc70f4@XCH-RCD-002.cisco.com> Hi, It seems to be this issue in Netopeer2 - already reported: https://github.com/CESNET/Netopeer2/issues/49 Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Wednesday, November 30, 2016 12:21 AM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] does replace work I am able to see that the replace option works if I place the operation at the leaf level but if I place the replace on the list and change a value of a leaf the value does not change when I do a get Is it possibly a bug in sysrepo? I sent the following rpc changing from 3m to 2m But when I do a get on the candidate after the replace edit-config I do not see the change. Should I open up a bug report on this? I am using Master branch. Netopeer window: [2016/11/29 18:15:38.815031, 3] ssh_packet_socket_callback: packet: read type 94 [len=892,padding=18,comp=873,payload=873] [2016/11/29 18:15:38.816148, 3] ssh_packet_process: Dispatching handler for packet type 94 [2016/11/29 18:15:38.816187, 3] channel_rcv_data: Channel receiving 864 bytes data in 0 (local win=1258510 remote win=39558034) [2016/11/29 18:15:38.816211, 3] channel_default_bufferize: placing 864 bytes into channel buffer (stderr=0) [2016/11/29 18:15:38.816235, 3] channel_rcv_data: Channel windows are now (local win=1257646 remote win=39558034) [2016/11/29 18:15:38.816269, 3] ssh_channel_read_timeout: Read (1) buffered : 864 bytes. Window: 1257646 [2016/11/29 18:15:38.816295, 3] ssh_channel_read_timeout: Read (1) buffered : 863 bytes. Window: 1257646 [2016/11/29 18:15:38.816320, 3] ssh_channel_read_timeout: Read (1) buffered : 862 bytes. Window: 1257646 [2016/11/29 18:15:38.816344, 3] ssh_channel_read_timeout: Read (1) buffered : 861 bytes. Window: 1257646 [2016/11/29 18:15:38.816368, 3] ssh_channel_read_timeout: Read (1) buffered : 860 bytes. Window: 1257646 [2016/11/29 18:15:38.816392, 3] ssh_channel_read_timeout: Read (1) buffered : 859 bytes. Window: 1257646 [2016/11/29 18:15:38.816418, 3] ssh_channel_read_timeout: Read (854) buffered : 858 bytes. Window: 1257646 [2016/11/29 18:15:38.816689, 3] ssh_channel_read_timeout: Read (1) buffered : 4 bytes. Window: 1257646 [2016/11/29 18:15:38.816716, 3] ssh_channel_read_timeout: Read (1) buffered : 3 bytes. Window: 1257646 [2016/11/29 18:15:38.816747, 3] ssh_channel_read_timeout: Read (1) buffered : 2 bytes. Window: 1257646 [2016/11/29 18:15:38.816772, 3] ssh_channel_read_timeout: Read (1) buffered : 1 bytes. Window: 1257646 netopeer2-server[5062]: Session 1: received message: mmm 2m 16384 0 16384 true true netopeer2-server[5062]: DICT: inserting "rpc" with collision netopeer2-server[5062]: DICT: inserting "message-id" with collision netopeer2-server[5062]: DICT: inserting "49" with collision netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting (refcount) "target" netopeer2-server[5062]: DICT: inserting (refcount) "candidate" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "config" netopeer2-server[5062]: DICT: inserting (refcount) "ensemble-config" netopeer2-server[5062]: DICT: inserting (refcount) "ensemblecfg" netopeer2-server[5062]: DICT: inserting (refcount) "http://www.advaoptical.com/ns/adva-ensemble-config" netopeer2-server[5062]: DICT: inserting (refcount) "rate-profiles" netopeer2-server[5062]: DICT: inserting (refcount) "http://www.advaoptical.com/ns/adva-ensemble-rate-profile" netopeer2-server[5062]: DICT: inserting (refcount) "rate-profile" netopeer2-server[5062]: DICT: inserting (refcount) "nc" netopeer2-server[5062]: DICT: inserting (refcount) "urn:ietf:params:xml:ns:netconf:base:1.0" netopeer2-server[5062]: DICT: inserting "operation" with collision netopeer2-server[5062]: DICT: inserting (refcount) "replace" netopeer2-server[5062]: DICT: inserting (refcount) "name" netopeer2-server[5062]: DICT: inserting "mmm" with collision netopeer2-server[5062]: DICT: inserting (refcount) "cir" netopeer2-server[5062]: DICT: inserting "2m" with collision netopeer2-server[5062]: DICT: inserting (refcount) "cbs" netopeer2-server[5062]: DICT: inserting "16384" with collision netopeer2-server[5062]: DICT: inserting (refcount) "eir" netopeer2-server[5062]: DICT: inserting (refcount) "0" netopeer2-server[5062]: DICT: inserting (refcount) "ebs" netopeer2-server[5062]: DICT: inserting (refcount) "16384" netopeer2-server[5062]: DICT: inserting (refcount) "color-enabled" netopeer2-server[5062]: DICT: inserting (refcount) "true" netopeer2-server[5062]: DICT: inserting (refcount) "coupling-enabled" netopeer2-server[5062]: DICT: inserting (refcount) "true" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "" netopeer2-server[5062]: DICT: inserting (refcount) "merge" netopeer2-server[5062]: DICT: inserting (refcount) "test-then-set" netopeer2-server[5062]: DICT: inserting (refcount) "stop-on-error" netopeer2-server[5062]: Resolving unresolved data nodes and their constraints... netopeer2-server[5062]: All data nodes and constraints resolved. netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/target/*": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "target" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "*" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "target" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[32] netopeer2-server[5062]: DICT: inserting (refcount) "*" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[33] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/default-operation": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "default-operation" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "default-operation" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/test-option": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "test-option" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "test-option" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/error-option": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "error-option" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "error-option" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: XPATH: expression "/ietf-netconf:edit-config/config": netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "ietf-netconf:edit-config" netopeer2-server[5062]: XPATH: Token Operator(Path), in expression "/" netopeer2-server[5062]: XPATH: Token NameTest, in expression "config" netopeer2-server[5062]: XPATH: eval_absolute_location_path parsed Operator(Path)[0] netopeer2-server[5062]: DICT: inserting (refcount) "edit-config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[1] netopeer2-server[5062]: XPATH: eval_relative_location_path parsed Operator(Path)[25] netopeer2-server[5062]: DICT: inserting (refcount) "config" netopeer2-server[5062]: XPATH: eval_node_test parsed NameTest[26] netopeer2-server[5062]: EDIT_CONFIG: ds 8811280, defop 1, testopt 0, config: mmm 2m 16384 0 16384 true true netopeer2-server[5062]: EDIT_CONFIG: list /adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm'], operation 3 netopeer2-server[5062]: (cl_request_process:420) Sending set-item request. netopeer2-server[5062]: (cl_request_process:442) set-item request sent, waiting for response. netopeer2-server[5062]: (cl_request_process:464) set-item response received, processing. netopeer2-server[5062]: EDIT_CONFIG: success (/adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm']). netopeer2-server[5062]: (cl_request_process:420) Sending validate request. netopeer2-server[5062]: (cl_request_process:442) validate request sent, waiting for response. netopeer2-server[5062]: (cl_request_process:464) validate response received, processing. netopeer2-server[5062]: EDIT_CONFIG: done. netopeer2-server[5062]: Session 1: sending message: #92 [2016/11/29 18:15:38.841193, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket [2016/11/29 18:15:38.841347, 3] packet_send2: packet: wrote [len=28,padding=13,comp=14,payload=14] [2016/11/29 18:15:38.841537, 3] channel_write_common: channel_write wrote 5 bytes netopeer2-server[5062]: Session 1: sending message: [2016/11/29 18:15:38.841890, 3] packet_send2: packet: wrote [len=108,padding=6,comp=101,payload=101] [2016/11/29 18:15:38.842158, 3] channel_write_common: channel_write wrote 92 bytes [2016/11/29 18:15:38.842372, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket netopeer2-server[5062]: Session 1: sending message: ## [2016/11/29 18:15:38.842749, 3] packet_send2: packet: wrote [len=28,padding=14,comp=13,payload=13] [2016/11/29 18:15:38.843024, 3] channel_write_common: channel_write wrote 4 bytes [2016/11/29 18:15:38.843177, 3] ssh_socket_unbuffered_write: Enabling POLLOUT for socket Sysrepo window [DBG] (cm_conn_read_cb:1060) fd 6 readable [DBG] (cm_conn_read_cb:1073) 137 bytes of data received on fd 6 [DBG] (cm_conn_read_cb:1083) fd 6 would block [DBG] (cm_conn_in_buff_process:1013) New message of size 133 bytes received. [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=4, current count=1. [DBG] (rp_msg_process:3146) Threads: active=0/4, 1 requests in queue [DBG] (rp_worker_thread_execute:2874) Thread id=140737299695360 signaled. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=5, count=0. [DBG] (rp_set_item_req_process:907) Processing set_item request. [INF] (rp_dt_set_item_wrapper:559) Set item request candidate datastore, xpath: /adva-ensemble-config:ensemble-config/adva-ensemble-rate-profile:rate-profiles/rate-profile[name='mmm'] [DBG] (dm_get_data_info:1744) Module adva-ensemble-config already loaded [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=4, current count=1. [DBG] (rp_worker_thread_execute:2862) Thread id=140737299695360 will wait. [DBG] (cm_msg_enqueue_cb:1668) New message enqueued into CM message queue. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=5, count=0. [DBG] (cm_conn_out_buff_flush:505) Sending 27 bytes of data. [DBG] (cm_conn_out_buff_flush:511) 27 bytes of data sent. [DBG] (cm_conn_read_cb:1060) fd 6 readable [DBG] (cm_conn_read_cb:1073) 28 bytes of data received on fd 6 [DBG] (cm_conn_read_cb:1083) fd 6 would block [DBG] (cm_conn_in_buff_process:1013) New message of size 24 bytes received. [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=5, current count=1. [DBG] (rp_msg_process:3146) Threads: active=0/4, 1 requests in queue [DBG] (rp_worker_thread_execute:2874) Thread id=140737316480768 signaled. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=6, count=0. [DBG] (rp_validate_req_process:1061) Processing validate request. [DBG] (dm_validate_session_data_trees:2175) Validation succeeded for 'adva-ensemble-config' module [DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=5, current count=1. [DBG] (rp_worker_thread_execute:2862) Thread id=140737316480768 will wait. [DBG] (cm_msg_enqueue_cb:1668) New message enqueued into CM message queue. [DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=6, count=0. [DBG] (cm_conn_out_buff_flush:505) Sending 30 bytes of data. [DBG] (cm_conn_out_buff_flush:511) 30 bytes of data sent. -------------- next part -------------- An HTML attachment was scrubbed... URL: From raszabo at cisco.com Wed Nov 30 08:10:47 2016 From: raszabo at cisco.com (Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco)) Date: Wed, 30 Nov 2016 08:10:47 +0000 Subject: [sysrepo-devel] sr_list_schema In-Reply-To: References: Message-ID: <3d7ed6afb6de404d9f4400757ae8aa22@XCH-RCD-002.cisco.com> Hi, It should work, we test list schemas with this unit-test which prints a similar list correctly: https://github.com/sysrepo/sysrepo/blob/master/tests/cl_test.c#L282-L332 Can you please check whether this test works for you? I guess you will most likely have something wrong with your setup - maybe you are actually using older version of sysrepo libraries - look at this comment: https://github.com/sysrepo/sysrepo/pull/516 Thanks, Rastislav From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Tuesday, November 29, 2016 9:35 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] sr_list_schema Is there a known issue with using sr_list_schema function? I upgraded to the master branch and prior to this the printing of the schema looked like this ======= iana-if-type ============ ======= ietf-interfaces ============ ======= ietf-ip ============ ======= ietf-inet-types ============ ======= ietf-yang-types ============ ======= ietf-netconf-monitoring ============ ======= ietf-netconf-acm ============ ======= ietf-netconf ============ ======= ietf-netconf-with-defaults ============ ======= iana-crypt-hash ============ ======= ietf-system ============ == I did not change the code to printout the schemas and now I get this: ======= iana-if-type ============ ======= hX\ufffd\ufffd\ufffd ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= (null) ============ ======= /etc/sysrepo/yang/ietf-yang-types at 2013-07-15.yang ============ ======= 2016-09-21 ============ ======= (null) ============ ======= ncwd ============ ======= urn:ietf:params:xml:ns:netconf:base:1.0 ============ code: rc = sr_list_schemas(session, &schemas, &cnt); if (SR_ERR_OK != rc) { fprintf(stderr, "failed to retrieve schemas: %s\n", sr_strerror(rc)); } else { size_t idx; for (idx=0; idx < cnt; idx++) { printf("======= %s ============\n",schemas[idx].module_name); } -------------- next part -------------- An HTML attachment was scrubbed... URL: From rkrejci at cesnet.cz Wed Nov 30 09:13:47 2016 From: rkrejci at cesnet.cz (=?UTF-8?B?UmFkZWsgS3JlasSNw60=?=) Date: Wed, 30 Nov 2016 10:13:47 +0100 Subject: [sysrepo-devel] notifications In-Reply-To: <6fc504588452498e9e176793975cb7cf@advaoptical.com> References: <9efbb697c0034dc6940e7e71758daa09@advaoptical.com> <075a44418c2d46c58c039fe886d4d019@XCH-ALN-015.cisco.com> <6fc504588452498e9e176793975cb7cf@advaoptical.com> Message-ID: <8e0087e9-6b51-4ee9-4a8e-5e8651fe1873@cesnet.cz> Hi, it is not yet possible. Radek Dne 30.11.2016 v 03:28 Joan Landry napsal(a): > Is there a way to turn on this capability, for testing purposes. I am trying to test sending a notification but I think MgSoft browser does not allow you to register for a notification unless the capability is announced. > > Else is there another way to test this? > > Thanks > > -----Original Message----- > From: Radek Krej?? [mailto:rkrejci at cesnet.cz] > Sent: Tuesday, November 29, 2016 3:52 AM > To: Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) ; Joan Landry ; sysrepo-devel at sysrepo.org > Subject: Re: [sysrepo-devel] notifications > > just a note - they are supported in sysrepo, in Netopeer2 they are not yet fully supported. It shouldn't need much work (I already have some working base code), but because of the busy end of the year, I'm not sure when I'll be able to finish it. > > Regards, > Radek > > > Dne 29.11.2016 v 08:51 Lukas Macko -X (lmacko - PANTHEON TECHNOLOGIES at Cisco) napsal(a): >> Hi, >> >> notifications are already supported API can be found here https://github.com/sysrepo/sysrepo/blob/master/inc/sysrepo.h#L1441-L1542 >> >> an example of sending a notification is here >> >> https://github.com/sysrepo/sysrepo/blob/master/examples/rpc_example.c#L104-L109 >> >> >> >> Regards, >> >> Lukas >> >> >> >> >> >> *From:*sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] *On Behalf Of *Joan Landry >> *Sent:* Monday, November 28, 2016 7:28 PM >> *To:* sysrepo-devel at sysrepo.org >> *Subject:* [sysrepo-devel] notifications >> >> >> >> Does anyone know the status of notification support availability? >> >> >> >> Also, is there any example code for sending a notification? >> >> >> >> >> >> _______________________________________________ >> sysrepo-devel mailing list >> sysrepo-devel at sysrepo.org >> http://lists.sysrepo.org/listinfo/sysrepo-devel -- Radek Krejci mobile : +420 732 212 714 office : +420 234 680 256 e-mail : rkrejci at cesnet.cz LinkedIn: http://www.linkedin.com/in/radekkrejci CESNET, Association of Legal Entities Zikova 4 160 00 Praha 6 Czech Republic From f.antonini at tiesse.com Wed Nov 30 10:36:55 2016 From: f.antonini at tiesse.com (fabio antonini) Date: Wed, 30 Nov 2016 11:36:55 +0100 Subject: [sysrepo-devel] sr_list_schema In-Reply-To: References: Message-ID: Hi Joan I have experienced the same problem, but I have fixed the problem removing all the configuration/compilation products in my sysrepo/build directory hope this can help fabio On 29/11/2016 21:34, Joan Landry wrote: > > Is there a known issue with using sr_list_schema function? > > I upgraded to the master branch and prior to this the printing of the > schema looked like this > > ======= iana-if-type ============ > > ======= ietf-interfaces ============ > > ======= ietf-ip ============ > > ======= ietf-inet-types ============ > > ======= ietf-yang-types ============ > > ======= ietf-netconf-monitoring ============ > > ======= ietf-netconf-acm ============ > > ======= ietf-netconf ============ > > ======= ietf-netconf-with-defaults ============ > > ======= iana-crypt-hash ============ > > ======= ietf-system ============ > > == > > I did not change the code to printout the schemas and now I get this: > > ======= iana-if-type ============ > > ======= hX\ufffd\ufffd\ufffd ============ > > ======= (null) ============ > > ======= (null) ============ > > ======= (null) ============ > > ======= (null) ============ > > ======= (null) ============ > > ======= /etc/sysrepo/yang/ietf-yang-types at 2013-07-15.yang ============ > > ======= 2016-09-21 ============ > > ======= (null) ============ > > ======= ncwd ============ > > ======= urn:ietf:params:xml:ns:netconf:base:1.0 ============ > > code: > > rc = sr_list_schemas(session, &schemas, &cnt); > > if (SR_ERR_OK != rc) { > > fprintf(stderr, "failed to retrieve schemas: %s\n", > sr_strerror(rc)); > > } > > else > > { > > size_t idx; > > for (idx=0; idx < cnt; idx++) > > { > > printf("======= %s ============\n",schemas[idx].module_name); > > } > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel -- Fabio Antonini (Ph.D) Tiesse Spa Via Corradini 80, 67051 Avezzano (Aq) mobile: +39 3939261941 phone: +39 0863455830 fax: +39 0863455830 f.antonini at tiesse.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Wed Nov 30 12:30:37 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Wed, 30 Nov 2016 12:30:37 +0000 Subject: [sysrepo-devel] issue with make install In-Reply-To: <4a8f57a33b1b4462b9a8845bb0c8c2f0@XCH-RCD-002.cisco.com> References: <1aab19c2c71743399ffef4fff327e26f@advaoptical.com> <4a8f57a33b1b4462b9a8845bb0c8c2f0@XCH-RCD-002.cisco.com> Message-ID: <37fe4170919845f39477338df1548734@advaoptical.com> I just updated to the latest master branch - started from a fresh install -- Installing: /usr/include/sysrepo-cpp/Connection.h CMake Error at swig/lua51/cmake_install.cmake:36 (FILE): file INSTALL cannot find "/mnt/images/netopeer2/sysrepo/build/swig/lua51/libsysrepoLua51.so". when I look in that directory there is no file libsysrepoLua51.so - but there are these files - which have a different name. [root at Fl build]# cd /mnt/images/netopeer2/sysrepo/build/swig/lua51/ [root at Fl lua51]# ls CMakeFiles examples libSysrepo_Lua.so cmake_install.cmake liblibsysrepoLua51.so Makefile CTestTestfile.cmake libsysrepoLua51LUA_wrap.cxx Is building libsysrepoLua51.so a separate task - or build process? I do not see reference to it in the INSTALL.md file? From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com] Sent: Wednesday, November 30, 2016 2:41 AM To: Joan Landry ; sysrepo-devel at sysrepo.org Cc: mislav.novakovic at sartura.hr Subject: RE: issue with make install Mislav, can you please check this? I guess that Joan is getting the error because they don't have Lua installed. Thanks From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry Sent: Tuesday, November 29, 2016 6:07 PM To: sysrepo-devel at sysrepo.org Subject: [sysrepo-devel] issue with make install I just did a git pull on sysrepo master and I am seeing a make install error Any ideas? - Installing: /usr/local/include/sysrepo-cpp/Connection.h CMake Error at swig/lua51/cmake_install.cmake:36 (FILE): file INSTALL cannot find "/mnt/images/netopeer2/sysrepo/build/swig/lua51/libsysrepoLua51.so". Call Stack (most recent call first): swig/cmake_install.cmake:84 (INCLUDE) cmake_install.cmake:148 (INCLUDE) make: *** [install] Error 1 [root at Florida build]# -------------- next part -------------- An HTML attachment was scrubbed... URL: From JoLandry at advaoptical.com Wed Nov 30 16:24:03 2016 From: JoLandry at advaoptical.com (Joan Landry) Date: Wed, 30 Nov 2016 16:24:03 +0000 Subject: [sysrepo-devel] bad version of ietf-netconf-acm Message-ID: I have found that there is a good version of ietf-netconf-acm.yang and a bad version of the same file. Both have the same rev dates. revision "2012-02-22" For some reason when I download the models from the device I always get the bad version of this file on my mib browser which causes schema issues. I have ensured that I installed the correct version in sysrepo via sysrepoctl install I also ensured that the bad file does not exist in /etc/sysrepo/yang Yet when I get the model from the device I get the bad file. Any ideas if this is a bug in sysrepo - or how I can fix it? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: