GithubHelp home page GithubHelp logo

cesnet / netopeer Goto Github PK

View Code? Open in Web Editor NEW
117.0 29.0 65.0 5.12 MB

NETCONF Protocol Toolset

C 38.71% HTML 3.39% Shell 46.70% Python 4.80% XSLT 1.62% Makefile 1.09% M4 1.39% Roff 2.01% C++ 0.28%
liberouter netconf

netopeer's Introduction

NETCONF toolset Netopeer

Project Stats

Netopeer is a set of NETCONF tools built on the libnetconf library. It allows operators to connect to their NETCONF-enabled devices as well as developers to allow control their devices via NETCONF. More information about NETCONF protocol can be found at NETCONF WG.

With the experiences from Netopeer, we have moved our activities to work on next generation of this NETCONF toolset based on libyang library. Netopeer2 is mature enough to be used as a replacement of the original Netopeer tools. Therefore, the Netopeer is no more developed neither maintained.

Tools Overview

Netopeer Tools Scheme

CLI interface allowing user to connect to a NETCONF-enabled device and to obtain and manipulate its configuration data.

The main Netopeer server following the integrated architecture. netopeer-server is supposed to run as a system service controlling a device. By default, we provide example modules to control several areas of a GNU/Linux desktop (network interfaces, packet filter and overall system information). The netopeer-server allows you to simply switch the modules to use your own control modules.

As part of the Netopeer server, there is a set of the following tools:

Running the server in docker

This repository has a Dockerfile that can be used to create a container that builds netopeer-server and starts the service. You need a linux with working docker installation to use it.

To build the container:

git clone https://github.com/CESNET/netopeer.git
cd netopeer
docker build -t netopeer .

To start it:

docker run -it --rm -p 8300:830 --name netopeer netopeer

The line above maps netopeer's netconf port to 8300 on the host. You can connect to that port with ncclient without any user or password (as long as you have a valid private key on the host).

Netopeer projects provides several basic transAPI modules that, besides their functionality, serve as examples for writing the libnetconf transAPI modules. These modules are located inside the transAPI/ directory.

TransAPI module implementing ietf-system data model following RFC 7317.

The Apache module with a web-based GUI allowing user to connect to a NETCONF-enabled device and to obtain and manipulate its configuration data from a graphical interface.

This part is available as a standalone project at GitHub.

Interoperability

In November 2012, prior to the IETF 85 meeting, some of these tools were participating in NETCONF Interoperability Testing.

All tools are built on top of the libnetconf library and allows you to use the following NETCONF features:

Other Resources

Solving Issues

Since the development activities were moved to the Netopeer2 project, we do not maintain this project. However, the issue tracker is kept open to allow community to discuss the issues and possibly share the solutions or advices. Anyway, note that authors propose to move to the Netopeer2 project.

netopeer's People

Contributors

cejkato2 avatar karel-slany-nic-cz avatar kjhfafjashf avatar lpenz avatar mbaugher avatar michalvasko avatar rkrejci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netopeer's Issues

initial configuration tool

Describe requested feature:

After the installation, it would be helpful to have some standalone tool to set 
all neccessary things before the first use of Netopeer (mainly server). 
Especially correct initial NACM setting is a challenging thing and this tool 
could make user's life easier.

Original issue reported on code.google.com by [email protected] on 19 Dec 2013 at 1:08

man pages

Describe requested feature:

prepare man pages for netopeer-* tools

Original issue reported on code.google.com by [email protected] on 5 Mar 2014 at 9:38

How to enable call-home?

Hi,

I know the call-home feature on netopeer-cli can be activated by "netconf> listen"

But, how about netopeer-server?

How to trigger netopeer-server to connect to a specific call-home server?

Toaster status is not good

As mention in toaster.yang the Toaster status should reflect the knob position.

----
leaf toasterStatus {
            type enumeration {
                enum up {
                  value 1;
                  description
                    "The toaster knob position is up.
                      No toast is being made now.";
                }
                enum down {
                  value 2;
                  description
                    "The toaster knob position is down.
                      Toast is being made now.";

                }
            }
----

This is not the case today as the toaster status is mapped on "status->enabled".

It should be mapped on "status->toasting".

I propose the following patch
------------------
--- a/server-sl/toaster/toaster.c
+++ b/server-sl/toaster/toaster.c
@@ -125,7 +125,7 @@ xmlDocPtr get_state_data (xmlDocPtr model, xmlDocPtr 
running, struct nc_err **er
        xmlSetNs(root, ns);
        xmlNewChild(root, ns, BAD_CAST "toasterManufacturer", BAD_CAST "CESNET, z.s.p.o.");
        xmlNewChild(root, ns, BAD_CAST "toasterModelNumber", BAD_CAST "toaster");
-       xmlNewChild(root, ns, BAD_CAST "toasterStatus", BAD_CAST 
(status->enabled ? "up" : "down" ));
+       xmlNewChild(root, ns, BAD_CAST "toasterStatus", BAD_CAST 
(status->toasting ? "down" : "up" ));

        return (state);
 }
-------------------

What version of the product are you using? On what operating system?
Branch : master
Rev : c6bfde5ccbe7

Best regards
Vincent

Original issue reported on code.google.com by [email protected] on 25 Mar 2014 at 2:53

create operation cause duplicate configuration in the datastore

What steps will reproduce the problem?
1.an clean datastore file, datastore-server.xml
2.edit-config running with a user-defined config data within which has a 
"create" operation.

This is the config data I have input.
netconf> edit-config running

  Type the edit configuration data (close editor by Ctrl-D):

<netconf xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
  <ssh>
    <call-home>
      <applications>
        <application nc:operation="create">
          <name>eric</name>
            <servers>
              <server>
                <address>192.168.168.8</address>
                <port>1113</port>
              </server>
            </servers>
        </application>
      </applications>
    </call-home>
  </ssh>
</netconf>
-----------------------------------------------------------
This is the expected output
<?xml version="1.0" encoding="UTF-8"?>
<datastores xmlns="urn:cesnet:tmc:datastores:file">
  <running lock="">
    <netconf xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
      <ssh>
        <call-home>
          <applications>
            <application>
              <name>eric</name>
              <servers>
                <server>
                  <address>192.168.168.8</address>
                  <port>1113</port>
                </server>
              </servers>
            </application>
          </applications>
        </call-home>
      </ssh>
    </netconf>
  </running>
  <startup lock=""/>
  <candidate modified="false" lock=""/>
</datastores>
--------------------------------------------------------------
What do you see instead?
<?xml version="1.0" encoding="UTF-8"?>
<datastores xmlns="urn:cesnet:tmc:datastores:file">
  <running lock="">
    <netconf xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
      <ssh>
        <call-home>
          <applications>
            <application xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
              <name>eric</name>
              <servers>
                <server>
                  <address>10.68.168.8</address>
                  <port>1113</port>
                </server>
              </servers>
            </application>
          </applications>
        </call-home>
      </ssh>
      <ssh xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
        <call-home>
          <applications/>
        </call-home>
      </ssh>
    </netconf>
  </running>
  <startup lock=""/>
  <candidate modified="false" lock=""/>
</datastores>
--------------------------------------------------------------
What version of the product are you using? On what operating system?
---I use commit 3eb0a100fcaf under ubuntu 12.04

Please provide any additional information below.
---when I use merger instead of create, there is no problems like above.

Original issue reported on code.google.com by [email protected] on 21 Oct 2014 at 3:24

reference to invalide parameter when calling user-rpc "make-toast"

What steps will reproduce the problem?
1. send a "user-rpc make-toast" to the toaster

What is the expected output? What do you see instead?
The toaster should be toasting for the requested amount of time.
Unfortunately it toasts forever.


What version of the product are you using? On what operating system?
Branch : master 
Rev : c6bfde5ccbe7

Please provide any additional information below.
After some investigation I found the problem.

Function rpc_make_toast launch function make_toast in a new thread passing 
doneness as a parameter.
Unfortunately, doneness is a local parameter when the new thread uses it... it 
as been scratch by "something else".
The new thread will then sleep for an unpredictable amount of time.

declaring this local variable as "static" will make it exists for the whole 
execution time.

You will find here my proposed patch.

------------------------------------
@@ -226,7 +226,7 @@ nc_reply * rpc_make_toast (xmlNodePtr input[])

        struct nc_err * err;
        nc_reply * reply;
-       int doneness; 
+       static int doneness; 
        pthread_t tid;

        if (toasterDoneness == NULL) { /* doneness not specified, use default*/
------------------------------------

Regards.
Vincent

Original issue reported on code.google.com by [email protected] on 25 Mar 2014 at 2:38

Callhome is not working on some linux systems.

I have verified passwordless callhome session on ubuntu, it is working fine.
I have an embedded machine which also run linux. I have followed same procedure as I did on ubuntu.

I repeatedly see below errors:

Call Home (app abc) client thread creation timeout, retrying.
Call Home: connected to 127.0.0.1:6666
np_ssh_create_client: SSH key exchange error (src/ssh/server_ssh.c:1053):

Please note that, passwordless "connect" works without any problem on the same machine.
But when try to "listen", It always says that tcp connect is established, but fails at ssh-keyexchange API.

Can someone help me in finding the issue.

Question: How to get hostname

Hi,
Connect netopeer-server and Netopeer server successfully initialized.
I want to get-config hostname of ietf-system but rpc-reply data is null.
Please help me how to do? I don't understand what's happen?
I write debug at callback_systemns_system_systemns_hostname() function and nothing.

Thanks

./netopeer-server -v4

netopeer-server[22724]: Shared memory location: /dev/shm/libnetconfshm
netopeer-server[22724]: POSIX SHM File Descriptor: 4 (568B).
netopeer-server[22724]: Failed to open semaphore directory "/dev/shm" (No such file or directory).
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-inet-types.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-yang-types.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-netconf-monitoring.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-netconf-notifications.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model nc-notifications.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model notifications.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-netconf-with-defaults.
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-netconf-acm.
netopeer-server[22724]: ncds_set_validation: Relax NG validator set (//var/lib/libnetconf//ietf-netconf-acm-config.rng)
netopeer-server[22724]: ncds_set_validation: Schematron validator set (//var/lib/libnetconf//ietf-netconf-acm-schematron.xsl)
netopeer-server[22724]: Datastore ietf-netconf-acm initiated with ID 8.
netopeer-server[22724]: Checking the default Events stream path //var/lib/libnetconf//streams/.
netopeer-server[22724]: Adding augment model "//etc/netopeer/cfgnetopeer/ietf-x509-cert-to-name.yin"
netopeer-server[22724]: ncds_features_parse: no feature definitions found in data model ietf-x509-cert-to-name.
netopeer-server[22724]: Adding static transapi "//etc/netopeer/cfgnetopeer/ietf-netconf-server.yin"
netopeer-server[22724]: ncds_new_internal: Relax NG validator set (/etc/netopeer/cfgnetopeer/ietf-netconf-server-config.rng)
netopeer-server[22724]: ncds_new_internal: Schematron validator set (/etc/netopeer/cfgnetopeer/ietf-netconf-server-schematron.xsl)
netopeer-server[22724]: Datastore ietf-netconf-server initiated with ID 1804289384.
netopeer-server[22724]: Setting the default SSH configuration for the ietf-netconf-server module...
netopeer-server[22724]: callback_srv_netconf_srv_listen_srv_port: SSH listening on the port 830
netopeer-server[22724]: Adding static transapi "//etc/netopeer/cfgnetopeer/netopeer-cfgnetopeer.yin"
netopeer-server[22724]: ncds_new_internal: Relax NG validator set (/etc/netopeer/cfgnetopeer/netopeer-cfgnetopeer-config.rng)
netopeer-server[22724]: ncds_new_internal: Schematron validator set (/etc/netopeer/cfgnetopeer/netopeer-cfgnetopeer-schematron.xsl)
netopeer-server[22724]: Datastore netopeer-cfgnetopeer initiated with ID 846930887.
netopeer-server[22724]: Setting the default configuration for the cfgnetopeer module...
netopeer-server[22724]: Setting the default configuration for the cfgnetopeer module SSH...
netopeer-server[22724]: Netopeer server successfully initialized.
netopeer-server[22724]: Received an SSH message "request-service" of subtype "ssh-userauth".
netopeer-server[22724]: Received an SSH message "request-auth" of subtype "password".
netopeer-server[22724]: User 'root' authenticated.
netopeer-server[22724]: Received an SSH message "request-channel-open" of subtype "session".
netopeer-server[22724]: Received an SSH message "request-channel" of subtype "subsystem".
netopeer-server[22724]: Writing message (session 1):
< hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

urn:ietf:params:netconf:base:1.0
urn:ietf:params:netconf:base:1.1
urn:ietf:params:netconf:capability:writable-running:1.0
urn:ietf:params:netconf:capability:candidate:1.0
urn:ietf:params:netconf:capability:startup:1.0
urn:ietf:params:netconf:capability:rollback-on-error:1.0
urn:ietf:params:netconf:capability:interleave:1.0
urn:ietf:params:netconf:capability:notification:1.0
urn:ietf:params:netconf:capability:validate:1.0
urn:ietf:params:netconf:capability:validate:1.1
urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit
urn:ietf:params:netconf:capability:url:1.0?scheme=scp,file
urn:cesnet:tmc:netopeer:1.0?module=netopeer-cfgnetopeer&revision=2015-05-19&features=ssh,dynamic-modules
urn:ietf:params:xml:ns:yang:ietf-netconf-server?module=ietf-netconf-server&revision=2014-01-24&features=ssh,inbound-ssh,outbound-ssh
urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2013-03-26
urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2012-02-22
urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2010-06-09
urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14
urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14
urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2011-08-07
urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04
urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2011-03-08&features=writable-running,candidate,rollback-on-error,validate,startup,url
urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15
urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2010-09-24

1

netopeer-server[22724]: Received message (session 1):
< hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">

urn:ietf:params:netconf:capability:writable-running:1.0
urn:ietf:params:netconf:capability:rollback-on-error:1.0
urn:ietf:params:netconf:capability:confirmed-commit:1.1
urn:ietf:params:netconf:capability:confirmed-commit:1.0
urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp
urn:ietf:params:netconf:base:1.0
urn:ietf:params:netconf:base:1.1
urn:ietf:params:netconf:capability:validate:1.0
urn:ietf:params:netconf:capability:candidate:1.0
urn:ietf:params:netconf:capability:xpath:1.0
urn:ietf:params:xml:ns:netconf:notification:1.0
urn:ietf:params:netconf:capability:validate:1.1
urn:ietf:params:netconf:capability:startup:1.0
urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=trim,report-all,report-all-tagged
urn:ietf:params:netconf:capability:interleave:1.0


netopeer-server[22724]: Adding new event (5)
netopeer-server[22724]: Created session 1 for user 'root' (UID 0) (recovery)
netopeer-server[22724]: New server session for 'root' with ID 1

netopeer-server[22724]: Received message (session 1):






<sys:system xmlns:sys="urn:ietf:params:xml:ns:yang:ietf-system">
sys:hostname/
/sys:system



netopeer-server[22724]: Writing message (session 1):



1

kill-session causes netopeer-server crash

What steps will reproduce the problem?
1. Start netopeer-server
2. Connect two (clients) netopeer-cli(s)
3. kill-session <session-id of first client> from second client.

What is the expected output? What do you see instead?
netopeer-server should able to kill the session and netopeer-agent 
(corresponding to the first client) should get killed.
But, netopeer-server is crashing and netopeer-agent (corresponding to the first 
client) is still running.

What version of the product are you using? On what operating system?
7c1efe36f74c (0.9.x libnetconf)

Please provide any additional information below.



Original issue reported on code.google.com by [email protected] on 9 Jun 2015 at 10:02

Attachments:

typo

I just saw this line in commit 42d8acbba52:

+   if (timezone == (char*)9 || (timezone[0] != '+' && timezone[0] != '-') || 
strlen(timezone) != 6) {

I guess the 9 should be a 0, or better one should use NULL here.

Attached the patch to fix this.

Original issue reported on code.google.com by [email protected] on 20 Oct 2014 at 4:31

Attachments:

undefined reference to `ssh_message_type'

Hi,
make file , found some error

........
server.c:(.text+0x788): undefined reference to ssh_bind_free' .obj/src/ssh/server_ssh.o: In functionnetconf_session_thread':
server_ssh.c:(.text+0x50): undefined reference to nc_session_accept_libssh_channel' .obj/src/ssh/server_ssh.o: In functionsshcb_msg':
server_ssh.c:(.text+0x23c): undefined reference to ssh_message_type' server_ssh.c:(.text+0x248): undefined reference tossh_message_subtype'
server_ssh.c:(.text+0x394): undefined reference to ssh_message_service_service' server_ssh.c:(.text+0x3e8): undefined reference tossh_message_channel_request_open_reply_accept'
server_ssh.c:(.text+0x464): undefined reference to ssh_message_auth_user' server_ssh.c:(.text+0x4b4): undefined reference tossh_message_auth_kbdint_is_re

because libnetconf.so leak libssh
./configure --disable-libssh

So, Need I disable this feature?

Send netconf message to netopeer server through ssh session, session force shutdown

Hi,

I have a netopeer server, and I connect to it through "ssh root@localhost -p 830 -s netconf" in bash.

Netconf server replied me with hello message.
But after that, I tried to send hello message and get rpc message through the ssh session, the ssh session was forced shutdown.
Is there any way to solve this problem? And do I need extra configuration of my netopeer server to be able to send netconf message through ssh session? I cannot use any existing netconf client, just pure bash. Thanks!

different format of --config and --url files in edit-config

What is the expected behaviour? What do you see instead?

--config and --url options are alternatives in edit-config operation. --config 
points to a local file while --url refers to a remote file. User expects that 
the content of both refered files has the same format, but it does not. --url 
file must contain <config> root element (defined in RFC 6241 sec 8.8.5.1), 
while --config file does not.

Original issue reported on code.google.com by [email protected] on 27 May 2014 at 11:48

Questions for supporting "if-feature"

Hi,
We want to support ‘if-feature’ in Libnetconf. After verify and analyzing the related source code, I have 1 questions for netopeer

parse_model_cfg

name = strdup(basename(model_path));
/*cut off the .yin suffix */
aux = strrchr(name, '.');

if the model files is like this. [email protected]. the name will be config@2015-06-25
then will call ncds_feature_enable(name, feature). but in models_list, the model name is without date. which will cause cannot find the model, and update the feature status failed.

Is my understanding right? Thanks a lot.

Thanks,

netconf server doesn't work well with 'subscribe' from two cli's

Started a cli and connected to localhost, then 'subscribe'.
Started a second cli on a different station, then 'subscribe'.

Use 'edit-config' to change configuration.

Saw notification on one cli but not on the other.

Disconnected one cli and caused new notifications - didn't see notifications anywhere.

cfgsystem-init error

Hi,
The augeas_init() function on base\common.c
aug_match return -1 is error => EXIT_FAILURE
return !=0 is match cnt
return 0 is no match

So, if match >0, then return EXIT_FAILURE ??
Beasuse I execute cfgsystem-init. line139 on base\common.c return c=5

line139:
if ((c = aug_match(sysaugeas, "/augeas//error", &matches)) != 0) {
aug_get(sysaugeas, matches[0], (const char**) msg);
asprintf(msg, "Initiating augeas failed (%s: %s)", matches[0], *msg);
augeas_close();
for (i = 0; i < c; ++i) {
free(matches[i]);
}
free(matches);
return EXIT_FAILURE;
}

augeas 1.2.0 : augeas .c
int aug_match(const struct augeas aug, const char *pathin, char **matches) {
struct pathx *p = NULL;
struct tree *tree;
int cnt = 0;

api_entry(aug);

if (matches != NULL)
    *matches = NULL;

if (STREQ(pathin, "/")) {
    pathin = "/*";
}

p = pathx_aug_parse(aug, aug->origin, tree_root_ctx(aug), pathin, true);
ERR_BAIL(aug);

for (tree = pathx_first(p); tree != NULL; tree = pathx_next(p)) {
    if (! TREE_HIDDEN(tree))
        cnt += 1;
}
ERR_BAIL(aug);

if (matches == NULL)
    goto done;

if (ALLOC_N(*matches, cnt) < 0)
    goto error;

int i = 0;
for (tree = pathx_first(p); tree != NULL; tree = pathx_next(p)) {
    if (TREE_HIDDEN(tree))
        continue;
    (*matches)[i] = path_of_tree(tree);
    if ((*matches)[i] == NULL) {
        goto error;
    }
    i += 1;
}
ERR_BAIL(aug);

done:
free_pathx(p);
api_exit(aug);
return cnt;

error:
if (matches != NULL) {
if (_matches != NULL) {
for (i=0; i < cnt; i++)
free((_matches)[i]);
free(*matches);
}
}
free_pathx(p);
api_exit(aug);
return -1;
}

Question: netopeer-cli and ssh shell

Hi,
I can use netopeer-cli to get-config.But use ssh shell is fail.
What is difference between two method ?
Thanks

$ ssh [email protected] -p 830 -s netconf
Interactive SSH Authentication
Type your password
Password:

........................ ]]>]]> ]]>]]> Connection to 172.19.96.152 closed by remote host.

netopeer-server display:
netopeer-server[11860]: Adding new event (6)
netopeer-server[11860]: netconf_session_thread: failed to create a new NETCONF session
netopeer-server[11860]: Freeing session for 'root'

Use netopeer-cli
netconf> get-config
Select target datastore (running|startup|candidate|url:): running
Result:

CentOS-6.2-test

GMT
......................

Question: cfgsystem model init

Hi,
My netopeer-server is working.
I don't know netopeer-server how to init cfgsystem model.
I have cfgsystem.so on /usr/local/lib/

Need I execute command: ./cfgsystem-init /usr/local/etc/netopeer//ietf-system/datastore.xml timezone-name authentication local-users??

Thanks

using ncclient causes a segfault in netopeer-server

What steps will reproduce the problem?
1. Use ncclient and try edit config
2. netopeer-server segfaults
3. The same request works correctly when using netopeer-cli 

Crash Data:
netopeer-server[2355]: segfault at 2c ip b67a6d50 sp bfa9f200 error 4 in 
libaugeas.so.0.18.0[b67a0000+56000]

This might have something to do with the xml namespaces. 

1. The same request from netopeer-cli works correctly. 
The request as sent by netopeer-cli 

<?xml version="1.0" encoding="UTF-8"?>#012<rpc 
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="7">#012  
<edit-config>#012    <target>#012      <running/>#012    </target>#012    
<config>#012      <system xmlns="urn:avaya:params:xml:ns:yang:ona100">#012      
  <status>#012          <device-status>green</device-status>#012        
</status>#012      </system>#012    </config>#012  </edit-config>#012</rpc>

2. The request sent by ncclient. This causes the crash 

 <?xml version="1.0" encoding="UTF-8"?>#012<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns1="urn:avaya:params:xml:ns:yang:ona100" message-id="urn:uuid:c9d007ea-d29c-11e4-87b8-080027ba1a92">#012  <nc:edit-config>#012    <nc:target>#012      <nc:candidate/>#012    </nc:target>#012    <config>#012      <ns1:system>#012        <ns1:status>#012          <ns1:device-status>green</ns1:device-status>#012        </ns1:status>#012      </ns1:system>#012    </config>#012  </nc:edit-config>#012</nc:rpc>






Original issue reported on code.google.com by [email protected] on 25 Mar 2015 at 4:04

smarter commands history in CLI

Describe requested feature:

CLI stores commands into the history. But if the same command is invoked 
repeatedly, it is stored to the history file several times. It should be stored 
only once, when the same commands are used consecutively.

Original issue reported on code.google.com by [email protected] on 30 May 2014 at 12:57

get-schema returns data element with incorrect namespace

What steps will reproduce the problem?
1. Issue a get-schema rpc. 
<rpc message-id="m-0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get-schema xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
<format>yang</format>
<identifier>ietf-netconf-acm</identifier>
<version>2012-02-22</version>
</get-schema>
</rpc>
2. Wait for result rpc


What is the expected output? What do you see instead?

Expected response is rpc-reply conforming to the ietf-netconf-monitoring, with 
namespace urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring.

Incorrect returned value was:

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-0">
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">module "ietf-netconf-acm" {
  namespace "urn:ietf:params:xml:ns:yang:ietf-netconf-acm";
  prefix "nacm";
  ...

Which contains a data element with namespace 
urn:ietf:params:xml:ns:netconf:base:1.0.
The correct namespace should be 
urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring.



Build on master

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 27 Feb 2014 at 1:02

build netopeer server

Hi,
I build netopeer server.

....
checking for pkg-config... /usr/bin/pkg-config
checking for roff2html... no
checking for distro... redhat
checking for /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for uname... yes
checking for host architecture... x86_64
checking for lnctool... no
configure: error: "lnctool not found!"

TLS callhome on netopeer-server does not need libssh

Hi,

netopeer-server is a client of callhome, so it just use nc_callhome_connect of libnetconf. But the configure must ask for nc_callhome_listen. It takes a configure error when the libnetconf built without libssh. I think the configure.in should be modified and re-generate the configure.

ietf-netconf-server.yang (yin) file used in netopeer is not same as standard yang file in netconfcentral

What steps will reproduce the problem?
The below two files are not exactly same.
1. netopeer/server/config/ietf-netconf-server.yin
2. http://www.netconfcentral.org/modulereport/ietf-netconf-server


What is the expected output? What do you see instead?
If netconf client uses standard yang file and triggers edit-config, it will 
fail in Netopeer (libnetconf) validation.

What version of the product are you using? On what operating system?
Version :
---------
libnetconf 0.8.0
netopeer 0.6.0

Operating System :
-------------------
Ubuntu 12.04.4 LTS

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 16 Oct 2014 at 11:52

Server build: Packager DESTDIR leaked into sshd_config

What steps will reproduce the problem?
1. Build using 'make rpm' or debhelper

What is the expected output? What do you see instead?
The wrong path to netopeer-agent is written to sshd_config, making the server 
unable to accept connections.  Example:

# NETCONF SSH Subsystem settings
Subsystem netconf /path/to/packager/destdir//usr/bin/netopeer-agent

What version of the product are you using? On what operating system?
Revision: 5d9d009eded0

Please provide any additional information below.
Patch attached.

Original issue reported on code.google.com by [email protected] on 21 Jan 2015 at 2:10

Attachments:

pyang: error: no such option: --features

Hi,
I build netopeer server. I have a problem:

...........
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
configure: generating validation files...
Usage: pyang [options] [...]

Validates the YANG module in (or stdin), and all its dependencies.

pyang: error: no such option: --features
Command 'pyang -p /home/SDN/netopeer-master/server/config/ -f dsdl --dsdl-no-documentation --dsdl-no-dublin-core -o /tmp/dsdlhKN55t.dsdl /home/SDN/netopeer-master/server/config/ietf-netconf-server.yin --features ietf-netconf-server:ssh,inbound-ssh' failed (2)
configure: error: Generating validation files for ietf-netconf-server failed.
[root@CentOS-6 server]#

Segmentation fault

Hi,
I first see the message: Client session closed, removing it. then Segmentation fault!!!
I guess some error.

Thanks,

ofc-server[1710]: Adding new event (6)
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Created dummy session 0 for user 'root' (UID 0) - recovery session
ofc-server[1710]: Received an SSH message "request-service" of subtype "ssh-userauth".
ofc-server[1710]: Received an SSH message "request-auth" of subtype "none".
ofc-server[1710]: Received an SSH message "request-auth" of subtype "password".
ofc-server[1710]: User 'root' authenticated.
ofc-server[1710]: Received an SSH message "request-channel-open" of subtype "session".
ofc-server[1710]: Received an SSH message "request-channel" of subtype "subsystem".
ofc-server[1710]: Writing message (session 267):


urn:ietf:params:netconf:base:1.0
urn:ietf:params:netconf:base:1.1
urn:ietf:params:netconf:capability:writable-running:1.0
urn:ietf:params:netconf:capability:candidate:1.0
urn:ietf:params:netconf:capability:startup:1.0
urn:ietf:params:netconf:capability:rollback-on-error:1.0
urn:ietf:params:netconf:capability:interleave:1.0
urn:ietf:params:netconf:capability:notification:1.0
urn:ietf:params:netconf:capability:validate:1.0
urn:ietf:params:netconf:capability:validate:1.1
urn:ietf:params:netconf:capability:with-defaults:1.0?basic-mode=explicit&also-supported=report-all,report-all-tagged,trim,explicit
urn:ietf:params:netconf:capability:url:1.0?scheme=scp,file
urn:onf:config:yang?module=of-config&revision=2015-02-11
urn:ietf:params:xml:ns:yang:ietf-system?module=ietf-system&revision=2014-08-06
urn:cesnet:tmc:netopeer:1.0?module=netopeer-cfgnetopeer&revision=2015-05-19&features=ssh,dynamic-modules
urn:ietf:params:xml:ns:yang:ietf-netconf-server?module=ietf-netconf-server&revision=2014-01-24&features=ssh,inbound-ssh,outbound-ssh
urn:ietf:params:xml:ns:yang:ietf-x509-cert-to-name?module=ietf-x509-cert-to-name&revision=2013-03-26
urn:ietf:params:xml:ns:yang:ietf-netconf-acm?module=ietf-netconf-acm&revision=2012-02-22
urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2010-06-09
urn:ietf:params:xml:ns:netconf:notification:1.0?module=notifications&revision=2008-07-14
urn:ietf:params:xml:ns:netmod:notification?module=nc-notifications&revision=2008-07-14
urn:ietf:params:xml:ns:yang:ietf-netconf-notifications?module=ietf-netconf-notifications&revision=2011-08-07
urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring?module=ietf-netconf-monitoring&revision=2010-10-04
urn:ietf:params:xml:ns:netconf:base:1.0?module=ietf-netconf&revision=2011-03-08&features=writable-running,candidate,rollback-on-error,validate,startup,url
urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15
urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2010-09-24

267

ofc-server[1710]: Client session closed, removing it.
ofc-server[1710]: Freeing session for 'root'
Segmentation fault

Invalid (syntax incorrect) XML config accepted by server

What steps will reproduce the problem?
1. Send an invalid (syntax incorrect) XML configuration file, the first time 
edit one module like toaster, 

What is the expected output? What do you see instead?
Expected an error message ('Malformed message') to be returned to the client.
Instead, server accept the xml config and write to the datastore without check. 

netconf> edit-config running

  Type the edit configuration data (close editor by Ctrl-D):
<toaster xmlns="http://netconfcentral.org/ns/toaster">
<hello/>
</toaster >

  Result OK
netconf> get-config running

  Result:
<toaster xmlns="http://netconfcentral.org/ns/toaster">
    <hello/>
  </toaster><netopeer xmlns="urn:cesnet:tmc:netopeer:1.0">
    <modules>
      <module>
        <name>toaster</name>
        <enabled>true</enabled>
      </module>
    </modules>
</netopeer>

What version of the product are you using? On what operating system?
libnetconf--- commit b760b663
netopeer---   commit 3eb0a100fcaf

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 7 Nov 2014 at 9:23

If there exists a netopeer-server instance, then start another netopeer-server instance twice will kill the existed instance.

Several issues:

  1. If there exists a netopeer-server instance, then start another netopeer-server instance twice will kill the existed instance. I think the existed instance shall not be killed by other netopeer-server instance.

  2. We found even there is no netopeer-server instance, the /tmp/netopeer.socket is still there sometime. That's to say /tmp/netopeer.socket is not removed when netopeer-server was quit last time.
    This results in netopeer-server can not startup at the first time. But it can startup at second time without removing /tmp/netopeer.socket manually.

No transAPI "commit" callback registration. How notify device driver(s) of configuration changes?

Hi All,
I'm a newbie. I apologize in advance if this is a stupid question.

I'm trying to implement firmware that will repond to the 'commit' action by applying the new configuration data to various device drivers on my circuit card.

I don't see how to associate a transAPI callback with the 'commit' netconf action.
Is there a different way to accomplish this?

I'm suspecting that I'm just not 'getting' something.

Thanks,
Tom

The server fails to disallow 'edit-config' operation when a label value is out of range

I expected that it would not be possible to set a configuration label to a value that is out of range.

typedef gain_int_t
{
description
"gain setpoints fall within this range";
type int32{
range "0..20";
}
}

container transition-function {
description
"The blade is configured by specifying the transition function.";

    list amp_quantities{
        key "amp";
        leaf amp{
            type int32;
        }
        leaf gainsetpoint{
            type gain_int_t;
            default "0";
        }
    }

}

edit-config running


<amp_quantities>
0
22
</amp_quantities>


~
Result OK
netconf> eventTime: Wed Jul 22 14:00:52 2015

running
root
17
:0

netopeer-cli - notify about nonexistent config file

in netopeer-cli, when one runs this command:
"edit-config --config /some/nonexistent/path/configuration.xml"

and the provided path is wrong, the response is:
"edit-config: failed to parse the file."

It would be nice and more clear if it said that no such config file was found 
instead. In current status, one can think that the file does exist, but has 
some syntax errors.

Original issue reported on code.google.com by [email protected] on 2 May 2015 at 4:04

missing function renames

In commit FEATURE: agent-server communication over UNIX socket (e25c51ae) the 
function server_sessions_get_by_id was renamed to server_sessions_get_by_ncid. 
This was done only in the header file (server_operations.h).

Attached is a patch that renames all occurances of server_sessions_get_by_id to 
server_sessions_get_by_ncid

cheers
Tobi

Original issue reported on code.google.com by [email protected] on 28 Mar 2014 at 9:52

Attachments:

Segfault during set-current-datetime (cfgsystem)

From debug output of mod_netconf during RPC call:

[Sat Oct 18 23:36:37 2014] [error] NC_VERB_DEBUG: Writing message (session 
15387): <?xml version="1.0" encoding="UTF-8"?>\n<rpc 
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="17">\n  
<set-current-datetime xmlns="urn:ietf:params:xml:ns:yang:ietf-system">\n    
<current-datetime>20:00</current-datetime>\n  </set-current-datetime>\n</rpc>\n
[Sat Oct 18 23:36:38 2014] [error] NC_VERB_DEBUG: Received message (session 
15387): <?xml version="1.0" encoding="UTF-8"?>\n<rpc-reply 
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="17">\n  
<rpc-error>\n    <error-type>application</error-type>\n    
<error-tag>operation-failed</error-tag>\n    
<error-severity>error</error-severity>\n    <error-message>agent-server 
communication failed.</error-message>\n  </rpc-error>\n</rpc-reply>\n

From /var/log/messages:
Oct 18 23:36:37 netopeer-gui netopeer-server[11434]: Calling 
set-current-datetime RPC function
Oct 18 23:36:38 netopeer-gui kernel: netopeer-server[11434]: segfault at 9 ip 
00007fdd1934a72b sp 00007fff15b70130 error 4 in cfgsystem.so[7fdd19347000+d000]
Oct 18 23:36:38 netopeer-gui netopeer-agent[15387]: comm_operation: 
communication failed, response mismatch - sending 5, but received 0.

Original issue reported on code.google.com by [email protected] on 18 Oct 2014 at 9:53

[Bug report] Callhome with TLS

Hi,

Actually, the callhome with TLS does not work now. Because the callhome_client->transport is not updated to NC_TRANSPORT_TLS. So I fix this issue as the following:

 server/src/netconf_server_transapi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/netconf_server_transapi.c b/server/src/netconf_server_transapi.c
index 205c5ad..0196f89 100644
--- a/server/src/netconf_server_transapi.c
+++ b/server/src/netconf_server_transapi.c
@@ -407,7 +407,7 @@ static void* app_loop(void* app_v) {

    nc_verb_verbose("Starting Call Home thread (%s).", app->name);

-   nc_session_transport(NC_TRANSPORT_SSH);
+   nc_session_transport(app->transport);

    for (;;) {
        pthread_testcancel();
@@ -429,6 +429,7 @@ static void* app_loop(void* app_v) {
        for (;;) {
            for (i = 0; i < app->rec_count; ++i) {
                if ((app->client = sock_connect(cur_server->address, cur_server->port)) != NULL) {
+                   app->client->transport = app->transport;
                    break;
                }
                sleep(app->rec_interval);

./configure error for transAPI/cfgsystem

Hi,
I need the augeas package. So, where is the package to download and what is version?

[root@CentOS-6 cfgsystem]# yum -y install augeas-libs
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Package augeas-libs-0.9.0-1.el6.x86_64 already installed and latest version
Nothing to do

Thanks

configure: error: Package requirements (augeas >= 1.0.0) were not met:

No package 'augeas' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables AUGEAS_CFLAGS
and AUGEAS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.