Code Monkey home page Code Monkey logo

of-config's People

Contributors

cejkato2 avatar michalvasko avatar rkrejci avatar snrism 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

Watchers

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

of-config's Issues

ovsdb information and the ofconfig information does not match

Hello!
use “sudo ./ovs-vsctl show” command:

mininet@sdn:~/ofconfig/openvswitch-2.3.1/utilities$ sudo ./ovs-vsctl show                       6cd4d5de-b98f-478f-8f5c-75245c6e0898
    Bridge "br1"
        Port "br1"
            Interface "br1"
                type: internal
        Port "gre1"
            Interface "gre1"
                type: gre
                options: {remote_ip="192.168.1.11"}
    Bridge "br0"
        Port "eth1"
            Interface "eth1"
        Port "br0"
            Interface "br0"
                type: internal
    Bridge ofc-bridge
        fail_mode: secure

use "get-config running"

<capable-switch xmlns="urn:onf:config:yang">
    <id>openvswitch</id>
    <resources>
      <port>
        <name>eth1</name>
        <configuration>
          <admin-state>up</admin-state>
          <no-receive>false</no-receive>
          <no-forward>false</no-forward>
          <no-packet-in>false</no-packet-in>
        </configuration>
        <features>
          <advertised>
            <rate>10Mb-HD</rate>
            <rate>10Mb-FD</rate>
            <rate>100Mb-HD</rate>
            <rate>100Mb-FD</rate>
            <rate>1Gb-FD</rate>
            <auto-negotiate>true</auto-negotiate>
            <medium>copper</medium>
            <pause>unsupported</pause>
          </advertised>
        </features>
      </port>
      <port>
        <name>br0</name>
        <configuration>
          <admin-state>up</admin-state>
          <no-receive>false</no-receive>
          <no-forward>false</no-forward>
          <no-packet-in>false</no-packet-in>
        </configuration>
      </port>
      <port>
        <name>br1</name>
        <configuration>
          <admin-state>up</admin-state>
          <no-receive>false</no-receive>
          <no-forward>false</no-forward>
          <no-packet-in>false</no-packet-in>
        </configuration>
      </port>
      <port>
        <name>gre1</name>
        <configuration>
          <admin-state>up</admin-state>
          <no-receive>false</no-receive>
          <no-forward>false</no-forward>
          <no-packet-in>false</no-packet-in>
        </configuration>
      </port>
    </resources>
    <logical-switches>
      <switch>
        <id>br0</id>
        <datapath-id>00:00:00:0c:29:67:ba:20</datapath-id>
        <resources>
          <port>eth1</port>
          <port>br0</port>
        </resources>
      </switch>
      <switch>
        <id>br1</id>
        <datapath-id>00:00:b2:7b:6b:30:6a:4a</datapath-id>
        <resources>
          <port>br1</port>
          <port>gre1</port>
        </resources>
      </switch>
      <switch>
        <id>ofc-bridge</id>
        <datapath-id>00:01:02:03:04:05:06:07</datapath-id>
        <lost-connection-behavior>failSecureMode</lost-connection-behavior>
      </switch>
    </logical-switches>
  </capable-switch>

in of-conf result.can't find tunnel configure

Thanks,

ovs-data.c:303:32: error: incompatible type for argument 2 of ‘memcpy’

I get the following error when building OF-config from source, both using 2.5.0-LTS or latest commit of OVS, on Ubuntu 15.10:

ovs-data.c:303:32: error: incompatible type for argument 2 of ‘memcpy’
             memcpy(pm.hw_addr, pp.hw_addr, ETH_ADDR_LEN);
                                ^
In file included from /usr/include/features.h:364:0,
                 from /usr/include/assert.h:35,
                 from ovs-data.c:22:

Output of configure:

root@opendl:~/of-config# ./boot.sh
root@opendl:~/of-config# ./configure --with-ovs-srcdir=/root/ovs PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for sshd... /usr/sbin/sshd
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking if compiler needs -Werror to reject unknown flags... no
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
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBNETCONF... yes
checking for library containing nc_init... none required
checking for library containing ncntf_dispatch_receive... none required
checking for library containing shm_open... -lrt
checking for pkg-config... /usr/bin/pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking for library containing ovsrec_init... -lopenvswitch
checking for xml2-config... xml2-config
checking for LIBDBUS... yes
checking for library containing dbus_bus_get... none required
checking for existence of D-Bus configuration directory /etc/dbus-1/system.d/... ok
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking dynamic-string.h usability... yes
checking dynamic-string.h presence... yes
checking for dynamic-string.h... yes
checking ovsdb-idl-provider.h usability... yes
checking ovsdb-idl-provider.h presence... yes
checking for ovsdb-idl-provider.h... yes
checking vlog.h usability... yes
checking vlog.h presence... yes
checking for vlog.h... yes
checking vswitch-idl.h usability... yes
checking vswitch-idl.h presence... yes
checking for vswitch-idl.h... yes
checking linux/if_ether.h usability... yes
checking linux/if_ether.h presence... yes
checking for linux/if_ether.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for int64_t... yes
checking for strdup... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/org.opennetworking.ofc.server.service
config.status: creating model/Makefile
config.status: creating server/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands


------------------------------------------------------------------------
of-config 0.0.1
------------------------------------------------------------------------


Configuration Options Summary:

  ASM.(32 bit only)..:
  Static binary......:

Documentation..........:

Compilation............: make (or gmake)
  CPPFLAGS.............: -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include  -I/usr/local/include  -I/root/ovs/lib/ -I/root/ovs/include/ -I/root/ovs/include/openvswitch/
  CFLAGS...............:   -Wall -O3 -pthread  -I/usr/include/libxml2
  LDFLAGS..............:  -L/root/ovs/lib/.libs/
  LIBS.................: -ldbus-1  -L/usr/local/lib -lnetconf    -lxml2

Installation...........: make install (as root if needed, with 'su' or 'sudo')
  prefix...............: /usr/local

Full make output:

root@opendl:~/of-config# make
make  all-recursive
make[1]: Entering directory '/root/of-config'
Making all in server
make[2]: Entering directory '/root/of-config/server'
depbase=`echo ofconfig-datastore.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..   -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include  -I/usr/local/include  -I/root/ovs/lib/ -I/root/ovs/include/ -I/root/ovs/include/openvswitch/  -Wall -O3 -pthread  -I/usr/include/libxml2  -MT ofconfig-datastore.o -MD -MP -MF $depbase.Tpo -c -o ofconfig-datastore.o ofconfig-datastore.c &&\
mv -f $depbase.Tpo $depbase.Po
ofconfig-datastore.c: In function ‘ofcds_init’:
ofconfig-datastore.c:79:9: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
         asprintf(&ovsdb_path, "unix:%s/db.sock", ovs_rundir());
         ^
ofconfig-datastore.c: In function ‘ofcds_free’:
ofconfig-datastore.c:116:9: warning: ignoring return value of ‘truncate’, declared with attribute warn_unused_result [-Wunused-result]
         truncate(OFC_DATADIR "/startup.xml", 0);
         ^
depbase=`echo ovs-data.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..   -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include  -I/usr/local/include  -I/root/ovs/lib/ -I/root/ovs/include/ -I/root/ovs/include/openvswitch/  -Wall -O3 -pthread  -I/usr/include/libxml2  -MT ovs-data.o -MD -MP -MF $depbase.Tpo -c -o ovs-data.o ovs-data.c &&\
mv -f $depbase.Tpo $depbase.Po
ovs-data.c: In function ‘of_mod_port_cfg_internal’:
ovs-data.c:284:10: warning: implicit declaration of function ‘ofpbuf_data’ [-Wimplicit-function-declaration]
     oh = ofpbuf_data(reply);
          ^
ovs-data.c:284:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     oh = ofpbuf_data(reply);
        ^
ovs-data.c:303:20: error: incompatible type for argument 1 of ‘memcpy’
             memcpy(pm.hw_addr, pp.hw_addr, ETH_ADDR_LEN);
                    ^
In file included from /usr/include/features.h:364:0,
                 from /usr/include/assert.h:35,
                 from ovs-data.c:22:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:1: note: expected ‘void * restrict’ but argument is of type ‘struct eth_addr’
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
ovs-data.c:303:32: error: incompatible type for argument 2 of ‘memcpy’
             memcpy(pm.hw_addr, pp.hw_addr, ETH_ADDR_LEN);
                                ^
In file included from /usr/include/features.h:364:0,
                 from /usr/include/assert.h:35,
                 from ovs-data.c:22:
/usr/include/x86_64-linux-gnu/bits/string3.h:50:1: note: expected ‘const void * restrict’ but argument is of type ‘struct eth_addr’
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
ovs-data.c:319:43: warning: implicit declaration of function ‘ofpbuf_size’ [-Wimplicit-function-declaration]
                                           ofpbuf_size(reply), 2);
                                           ^
ovs-data.c:318:43: warning: passing argument 1 of ‘ofp_to_string’ makes pointer from integer without a cast [-Wint-conversion]
                     oferr = ofp_to_string(ofpbuf_data(reply),
                                           ^
In file included from ovs-data.c:46:0:
/root/ovs/lib/ofp-print.h:42:7: note: expected ‘const void *’ but argument is of type ‘int’
 char *ofp_to_string(const void *, size_t, int verbosity);
       ^
ovs-data.c: In function ‘of_get_port_byname’:
ovs-data.c:557:8: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     oh = ofpbuf_data(reply);
        ^
ovs-data.c: In function ‘txn_add_owned_certificate’:
ovs-data.c:3292:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, "-----BEGIN ", 11);
     ^
ovs-data.c:3293:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, key_type, strlen(key_type));
     ^
ovs-data.c:3294:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, " PRIVATE KEY-----\n", 18);
     ^
ovs-data.c:3295:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, key_data, strlen(key_data));
     ^
ovs-data.c:3296:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, "\n-----END ", 10);
     ^
ovs-data.c:3297:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, key_type, strlen(key_type));
     ^
ovs-data.c: In function ‘write_cert’:
ovs-data.c:3173:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, "-----BEGIN CERTIFICATE-----\n", 28);
     ^
ovs-data.c:3174:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, cert, strlen(cert));
     ^
ovs-data.c: In function ‘txn_mod_own_cert_key_data’:
ovs-data.c:3644:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, pem_start, 32);
     ^
ovs-data.c:3645:5: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
     write(fd, data, xmlStrlen(data));
     ^
ovs-data.c: In function ‘txn_add_contr’:
ovs-data.c:4181:5: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
     asprintf(&target, "%s:%s%s%s", proto, ip, port ? ":" : "",
     ^
ovs-data.c: In function ‘txn_mod_contr_target’:
ovs-data.c:4330:13: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
             asprintf(&aux, "%s:%s", contr->target, value);
             ^
ovs-data.c:4350:17: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
                 asprintf(&aux, "xxx:%s:%s", value, p + 1);
                 ^
ovs-data.c:4352:17: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
                 asprintf(&aux, "xxx:%s", value);
                 ^
Makefile:471: recipe for target 'ovs-data.o' failed
make[2]: *** [ovs-data.o] Error 1
make[2]: Leaving directory '/root/of-config/server'
Makefile:426: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/of-config'
Makefile:358: recipe for target 'all' failed
make: *** [all] Error 2

Problem when getting or editing configuration

Hi. I'm getting a very weird error when trying to get or edit configuration from netopeer-cli. Please, some help.

The connection process is OK.

CLIENT

netconf> connect --login ubuntu localhost
ubuntu@localhost password:
netconf>

OFC-SERVER

ofc-server[1396]: Some message received
ofc-server[1396]: Sending capabilities to agent.
ofc-server[1396]: Some message received
ofc-server[1396]: Created dummy session 1 for user 'ubuntu' (UID 1000)
ofc-server[1396]: New agent ID set to :1.13 (PID 1479, NCSID 1)

Error when trying to get running configuration

CLIENT

netconf> get-config running
NETCONF error: operation-failed (application) - Some unspecified error occurred.
netconf>

OFC-SERVER

ofc-server[1396]: Some message received
ofc-server[1396]: *_rpc_build: Missing <source> parameter of the RPC operation.
ofc-server[1396]: Processing request <?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
  <get-config>
    <source>
      <running/>
    </source>
  </get-config>
</rpc>
ofc-server[1396]: ncds_apply_rpc2all: invalid parameter rpc

Error when trying to edit running configuration

CLIENT

netconf> edit-config --config=create_port_eth1.xml running
NETCONF error: operation-failed (application) - Some unspecified error occurred.
netconf>

OFC-SERVER

ofc-server[1396]: Some message received
ofc-server[1396]: *_rpc_build: Missing <target> parameter of the RPC operation.
ofc-server[1396]: Processing request <?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <capable-switch xmlns="urn:onf:config:yang" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
        <id>openvswitch</id>
        <resources>
          <port nc:operation="create">
            <name>eth1</name>
            <requested-number>100</requested-number>
            <configuration>
              <admin-state>up</admin-state>
              <no-receive>false</no-receive>
              <no-forward>false</no-forward>
              <no-packet-in>false</no-packet-in>
            </configuration>
          </port>
        </resources>
        <logical-switches>
          <switch>
            <id>ofc-bridge</id>
            <resources>
              <port nc:operation="create">eth1</port>
            </resources>
          </switch>
        </logical-switches>
      </capable-switch>
    </config>
  </edit-config>
</rpc>
ofc-server[1396]: ncds_apply_rpc2all: invalid parameter rpc

I thought that this could be caused because of the version of libnetconf, so I checked out the branch 0.9.x of libnetconf and installed everything again. But when I tried to install the ofc-server (make), I got a more weird error:

...
netconf-server-transapi.c:380:20: warning: initialization from incompatible pointer type [enabled by default]
                    .func = callback_srv_netconf_srv_ssh_srv_listen_oneport},
                    ^
netconf-server-transapi.c:380:20: warning: (near initialization for ‘server_clbks.callbacks[0].func’) [enabled by default]
netconf-server-transapi.c:382:20: warning: initialization from incompatible pointer type [enabled by default]
                    .func = callback_srv_netconf_srv_ssh_srv_listen_manyports},
                    ^
netconf-server-transapi.c:382:20: warning: (near initialization for ‘server_clbks.callbacks[1].func’) [enabled by default]
netconf-server-transapi.c:384:20: warning: initialization from incompatible pointer type [enabled by default]
                    .func = callback_srv_netconf_srv_ssh_srv_listen},
                    ^
netconf-server-transapi.c:384:20: warning: (near initialization for ‘server_clbks.callbacks[2].func’) [enabled by default]
netconf-server-transapi.c:403:5: error: unknown field ‘version’ specified in initializer
     .version = 6,
     ^
netconf-server-transapi.c:403:5: warning: initialization makes pointer from integer without a cast [enabled by default]
netconf-server-transapi.c:403:5: warning: (near initialization for ‘server_transapi.init’) [enabled by default]
make[2]: *** [netconf-server-transapi.o] Error 1
make[2]: Leaving directory `/home/ubuntu/of-config/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/of-config'
make: *** [all] Error 2

And to recover from this last error I had to reset the whole installation because when I compile and install again the master branch, running the ofc-server deploys this weird error:

ubuntu@ubuntu-sdn:~/of-config$ sudo ofc-server -v 5 -f
ofc-server[15073]: Shared memory key: -4
ofc-server[15073]: Shared memory ID: 0
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-inet-types.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-yang-types.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-netconf-monitoring.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-netconf-notifications.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model nc-notifications.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model notifications.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-netconf-with-defaults.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-netconf-acm.
ofc-server[15073]: ncds_set_validation: Relax NG validator set (//var/lib/libnetconf//ietf-netconf-acm-data.rng)
ofc-server[15073]: ncds_set_validation: Schematron validator set (//var/lib/libnetconf//ietf-netconf-acm-schematron.xsl)
ofc-server[15073]: Datastore ietf-netconf-acm initiated with ID 8.
ofc-server[15073]: Checking the default Events stream path //var/lib/libnetconf//streams/.
ofc-server[15073]: ncds_features_parse: no feature definitions found in data model ietf-x509-cert-to-name.
ofc-server[15073]: ncds_new_transapi_static: Missing data callbacks in transAPI module description.
ofc-server[15073]: Creating ietf-netconf-server datastore failed.

Please, some help.

configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath

When i install the of-config, i run the comman:
./configure --with-ovs-srcdir=/root/openvswitch-2.3.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
Then i had get the error result:
configure: error: libopenvswitch.a was not found. Try --with-ovs-libpath
But i use this command to find the libopenvswitch.a file:
sudo find / -iname libopenvswitch.a -type f
And i had serch the file:
/lib/libopenvswitch.a
/usr/local/lib/libopenvswitch.a
/home/mx/ovs/lib/.libs/libopenvswitch.a
Please help me to solve this problem , thanks!

Vagrantfile - libssh dependency for libnetconf

I attempted to spin up a Vagrant VM, but it looks like libnetconf is failing during the configure step, with the following:
configure: error: Missing libssh <>=0.6.4

I'm assuming something similar to this may be required.

I had a crack at it, but it looks like the libssh server is currently out of action - 404 on the tarball.

Create a Vagrant and Docker Setup

For easier user setup and access to OF-Config, I suggest setting up a vagrant build containing all requirements for OFC Server and its components running on it.

In addition, a docker container hosted in docker repo with ofc-server will make life easier for anyone trying to replicate ofc-server setup and directly go on to use the server to play with netconf

I am happy to work on a Dockerfile and Vagrantfile with usage instructions (if that helps)

Thanks,
Sriram

OF-config is unmaintained

This project appears to be unmaintained. The last commit was in 2015. Is it time to withdraw the project?

Explicitly specify version of OF-Config

As mentioned in #3 (comment), this project implements OF-CONFIG 1.2.

I think, that it would be useful to explicitly specify OF-Config version in requests and answers.
For example,

<capable-switch xmlns="urn:onf:config:yang"> => <capable-switch xmlns="urn:onf:of12:config:yang">

Question about netopeer, starting daemons, and ofc-server error

Hi,
Newbie question..Any help is appreciated

I managed to get the ofc-server running, but wasn't sure on the following:
QN1: netopeer installation requirements
QN2: ofc-server connection to ofc-bridge
QN3: required steps to start all needed daemons and clients:

QN1: Netopeer Installation:
Do I have to install the netopeer/server as well or will netopeer-cli suffice? my initial understanding from README was, netopeer is only used for cli and it will talk to libnetconf (which will run the netconf server)?
++ If yes, can you tell me the setup for libnetconf and how to start the netconf server and how to connect from netopeer-cli?
++ If no, can you please clarify on the netopeer & netconf server setup?

QN2: I wasn't entirely sure on the correct order to start all daemons. Currently my ofc-server is running and is connected to OVSDB, but I get an error on the connection to ofc-bridge. My ovs is installed correctly and I am able to see a default bridge named 'ofc-bridge' is added. Then, when I start ofc-server -v 3 -f , i get the following:

ofc-server[7089]: Shared memory key: -4
ofc-server[7089]: Shared memory ID: 163840
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-inet-types.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-yang-types.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-netconf-monitoring.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-netconf-notifications.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model nc-notifications.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model notifications.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-netconf-with-defaults.
ofc-server[7089]: Checking the default Events stream path //var/lib/libnetconf//streams/.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model ietf-x509-cert-to-name.
ofc-server[7089]: NACM turned off, module 'ietf-netconf-acm' is not available for import from 'ietf-netconf-server'.
ofc-server[7089]: ncds_new_internal: Relax NG validator set (/usr/local/var/ofconfig/ietf-netconf-server/ietf-netconf-server-config.rng)
ofc-server[7089]: ncds_new_internal: Schematron validator set (/usr/local/var/ofconfig/ietf-netconf-server/ietf-netconf-server-schematron.xsl)
ofc-server[7089]: Datastore ietf-netconf-server initiated with ID 1804289384.
ofc-server[7089]: ncds_features_parse: no feature definitions found in data model of-config.
ofc-server[7089]: ncds_new_internal: Relax NG validator set (/usr/local/var/ofconfig/of-config/of-config-config.rng)
ofc-server[7089]: ncds_new_internal: Schematron validator set (/usr/local/var/ofconfig/of-config/of-config-schematron.xsl)
ofc-server[7089]: Try to synchronize OVSDB.
2015-04-10T23:05:37Z|00001|reconnect|INFO|unix://var/run/openvswitch/db.sock: connecting...
2015-04-10T23:05:37Z|00002|reconnect|INFO|unix://var/run/openvswitch/db.sock: connected
ofc-server[7089]: OF-CONFIG datastore initialized.
ofc-server[7089]: Datastore of-config initiated with ID 846930887.
ofc-server[7089]: Setting default configuration for ietf-netconf-server module
ofc-server[7089]: callback_srv_netconf_srv_ssh_srv_listen_oneport: port 830
ofc-server[7089]: callback_srv_netconf_srv_ssh_srv_listen: started sshd (PID 7090)
ofc-server[7089]: OFC COPY-CONFIG (from to running)
ofc-server[7089]: Deleting all OVSDB content
ofc-server[7089]: OVSDB transaction successful
ofc-server[7089]: OVSDB unchanged
Could not load host key: /etc/ssh/ssh_host_ed25519_key
ofc-server[7089]: OFC COPY-CONFIG (from startup to running)
ofc-server[7089]: Creating the node capable-switch
ofc-server[7089]: Creating the node id
ofc-server[7089]: Creating the node resources
ofc-server[7089]: Creating the node port
ofc-server[7089]: Creating the node logical-switches
ofc-server[7089]: Creating the node switch
ofc-server[7089]: OVSDB transaction successful
ofc-server[7089]: OpenFlow: connecting to unix://var/run/openvswitch/ofc-bridge.mgmt
ofc-server[7089]: OpenFlow: ofc-bridge: failed to connect to socket (Connection reset by peer).
ofc-server[7089]: OpenFlow: connecting to unix://var/run/openvswitch/ofc-bridge.mgmt
2015-04-10T23:05:38Z|00003|timeval|WARN|Unreasonably long 1001ms poll interval (0ms user, -1ms system)
ofc-server[7089]: ovs|00003|timeval|WARN|Unreasonably long 1001ms poll interval (0ms user, -1ms system)
2015-04-10T23:05:38Z|00004|timeval|WARN|faults: 12 minor, 0 major
ofc-server[7089]: ovs|00004|timeval|WARN|faults: 12 minor, 0 major
2015-04-10T23:05:38Z|00005|timeval|WARN|context switches: 1 voluntary, 1 involuntary
ofc-server[7089]: ovs|00005|timeval|WARN|context switches: 1 voluntary, 1 involuntary
2015-04-10T23:05:38Z|00006|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=27900043:
ofc-server[7089]: ovs|00006|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=27900043:
2015-04-10T23:05:38Z|00007|coverage|INFO|txn_unchanged 0.0/sec 0.000/sec 0.0000/sec total: 1
ofc-server[7089]: ovs|00007|coverage|INFO|txn_unchanged 0.0/sec 0.000/sec 0.0000/sec total: 1
2015-04-10T23:05:38Z|00008|coverage|INFO|txn_incomplete 0.0/sec 0.000/sec 0.0000/sec total: 3
ofc-server[7089]: ovs|00008|coverage|INFO|txn_incomplete 0.0/sec 0.000/sec 0.0000/sec total: 3
2015-04-10T23:05:38Z|00009|coverage|INFO|txn_success 0.0/sec 0.000/sec 0.0000/sec total: 2
ofc-server[7089]: ovs|00009|coverage|INFO|txn_success 0.0/sec 0.000/sec 0.0000/sec total: 2
2015-04-10T23:05:38Z|00010|coverage|INFO|poll_fd_wait 0.0/sec 0.000/sec 0.0000/sec total: 16
ofc-server[7089]: ovs|00010|coverage|INFO|poll_fd_wait 0.0/sec 0.000/sec 0.0000/sec total: 16
2015-04-10T23:05:38Z|00011|coverage|INFO|poll_zero_timeout 0.0/sec 0.000/sec 0.0000/sec total: 2
ofc-server[7089]: ovs|00011|coverage|INFO|poll_zero_timeout 0.0/sec 0.000/sec 0.0000/sec total: 2
2015-04-10T23:05:38Z|00012|coverage|INFO|util_xalloc 0.0/sec 0.000/sec 0.0000/sec total: 4064
ofc-server[7089]: ovs|00012|coverage|INFO|util_xalloc 0.0/sec 0.000/sec 0.0000/sec total: 4064
2015-04-10T23:05:38Z|00013|coverage|INFO|vconn_open 0.0/sec 0.000/sec 0.0000/sec total: 4
ofc-server[7089]: ovs|00013|coverage|INFO|vconn_open 0.0/sec 0.000/sec 0.0000/sec total: 4
2015-04-10T23:05:38Z|00014|coverage|INFO|vconn_sent 0.0/sec 0.000/sec 0.0000/sec total: 2
ofc-server[7089]: ovs|00014|coverage|INFO|vconn_sent 0.0/sec 0.000/sec 0.0000/sec total: 2
2015-04-10T23:05:38Z|00015|coverage|INFO|hmap_pathological 0.0/sec 0.000/sec 0.0000/sec total: 21
ofc-server[7089]: ovs|00015|coverage|INFO|hmap_pathological 0.0/sec 0.000/sec 0.0000/sec total: 21
2015-04-10T23:05:38Z|00016|coverage|INFO|hmap_expand 0.0/sec 0.000/sec 0.0000/sec total: 94
ofc-server[7089]: ovs|00016|coverage|INFO|hmap_expand 0.0/sec 0.000/sec 0.0000/sec total: 94
2015-04-10T23:05:38Z|00017|coverage|INFO|stream_open 0.0/sec 0.000/sec 0.0000/sec total: 5
ofc-server[7089]: ovs|00017|coverage|INFO|stream_open 0.0/sec 0.000/sec 0.0000/sec total: 5
2015-04-10T23:05:38Z|00018|coverage|INFO|47 events never hit
ofc-server[7089]: ovs|00018|coverage|INFO|47 events never hit
ofc-server[7089]: OpenFlow: ofc-bridge: successful connection.
ofc-server[7089]: Transapi calling callback /A:capable-switch with op ADD.
ofc-server[7089]: OF-CONFIG data affected.
ofc-server[7089]: OF-CONFIG server successfully initialized.

The log indicates that the ofc-server is connected to the ovsdb, but it is unable to talk to ofc-bridge. Any conf required in ovs to make ofc-bridge listen to of-config calls?

QN3: Steps to start all daemons and issue commands:
++ Run OVS (which starts ovsdb internall and configures ofc-bridge)
++ Run ofc-server with ofc-server -v 3 -f
++ Start netconf server via libnetconf?? Not sure.. Or start the netopeer/server??
++ Setup netopeer cli and connect to the netconf server
++ Write XML files (currently use the netconf-tests folder samples) to issue commands..

Is this correct?

Thanks,
Sriram

Custom YANG models

Hi all,
I installed of-config for working with mininet emulated network. Everything works correct, ofc-server collect data about nodes running in mininet, but what I have to do is to use another YANG data model (I have to use te-topology in my project). Is there any possibility to change model used by server?

I would be grateful for any advices,
Regards,
Ola

Openflow entries

Hi,

I was was looking at the OF-config spec as well as the openvswitch commands. I am not clear about whether this of-config implementation supports the ovs-ofctl commands especially those related to creation of flow entries like
ovs-ofctl add-flow br0 priority=200,in_port=1,actions=output:2

I don't see an example of this in the netconf-tests. If there is any other user documentation/ examples that can help me with this let me know.

I understand this is not an issue. But I could not find any other forum for this.

Thanks,
Abhijeet

Question: Modify of-config without OVSDB

Hi,
I want to modify this project without OVSDB. Because I am running OpenFlow switch. I will change OVSDB function to OpenFlow function.
Will be the matter concrete and feasible?
Besides, Can I use netopeer-server to install of-config module?

Thanks,
Jack

Cannot obtain tunnel-related information

I am trying to setup GRE tunnel with of-config. However, I cannot get information about tunnel setup in openvswitch:

# ovs-vsctl add-br my-br
# ovs-vsctl set Interface my-br type=gre
# ovs-vsctl set Interface my-br options="df_default="true", in_key=flow, local_ip="0", out_key=flow, remote_ip=flow"
# ovs-vsctl show
aebe82a0-6993-4786-a896-ad7e16cde7d7
    Bridge my-br
        Port my-br
            Interface my-br
                type: gre
                options: {df_default="true", in_key=flow, local_ip="0", out_key=flow, remote_ip=flow}
    Bridge ofc-bridge
        fail_mode: secure
        Port ofc-bridge
            Interface ofc-bridge
                type: internal

Get-config output:

<?xml version='1.0' encoding='UTF-8'?>
<ns0:capable-switch xmlns:ns0="urn:onf:config:yang">
      <ns0:id>openvswitch</ns0:id>
      <ns0:resources>
        <ns0:port>
          <ns0:name>my-br</ns0:name>
          <ns0:configuration>
            <ns0:admin-state>down</ns0:admin-state>
            <ns0:no-receive>false</ns0:no-receive>
            <ns0:no-forward>false</ns0:no-forward>
            <ns0:no-packet-in>false</ns0:no-packet-in>
          </ns0:configuration>
        </ns0:port>
        <ns0:port>
          <ns0:name>ofc-bridge</ns0:name>
          <ns0:requested-number>666</ns0:requested-number>
          <ns0:configuration>
            <ns0:admin-state>down</ns0:admin-state>
            <ns0:no-receive>false</ns0:no-receive>
            <ns0:no-forward>false</ns0:no-forward>
            <ns0:no-packet-in>false</ns0:no-packet-in>
          </ns0:configuration>
        </ns0:port>
      </ns0:resources>
      <ns0:logical-switches>
        <ns0:switch>
          <ns0:id>my-br</ns0:id>
          <ns0:datapath-id>00:00:1e:00:0b:6e:7c:4f</ns0:datapath-id>
          <ns0:resources>
            <ns0:port>my-br</ns0:port>
          </ns0:resources>
        </ns0:switch>
        <ns0:switch>
          <ns0:id>ofc-bridge</ns0:id>
          <ns0:datapath-id>00:01:02:03:04:05:06:07</ns0:datapath-id>
          <ns0:lost-connection-behavior>failSecureMode</ns0:lost-connection-behavior>
          <ns0:resources>
            <ns0:port>ofc-bridge</ns0:port>
          </ns0:resources>
        </ns0:switch>
      </ns0:logical-switches>
    </ns0:capable-switch>

I expect to get more information about my-br tunnel: type, local-endpoint-address, remote-endpoint-address, as mentioned in of-config 1.2 spec...

What I am doing wrong?

The connection between netopeer-cli and ofc-server

There is an error when I use netopeer-cli connecting to ofc-server,as I have started the ofc-server using the conmand "ofc-server -v 3 -f",and the ofc-server starts successfully.

The error shows below:
root@ubuntu:~# netopeer-cli
netconf> connect --port 830 --login root localhost
libnetconf ERROR: Starting the SSH session failed (Socket error: disconnected)
connect: connecting to the localhost:830 as user "root" failed.

How shoul I solve this problem?

configure.ac - configure file issue

I see the following issue when generating configure file. RHEL 6.5. Can these be ignored?

autoconf configure.ac > configure
configure.ac:8: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:21: error: possibly undefined macro: AM_PROG_CC_C_O
configure.ac:25: error: possibly undefined macro: AC_MSG_ERROR
configure.ac:27: error: possibly undefined macro: AC_DEFINE_DIR
configure.ac:29: error: possibly undefined macro: LT_INIT
configure.ac:51: error: possibly undefined macro: AM_CONDITION

The configure file is generated so I tried to execute it. On running the configure see the following issue related to AM_INIT_AUTOMAKE

/configure: line 1819: syntax error near unexpected token foreign' ./configure: line 1819:AM_INIT_AUTOMAKE(foreign subdir-objects)'

Issue create_switch.xml

I have an issue when try to create a new switch with the following command:

netconf> edit-config --config=create_switch.xml running

NETCONF error: operation-failed (application) - Datastore fails to validate (Extra element logical-switches in interleave
)
NETCONF error: operation-failed (application) - Datastore fails to validate (Element capable-switch failed to validate content
)

And server side, have the following error:

ofc-server[20580]: RelaxNG validation on subdatastore 846930887
ofc-server[20580]: subdatastore 846930887 fails to validate

Connect ofc-server to openvswitch from ubuntu repository

I try to run ofc-server on OpenStack compute node with OVS networking.
I successfully compiled ofc-server, pointed it to downloaded openvswitch 2.1.3 sources, as specified in installation manual.
Then I installed openvswitch 2.1.3 package from ubuntu 14.10 repository.
When I try to start ofc-server:

sudo ofc-server --db /var/run/openvswitch/db.sock -f

I get these messages:

2015-03-30T11:15:15Z|00001|reconnect|INFO|/var/run/openvswitch/db.sock: connecting...
2015-03-30T11:15:15Z|00002|reconnect|INFO|/var/run/openvswitch/db.sock: connection attempt failed (Address family not supported by protocol)
2015-03-30T11:15:15Z|00003|reconnect|INFO|/var/run/openvswitch/db.sock: waiting 1 seconds before reconnect
2015-03-30T11:15:16Z|00004|reconnect|INFO|/var/run/openvswitch/db.sock: connecting...
2015-03-30T11:15:16Z|00005|reconnect|INFO|/var/run/openvswitch/db.sock: connection attempt failed (Address family not supported by protocol)
2015-03-30T11:15:16Z|00006|reconnect|INFO|/var/run/openvswitch/db.sock: waiting 2 seconds before reconnect
2015-03-30T11:15:18Z|00007|reconnect|INFO|/var/run/openvswitch/db.sock: connecting...
2015-03-30T11:15:18Z|00008|reconnect|INFO|/var/run/openvswitch/db.sock: connection attempt failed (Address family not supported by protocol)
2015-03-30T11:15:18Z|00009|reconnect|INFO|/var/run/openvswitch/db.sock: waiting 4 seconds before reconnect
...

Can you prompt me, what could be the problem?
Is it possible to connect ofc-server to openvswitch from ubuntu repository at all?

Errors in ovs-data.c using make

Ubuntu 12.04 - 64 bits
OVS 2.3.1

Configure runs ok but make not:

make

make all-recursive
make[1]: Entrando no diretório /root/of-config' Making all in server make[2]: Entrando no diretório /root/of-config/server'
depbase=echo ovs-data.o | sed 's|[^/]*$|.deps/&|;s|\.o$||';
gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/local/include -I/root/openvswitch-2.3.1/lib/ -I/root/openvswitch-2.3.1/include/ -I/root/openvswitch-2.3.1/include/openvswitch/ -Wall -O3 -pthread -I/usr/include/libxml2 -MT ovs-data.o -MD -MP -MF $depbase.Tpo -c -o ovs-data.o ovs-data.c &&
mv -f $depbase.Tpo $depbase.Po
ovs-data.c:94:6: erro: ‘ADVERTISED_40000baseKR4_Full’ undeclared here (not in a function)
ovs-data.c:95:6: erro: ‘ADVERTISED_40000baseCR4_Full’ undeclared here (not in a function)
ovs-data.c:96:6: erro: ‘ADVERTISED_40000baseSR4_Full’ undeclared here (not in a function)
ovs-data.c:97:6: erro: ‘ADVERTISED_40000baseLR4_Full’ undeclared here (not in a function)
ovs-data.c: Na função ‘txn_mod_contr_target’:
ovs-data.c:4330:21: aviso: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:4350:25: aviso: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:4352:25: aviso: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c: Na função ‘txn_add_contr’:
ovs-data.c:4181:13: aviso: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c: Na função ‘write_cert’:
ovs-data.c:3173:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3174:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c: Na função ‘txn_mod_own_cert_key_data’:
ovs-data.c:3644:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3645:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c: Na função ‘txn_add_owned_certificate’:
ovs-data.c:3292:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3293:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3294:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3295:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3296:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
ovs-data.c:3297:10: aviso: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
make[2]: ** [ovs-data.o] Erro 1
make[2]: Saindo do diretório /root/of-config/server' make[1]: ** [all-recursive] Erro 1 make[1]: Saindo do diretório /root/of-config'
make: ** [all] Erro 2

configure log:

root@mininet:~/of-config# ./configure --with-ovs-srcdir=/root/openvswitch-2.3.1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for sshd... /usr/sbin/sshd
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking if compiler needs -Werror to reject unknown flags... no
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... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBNETCONF... yes
checking for library containing nc_init... none required
checking for library containing ncntf_dispatch_receive... none required
checking for library containing shm_open... -lrt
checking for pkg-config... /usr/bin/pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking for library containing ovsrec_init... -lopenvswitch
checking for xml2-config... xml2-config
checking for LIBDBUS... yes
checking for library containing dbus_bus_get... none required
checking for existence of D-Bus configuration directory /etc/dbus-1/system.d/... ok
checking stdbool.h usability... yes
checking stdbool.h presence... yes
checking for stdbool.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking dynamic-string.h usability... yes
checking dynamic-string.h presence... yes
checking for dynamic-string.h... yes
checking ovsdb-idl-provider.h usability... yes
checking ovsdb-idl-provider.h presence... yes
checking for ovsdb-idl-provider.h... yes
checking vlog.h usability... yes
checking vlog.h presence... yes
checking for vlog.h... yes
checking vswitch-idl.h usability... yes
checking vswitch-idl.h presence... yes
checking for vswitch-idl.h... yes
checking linux/if_ether.h usability... yes
checking linux/if_ether.h presence... yes
checking for linux/if_ether.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking for int64_t... yes
checking for strdup... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating config/org.opennetworking.ofc.server.service
config.status: creating model/Makefile
config.status: creating server/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands


of-config 0.0.1

Configuration Options Summary:

ASM.(32 bit only)..:
Static binary......:

Documentation..........:

Compilation............: make (or gmake)
CPPFLAGS.............: -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/local/include -I/root/openvswitch-2.3.1/lib/ -I/root/openvswitch-2.3.1/include/ -I/root/openvswitch-2.3.1/include/openvswitch/
CFLAGS...............: -Wall -O3 -pthread -I/usr/include/libxml2
LDFLAGS..............: -L/root/openvswitch-2.3.1/lib/.libs/
LIBS.................: -ldbus-1 -lpthread -lrt -L/usr/local/lib -lnetconf -L/usr/lib/x86_64-linux-gnu -lxml2

Installation...........: make install (as root if needed, with 'su' or 'sudo')
prefix...............: /usr/local

Cannot edit config candidate of OVS by of-config

Hello!
I'm trying to setup configuration of openvswitch use netopeer-cli for candidate,encountered an RelaxNG validation error,but to running is OK,can you help me please

ofc-server[1951]: Some message received
ofc-server[1951]: Processing request <?xml version="1.0" encoding="UTF-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="4">
  <edit-config>
    <target>
      <candidate/>
    </target>
    <default-operation>merge</default-operation>
    <config>
      <capable-switch xmlns="urn:onf:config:yang">
        <id>openvswitch</id>
        <logical-switches>
          <switch>
            <id>ofc-bridge</id>
            <controllers>
              <controller>
                <id>my_controller</id>
                <ip-address>10.1.2.2</ip-address>
                <port>12300</port>
                <local-ip-address>10.1.2.3</local-ip-address>
                <protocol>tls</protocol>
              </controller>
            </controllers>
          </switch>
        </logical-switches>
      </capable-switch>
    </config>
  </edit-config>
</rpc>
ofc-server[1951]: edit-config: default merge
ofc-server[1951]: Creating the node capable-switch
ofc-server[1951]: RelaxNG validation on subdatastore 955394850
ofc-server[1951]: subdatastore 955394850 fails to validate
ofc-server[1951]: OFC COPY-CONFIG (from <config> to candidate)

Cannot edit config of OVS by of-config

Hello!
I'm trying to setup configuration of openvswitch with Ryu of_config library:

from ryu.base import app_manager
from ryu.lib import hub
from ryu.lib.of_config import capable_switch

HOST = '127.0.0.1'
PORT = 830
USERNAME = 'of-config'
PASSWORD = 'password'

class OFConfigClient(app_manager.RyuApp):
        def __init__(self, *args, **kwargs):
                super(OFConfigClient, self).__init__(*args, **kwargs)
                self.switch = capable_switch.OFCapableSwitch(
                        host=HOST, port=PORT, username=USERNAME, password=PASSWORD,
                        unknown_host_cb=lambda host, fingerprint: True)

        def get_set(self):
                csw = self.switch.get_config('running')
                self.switch.edit_config('running', csw)

if __name__ == '__main__':
        client = OFConfigClient()
        client.get_set()

This script get configuration from OVS by using of-config and set it back in unchanged state.
When I run it, I get this traceback:

Traceback (most recent call last):
  File "test_ovs_ofconfig.py", line 23, in <module>
    client.get_set()
  File "test_ovs_ofconfig.py", line 19, in get_set
    self.switch.edit_config('running', csw)
  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/of_config/capable_switch.py", line 118, in edit_config
    self.raw_edit_config(target, xml, default_operation)
  File "/usr/local/lib/python2.7/dist-packages/ryu/lib/of_config/capable_switch.py", line 108, in raw_edit_config
    default_operation, test_option, error_option)
  File "/usr/local/lib/python2.7/dist-packages/ryu/contrib/ncclient/manager.py", line 78, in wrapper
    return self.execute(op_cls, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/ryu/contrib/ncclient/manager.py", line 132, in execute
    raise_mode=self._raise_mode).request(*args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/ryu/contrib/ncclient/operations/edit.py", line 58, in request
    return self._request(node)
  File "/usr/local/lib/python2.7/dist-packages/ryu/contrib/ncclient/operations/rpc.py", line 289, in _request
    raise self._reply.error
ncclient.operations.rpc.RPCError: Some unspecified error occurred.

Simple reading of configuration works just fine.

Question: How to trigger the callback:ofc_status_clb

Hi,
I can get/edit config using ofcds_getconfig and ofcds_editconfig.
netopeer-cli: get-config --filter=ovs.xml running
edit-config --config=create_switch.xml running

How to get status data using ofc_get_state_data??

Thanks

Question: resource-id or requested-number about OF-CONFIG 1.2 spec OpenFlow Port

Hi,
Who is know about OF-CONFIG 1.2 spec OpenFlow Port?
I cannot found requested-number leaf on OF-CONFIG 1.2 spec.
I found resource-id leaf on OF-CONFIG 1.2 spec.

In of-config.yang file:
leaf requested-number {
type uint64 {
range "1..65279";
}
description
"This is the requested OpenFlow Port number for this interface. The switch
is expected to try and use the value of this lead as the port number for
the interface. If the switch is unable to use the requested value or if
this leaf is not present, it will choose a free port to use.";
}

Create Usage Instructions for New Users

For starters like me, I found the netconf-tests scripts to be very useful. However, I have previously worked on OpenFlow and hence it was easy for me to figure out which files to try out.

A tutorial file with instruction to execute simple netconf scripts and the order in which they should be executed will help users big time, example like this https://github.com/openvswitch/ovs/blob/master/tutorial/Tutorial.md

I believe the README file here https://github.com/openvswitch/of-config/tree/master/netconf-tests has that information. But some additional explanation on the usage will help.

Thanks,
Sriram

ofc-server crash if create logical switch without datapath-id

Hello!
Working with ofc-server, I found that ofc-server crashes without any messages, if I try to create logical switch without datapath-id.
Unfortunately, there is no XML schemas in of-config 1.2 specification, but as mentioned in of-config 1.1.1 spec (p. 27),

This element MUST be present in the NETCONF data store.
If this element is not present in a NETCONF
operation 'create', 'merge' or 'replace' and the parent
element does not exist, a 'data-missing' error is returned.

Steps to reproduce:
create_switch.xml

<capable-switch xmlns="urn:onf:config:yang" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
    <id>openvswitch</id>
    <logical-switches>
      <switch nc:operation="create">
        <id>test-bridge</id>
      </switch>
    </logical-switches>
</capable-switch>

and do edit-config with, for example, netopeer-cli.

Installation and Setup Issues

Hi,

I am trying to setup this installation in my Ubuntu machine, but I am facing some issues:
My setup:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
kernel version: 3.13.0-39-generic

Here are the steps that I followed:

OF-CONFIG Build Requirements

For the list of OF-CONFIG dependencies, I installed the following:
++ apt-get install autoconf automate gcc libtool python-libxml2 libxml2-dev m4 make openssl libssl-dev pkg-config

For OF-CONFIG dependencies, I installed:
++ apt-get install dbus-*dev

I then downloaded the below packages:
++ openvswitch-2.3.1 and pyang-1.4.1

To stick to the INSTALL guide, I downloaded all packages in /root/

For Open vSwitch and libnetconf dependencies, I installed the following:
++ apt-get install libxslt-dev libssh2.1-dev libcurl4-openssl-dev xsltproc

Open vSwitch Installation:

I did the untar and configuration as specified in INSTALL, but I wasn't sure if I need a symlink specification (ln -s /usr/src/kernels/2.6.32-504.8.1.el6.x86_64/ /lib/modules/2.6.32-504.el6.x86_64/build)

I started the ovs-ctl with system-id specification as:
++ /usr/local/share/openvswitch/scripts/ovs-ctl --system-id=random start

OF-CONFIG Installation
pyang: works fine, but
libnetconf installation issues: The default libxml2 installation in ubuntu will not be picked up by lnctool, so I installed "apt-get python-libxml2"

OF-CONFIG configuration steps: After building, installation and configuration, I tried to start ofc-server which throws the following error:

ofc-server[26599]: D-Bus name error (Connection ":1.7" is not allowed to own the service "org.opennetworking.ofc.server" due to security policies in the configuration file)
ofc-server[26599]: Unable to became primary owner of the "org.opennetworking.ofc.server" bus.
ofc-server[26599]: Communication subsystem not initiated.

Kindly let me know what I am missing here.

There is no datapath-id value in custom logical switches

Hello!

I have found, that ofc-server does not provide datapath-id values of manually created bridges:

# ovs-vsctl show
  860c153c-ae27-46f8-9695-bd7c28a5beb1
    Bridge ofc-bridge
        fail_mode: secure
        Port ofc-bridge
            Interface ofc-bridge
                type: system
# ovs-vsctl get Bridge ofc-bridge datapath-id
  "0001020304050607"
# ovs-vsctl get Bridge ofc-bridge other_config:datapath-id
  "0001020304050607"

# ovs-vsctl add-br my-br
# ovs-vsctl get Bridge my-br datapath-id
  "00008ad8fa615a4f"
# ovs-vsctl get Bridge my-br other_config:datapath-id
  ovs-vsctl: no key "datapath-id" in Bridge record "my-br" column other_config

$ netopeer-cli
netconf> connect --login $USER localhost
netconf> get-config running
  Result:
<capable-switch xmlns="urn:onf:config:yang">
    <id>openvswitch</id>
    <resources>
      <port>
        <name>my-br</name>
        <configuration>
          <admin-state>down</admin-state>
          <no-receive>false</no-receive>
          <no-forward>false</no-forward>
          <no-packet-in>false</no-packet-in>
        </configuration>
      </port>
      <port>
        <name>ofc-bridge</name>
        <requested-number>666</requested-number>
        <features>
          <advertised>
            <auto-negotiate>false</auto-negotiate>
            <pause>unsupported</pause>
          </advertised>
        </features>
      </port>
    </resources>
    <logical-switches>
      <switch>
        <id>my-br</id>
        <resources>
          <port>my-br</port>
        </resources>
      </switch>
      <switch>
        <id>ofc-bridge</id>
        <datapath-id>00:01:02:03:04:05:06:07</datapath-id>
        <lost-connection-behavior>failSecureMode</lost-connection-behavior>
        <resources>
          <port>ofc-bridge</port>
        </resources>
      </switch>
    </logical-switches>
  </capable-switch>

So, datapath-id of my-br is not listed in answer from ofc-server.
This behaviour is too unhandy, if I try to make edit-config:

Datastore fails to validate (Element capable-switch failed to validate content)

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.