From mvasko at cesnet.cz Wed Jan 10 10:00:01 2018 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Wed, 10 Jan 2018 11:00:01 +0100 Subject: [sysrepo-devel] netopeer2-cli scripting Message-ID: <4bbd-5a55e400-17-7e353d00@231305081> Hi, if anyone would have a use-case for some scripts for netopeer2-cli (for it to run in a non-interactive mode), it is possible. The only problem is with authentication. In scripts, you cannot use SSH 'password' or 'interactive' authentication, only 'publickey'. If using TLS, you should have no problems. Details on how to configure publickey or TLS authentication can be found in /netopeer2/server/configuration. In the attachment I have included a simple get-config script, which worked fine for me having netopeer2-server running locally and using my private key for authentication. Regards, Michal -------------- next part -------------- A non-text attachment was scrubbed... Name: get-config.sh Type: application/x-shellscript Size: 112 bytes Desc: not available URL: From rajneeshkumar270497 at gmail.com Fri Jan 12 12:37:23 2018 From: rajneeshkumar270497 at gmail.com (RAJNEESH KUMAR) Date: Fri, 12 Jan 2018 18:07:23 +0530 Subject: [sysrepo-devel] Error while initializing dnsmasq YANG model in sysrepo Message-ID: Sir While running the example of 'How sysrepo & Netopeer 2 can be used to make an existing Linux application remotely manageable via NETCONF' (DNSMASQ demo ) where you have integrated it into dnsmasq DNS forwarder and DHCP server for Linux; on my Ubuntu virtual machine, I run into a roadblock. I have followed all installation instructions as given on the README on github (GITHUB-repo ). On the same page when I run the step 3 of the section 'Installation': sysrepoctl --init --module=sysrepo-dnsmasq I get the following error: sysrepoctl: unrecognized option '--init' sysrepoctl: option `-' is invalid. Exiting. What is the troubleshooting I can perform ? Any help ?would be grateful. Regards Rajanish -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot from 2018-01-12 18-04-52.png Type: image/png Size: 70865 bytes Desc: not available URL: From urajanis at palcnetworks.com Mon Jan 22 11:54:39 2018 From: urajanis at palcnetworks.com (Rajanishkumar Upadhyay) Date: Mon, 22 Jan 2018 17:24:39 +0530 Subject: [sysrepo-devel] Unable to send message to netopeer2-server while running sysrepo datastore. Message-ID: Sir I was trying to emulate the demo of dnsmasq and sysrepo integration as mentioned on dnsmasq-demo . 1. During the installation, based on dnsmasq-sysrepo-github : Third step asks for the following command: sysrepoctl --init --module=sysrepo-dnsmasq which results in the following error: sysrepoctl: urecognized option '--init' -------------- next part -------------- An HTML attachment was scrubbed... URL: From urajanis at palcnetworks.com Mon Jan 22 12:35:33 2018 From: urajanis at palcnetworks.com (Rajanishkumar Upadhyay) Date: Mon, 22 Jan 2018 18:05:33 +0530 Subject: [sysrepo-devel] Unable to send message to netopeer2-server while running sysrepo datastore. In-Reply-To: References: Message-ID: Hi All !! I was trying to emulate the demo of dnsmasq and sysrepo integration as mentioned on dnsmasq-demo . 1. During the installation, based on dnsmasq-sysrepo-github : Third step asks for the following command: sysrepoctl --init --module=sysrepo-dnsmasq which results in the following error: sysrepoctl: urecognized option '--init' sysrepoctl: option '-' is invalid. Exiting. Inorder to fix this issue I followed the reply given on : init-query where it was mentioned that instead of init, install may do the task. So I do the following, and get the following result: [root at rajneesh yang]# sysrepoctl -i --yang "sysrepo-dnsmasq at 2016-01- 22.yang" Installing a new module from file 'sysrepo-dnsmasq at 2016-01-22.yang'... Installing the YANG file to '/etc/sysrepo/yang/sysrepo-dnsmasq at 2016-01- 22.yang'... Installing data files for module 'sysrepo-dnsmasq'... Notifying sysrepo about the change... Install operation completed successfully. Then I do the next step: [root at rajneesh yang]# sysrepocfg --import=dnsmasq.xml --datastore=startup sysrepo-dnsmasq The new configuration was successfully applied. 2. Expecting that all configurations are applied successfully I tried to emulate the video on dnsmasq-demo-video . a) It may be noted that the video uses direct ssh rather than using the netopeer2-cli with the command : ssh admin at 127.0.0.1 -p 6001 -s netconf (Followed suite with requisite changes.) At 1:26 in the video, the person typing makes an call to get the configuration of the dnsmasq: #252 ## * But when I follow the step my Netopeer2-server hangs on the following step:* * [2018/01/22 11:35:10.231346, 2] grow_window: growing window (channel 43:0) to 1280000 bytes* * netopeer2-server[354]: Session 3: inactive read timeout elapsed.* Which implies I couldn't perform the call. 3. To try by some other means I utilized the netopeer2-cli program obtained from Netopeer2-github . wherein after connecting to the server I try get-config with the following unsuccessful attempts. a) get-config --source running output: DATA output: b) get-config --source running --filter-xpath urn:ietf/params:xml/ns:yang/dnsmasq output: ly VERBOSE: Resolving unresolved data nodes and their constraints... ly VERBOSE: All data nodes and constraints resolved. ly ERROR: Module name "urn" refers to an unknown module. cli_send_recv: Failed to send the RPC. c) get-config --source running --filter-xpath "yang/dnsmasq" output: application< error-tag>operation-failed error np2srv_sr_get_items_iter failed (sysrepo: Invalid argument). ERROR type: application tag: operation-failed severity: error message: np2srv_sr_get_items_iter failed (sysrepo: Invalid argument). The expected output is: root root true53 *What shall be the correct procedure to run the same ? Any help or advice shall be of great value.* Regards Rajanish -------------- next part -------------- An HTML attachment was scrubbed... URL: From basavarajm at gmail.com Mon Jan 22 03:43:17 2018 From: basavarajm at gmail.com (Basavaraj Menasinahal) Date: Sun, 21 Jan 2018 21:43:17 -0600 Subject: [sysrepo-devel] Regarding rpc reply containing a list of items Message-ID: Hi, Is there a simpler way of constructing rpc reply which contains a list with several items other than specifying every item leaf value and type? For example(rpc_rxample.c): /* allocate output values */ rc = sr_new_values(2, output); if (SR_ERR_OK != rc) { return rc; } /* set 'output/step-count' leaf */ rc = sr_val_set_xpath(&(*output)[0], "/turing-machine:run-until/step-count" ); if (SR_ERR_OK != rc) { return rc; } (*output)[0].type = SR_UINT64_T; (*output)[0].data.uint64_val = 256; Anything simpler approach can be done if it is a list with many leaves? Thanks, Raj -------------- next part -------------- An HTML attachment was scrubbed... URL: From hoanlv4 at viettel.com.vn Tue Jan 23 01:28:04 2018 From: hoanlv4 at viettel.com.vn (hoanlv4 at viettel.com.vn) Date: Tue, 23 Jan 2018 08:28:04 +0700 (ICT) Subject: [sysrepo-devel] R: sysrepo performance with large datastore In-Reply-To: <1618718247.24887916.1516670644871.JavaMail.zimbra@viettel.com.vn> Message-ID: <1411825539.24917316.1516670883979.JavaMail.zimbra@viettel.com.vn> Hi Marco, Could you share your code modification on this? I am also facing the performance problem as my configuration lists with thousands of items. I tried to search on github, but not found any detail info related to your feature ticket. BRs, Hoan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvasko at cesnet.cz Tue Jan 23 07:34:27 2018 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Tue, 23 Jan 2018 08:34:27 +0100 Subject: [sysrepo-devel] =?utf-8?b?Pz09P3V0Zi04P3E/ICBSZWdhcmRpbmcgcnBj?= =?utf-8?q?_reply_containing_a_list_of_items?= In-Reply-To: Message-ID: <607f-5a66e580-45-470b9280@86005127> Hello, no, there is not and I am not sure what simpler approach you would expect. Regards, Michal On Monday, January 22, 2018 04:43 CET, Basavaraj Menasinahal wrote: > Hi, > > Is there a simpler way of constructing rpc reply which contains a list with > several items other than specifying every item leaf value and type? > > For example(rpc_rxample.c): > /* allocate output values */ > rc = sr_new_values(2, output); > if (SR_ERR_OK != rc) { > return rc; > } > > /* set 'output/step-count' leaf */ > rc = sr_val_set_xpath(&(*output)[0], "/turing-machine:run-until/step-count" > ); > if (SR_ERR_OK != rc) { > return rc; > } > (*output)[0].type = SR_UINT64_T; > (*output)[0].data.uint64_val = 256; > > Anything simpler approach can be done if it is a list with many leaves? > > Thanks, > Raj From mvasko at cesnet.cz Tue Jan 23 07:41:20 2018 From: mvasko at cesnet.cz (=?utf-8?q?Michal_Va=C5=A1ko?=) Date: Tue, 23 Jan 2018 08:41:20 +0100 Subject: [sysrepo-devel] =?utf-8?b?Pz09P3V0Zi04P3E/ICBVbmFibGUgdG8gc2Vu?= =?utf-8?q?d_=3Crpc=3E_message_to_netopeer2-server_while_running_sysrepo_d?= =?utf-8?q?atastore=2E?= In-Reply-To: Message-ID: <6c41-5a66e700-67-198fc380@146821321> Hi Rajanish, please do not duplicate an issue in this mailing list when you have written into netopeer2 issues. I have replied you there so we should keep it there. Side note, the dnsmasq demo would need to be updated or hidden because it seems it uses several obsolete mechanisms which can only confuse users. Regards, Michal On Monday, January 22, 2018 13:35 CET, Rajanishkumar Upadhyay wrote: > Hi All !! > I was trying to emulate the demo of dnsmasq and sysrepo integration as > mentioned on dnsmasq-demo . > 1. During the installation, based on dnsmasq-sysrepo-github > : > Third step asks for the following command: > sysrepoctl --init --module=sysrepo-dnsmasq > > which results in the following error: > sysrepoctl: urecognized option '--init' > sysrepoctl: option '-' is invalid. Exiting. > > Inorder to fix this issue I followed the reply given on : init-query > > where it was mentioned that instead of init, install may do the task. > > So I do the following, and get the following result: > [root at rajneesh yang]# sysrepoctl -i --yang "sysrepo-dnsmasq at 2016-01- > 22.yang" > Installing a new module from file 'sysrepo-dnsmasq at 2016-01-22.yang'... > Installing the YANG file to '/etc/sysrepo/yang/sysrepo-dnsmasq at 2016-01- > 22.yang'... > Installing data files for module 'sysrepo-dnsmasq'... > Notifying sysrepo about the change... > Install operation completed successfully. > > Then I do the next step: > [root at rajneesh yang]# sysrepocfg --import=dnsmasq.xml > --datastore=startup sysrepo-dnsmasq > The new configuration was successfully applied. > 2. Expecting that all configurations are applied successfully I tried to > emulate the video on dnsmasq-demo-video . > a) It may be noted that the video uses direct ssh rather than using > the netopeer2-cli with the command : > ssh admin at 127.0.0.1 -p 6001 -s netconf (Followed suite with > requisite changes.) > At 1:26 in the video, the person typing makes an call to get > the configuration of the dnsmasq: > #252 > > > > > > > > > > > ## > > * But when I follow the step my Netopeer2-server hangs on the > following step:* > * [2018/01/22 11:35:10.231346, 2] grow_window: growing window > (channel 43:0) to 1280000 bytes* > * netopeer2-server[354]: Session 3: inactive read timeout elapsed.* > > > Which implies I couldn't perform the call. > 3. To try by some other means I utilized the netopeer2-cli program obtained > from Netopeer2-github . > wherein after connecting to the server I try get-config with the > following unsuccessful attempts. > > a) get-config --source running > output: DATA > output: message-id="2"> > > b) get-config --source running --filter-xpath > urn:ietf/params:xml/ns:yang/dnsmasq > output: > ly VERBOSE: Resolving unresolved data nodes and their constraints... > ly VERBOSE: All data nodes and constraints resolved. > ly ERROR: Module name "urn" refers to an unknown module. > cli_send_recv: Failed to send the RPC. > c) get-config --source running --filter-xpath "yang/dnsmasq" > output: > message-id="3"> > application< > error-tag>operation-failed > error > np2srv_sr_get_items_iter failed > (sysrepo: Invalid argument). > > > ERROR > type: application > tag: operation-failed > severity: error > message: np2srv_sr_get_items_iter failed (sysrepo: Invalid > argument). > > The expected output is: > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > > > root > root > true53 > > > *What shall be the correct procedure to run the same ? Any help or advice > shall be of great value.* > > Regards > Rajanish From basavarajm at gmail.com Tue Jan 23 12:59:32 2018 From: basavarajm at gmail.com (Basavaraj Menasinahal) Date: Tue, 23 Jan 2018 12:59:32 +0000 Subject: [sysrepo-devel] Regarding rpc reply containing a list of items In-Reply-To: <607f-5a66e580-45-470b9280@86005127> References: <607f-5a66e580-45-470b9280@86005127> Message-ID: Thanks Michal for quick response. I was just wondering if there are any other util helper functions that I am not aware of. On Tue, Jan 23, 2018 at 1:34 AM Michal Va?ko wrote: > Hello, > > no, there is not and I am not sure what simpler approach you would expect. > > Regards, > Michal > > On Monday, January 22, 2018 04:43 CET, Basavaraj Menasinahal < > basavarajm at gmail.com> wrote: > > > Hi, > > > > Is there a simpler way of constructing rpc reply which contains a list > with > > several items other than specifying every item leaf value and type? > > > > For example(rpc_rxample.c): > > /* allocate output values */ > > rc = sr_new_values(2, output); > > if (SR_ERR_OK != rc) { > > return rc; > > } > > > > /* set 'output/step-count' leaf */ > > rc = sr_val_set_xpath(&(*output)[0], > "/turing-machine:run-until/step-count" > > ); > > if (SR_ERR_OK != rc) { > > return rc; > > } > > (*output)[0].type = SR_UINT64_T; > > (*output)[0].data.uint64_val = 256; > > > > Anything simpler approach can be done if it is a list with many leaves? > > > > Thanks, > > Raj > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mislav.novakovic at sartura.hr Tue Jan 23 17:23:47 2018 From: mislav.novakovic at sartura.hr (Mislav Novakovic) Date: Tue, 23 Jan 2018 18:23:47 +0100 Subject: [sysrepo-devel] Unable to send message to netopeer2-server while running sysrepo datastore. In-Reply-To: References: Message-ID: Hi Rajanish the video demonstration was done with an older API, we will update it. Because of that the some sysrepoctl commands do not longer exist and the YANG model has been changed. Comments are inline. On Mon, Jan 22, 2018 at 1:35 PM, Rajanishkumar Upadhyay wrote: > Hi All !! > I was trying to emulate the demo of dnsmasq and sysrepo integration as > mentioned on dnsmasq-demo. > 1. During the installation, based on dnsmasq-sysrepo-github : > Third step asks for the following command: > sysrepoctl --init --module=sysrepo-dnsmasq The "sysrepoctl --init" command has ben removed and replaced with "sysrepoctl -i": sysrepoctl -i -g /etc/sysrepo/yang/sysrepo-dnsmasq\@2016-01-22.yang > which results in the following error: > sysrepoctl: urecognized option '--init' > sysrepoctl: option '-' is invalid. Exiting. > > Inorder to fix this issue I followed the reply given on : init-query > where it was mentioned that instead of init, install may do the task. > > So I do the following, and get the following result: > [root at rajneesh yang]# sysrepoctl -i --yang "sysrepo-dnsmasq at 2016-01- > 22.yang" > Installing a new module from file 'sysrepo-dnsmasq at 2016-01-22.yang'... > Installing the YANG file to '/etc/sysrepo/yang/sysrepo-dnsmasq at 2016-01- > 22.yang'... > Installing data files for module 'sysrepo-dnsmasq'... > Notifying sysrepo about the change... > Install operation completed successfully. This is correct. > Then I do the next step: > [root at rajneesh yang]# sysrepocfg --import=dnsmasq.xml > --datastore=startup sysrepo-dnsmasq > The new configuration was successfully applied. > 2. Expecting that all configurations are applied successfully I tried to > emulate the video on dnsmasq-demo-video. > a) It may be noted that the video uses direct ssh rather than using the > netopeer2-cli with the command : > ssh admin at 127.0.0.1 -p 6001 -s netconf (Followed suite with > requisite changes.) > At 1:26 in the video, the person typing makes an call to get > the configuration of the dnsmasq: > #252 > > > > > > > > > > > ## The yang model has be modified, it's no longer dnsmasq but sysrepo-dnsmasq. You can get a list of the installed YANG models with "sysrepoctl -l". > But when I follow the step my Netopeer2-server hangs on the > following step: > [2018/01/22 11:35:10.231346, 2] grow_window: growing window > (channel 43:0) to 1280000 bytes > netopeer2-server[354]: Session 3: inactive read timeout elapsed. > > > Which implies I couldn't perform the call. > 3. To try by some other means I utilized the netopeer2-cli program obtained > from Netopeer2-github . > wherein after connecting to the server I try get-config with the > following unsuccessful attempts. > > a) get-config --source running > output: DATA > output: message-id="2"> > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"/> > b) get-config --source running --filter-xpath > urn:ietf/params:xml/ns:yang/dnsmasq > output: > ly VERBOSE: Resolving unresolved data nodes and their constraints... > ly VERBOSE: All data nodes and constraints resolved. > ly ERROR: Module name "urn" refers to an unknown module. > cli_send_recv: Failed to send the RPC. > c) get-config --source running --filter-xpath "yang/dnsmasq" > output: > message-id="3"> > > applicationoperation-failed > error > np2srv_sr_get_items_iter failed > (sysrepo: Invalid argument). > > > ERROR > type: application > tag: operation-failed > severity: error > message: np2srv_sr_get_items_iter failed (sysrepo: Invalid > argument). > > The expected output is: > xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > > > root > root > true53 > > > What shall be the correct procedure to run the same ? Any help or advice > shall be of great value. Now the correct netopeer2-cli commands would be: get-config --source running --filter-xpath /sysrepo-dnsmasq:* or get --filter-xpath /sysrepo-dnsmasq:* Regards, Mislav > Regards > Rajanish > > > > _______________________________________________ > sysrepo-devel mailing list > sysrepo-devel at sysrepo.org > http://lists.sysrepo.org/listinfo/sysrepo-devel >