Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Running netconf examples in python3
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilalta committed Oct 8, 2019
1 parent 7053c6e commit 34fe59a
Show file tree
Hide file tree
Showing 14 changed files with 1,309 additions and 116 deletions.
59 changes: 56 additions & 3 deletions commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $ pyang -f tree topology.yang -o topology.tree
$ pyang -f sample-xml-skeleton --sample-xml-skeleton-annotations topology.yang
$ pyang -f uml topology.yang -o topology.uml
$ java -jar plantuml.jar topology.uml

=== PYANGBIND
$ export PYBINDPLUGIN=`/usr/bin/env python3 -c \
'import pyangbind; import os; print ("{}/plugin".format(os.path.dirname(pyangbind.__file__)))'`
Expand All @@ -25,11 +26,15 @@ $ python3 topology.py
$ python3 connection.py

== NETCONF
Run server:
$ cd /root/OFC_SC472/netconf
$ unzip confd-basic-6.4.linux.x86_64.zip
$ cd confd-basic-6.4.linux.x86_64/
$ ./confd-basic-6.4.linux.x86_64.installer.bin /root/confd/
$ python3 serverTopology.py

In another window, run client:
$ cd /root/OFC_SC472/netconf
$ python3 clientTopology.py

== RESTCONF



Expand All @@ -47,6 +52,54 @@ $ curl -X GET -u onos:rocks --header 'Accept: application/json' http://localhost
$ cd /root/OFC_SC472/onos_api/
$ python3 onos_topology.py

== TAPI


== GRPC


== OPENCONFIG


== APPENDICES

=== CONFD
$ cd /root/OFC_SC472/netconf
$ unzip confd-basic-6.4.linux.x86_64.zip
$ cd confd-basic-6.4.linux.x86_64/
$ ./confd-basic-6.4.linux.x86_64.installer.bin /root/confd/

Data model compilation
$ cd /root/confd/bin/
$ ./confdc -c /root/OFC_SC472/yang/topology.yang

Start ConfD
$ ./confd --foreground -v --addloadpath .

In another terminal, use ConfD-client to populate model
$ cd /root/confd/bin/
$ ./confd_cli
> conf
> topology node node1
> exit
> commit
> exit
> exit

Use ConfD-client to show db
$ ./confd_cli
> conf
> show full-configuration
> exit
> exit

== NETCONF EDIT-CONFIG

Run server:
$ cd /root/OFC_SC472/netconf/connection
$ python3 serverTopologyConnection.py

In another window, run client:
$ cd /root/OFC_SC472/netconf/connection
$ python3 clientConnection.py

42 changes: 0 additions & 42 deletions netconf/clientConfd.py

This file was deleted.

File renamed without changes.
Loading

0 comments on commit 34fe59a

Please sign in to comment.