Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1.2 Build your own Dockerfile based on the template

In Dockerfile, The software listed below are installed:

...

You can put all the yang files under directory yang, which will be copied into the docker image. You can also use this Dockerfile which is already avaialble in the ODTN emulator repo.

1.3 Load the YANG files in script import-yangs.sh

...

After yang module installation, ssh into the modules could be listed belowdocker container using the following command,

Code Block
languagebash
titlessh into docker container
docker exec -it <container_name> /bin/bash

After ssh into the docker container, you can list modules as follows:


Code Block
linenumberstrue
root@b2d61bf9014f:~# sysrepoctl -l
Sysrepo schema directory: /etc/sysrepo/yang/
Sysrepo data directory:   /etc/sysrepo/data/
(Do not alter contents of these directories manually)

Module Name                          | Revision   | Conformance | Data Owner          | Permissions | Submodules                    | Enabled Features
-----------------------------------------------------------------------------------------------------------------------------------------------
ietf-netconf-notifications           | 2012-02-06 | Installed   | root:root           | 666         |                               |
ietf-netconf                         | 2011-06-01 | Installed   | root:root           | 666         |                               | writable-running candidate rollback-on-error validate startup xpath url
ietf-netconf-acm                     | 2018-02-14 | Imported    |                     |             |                               |
nc-notifications                     | 2008-07-14 | Installed   | root:root           | 666         |                               |
notifications                        | 2008-07-14 | Installed   | root:root           | 666         |                               |
turing-machine                       | 2013-12-27 | Installed   | root:root           | 666         |                               |
ietf-netconf-with-defaults           | 2011-06-01 | Installed   |                     |             |                               |
ietf-netconf-monitoring              | 2010-10-04 | Installed   | root:root           | 666         |                               |
ietf-yang-library                    | 2018-01-17 | Installed   | root:root           | 666         |                               |
ietf-datastores                      | 2017-08-17 | Imported    |                     |             |                               |
ietf-interfaces                      | 2018-02-20 | Installed   | root:root           | 666         |                               |
iana-if-type                         | 2017-01-19 | Installed   |                     |             |                               |
openconfig-extensions                | 2017-04-11 | Installed   |                     |             |                               |
openconfig-types                     | 2018-05-05 | Installed   |                     |             |                               |
openconfig-yang-types                | 2018-04-24 | Installed   |                     |             |                               |
openconfig-platform-types            | 2018-05-05 | Installed   |                     |             |                               |
openconfig-transport-types           | 2018-05-16 | Installed   |                     |             |                               |
openconfig-alarm-types               | 2018-01-16 | Installed   |                     |             |                               |
openconfig-interfaces                | 2018-04-24 | Installed   | root:root           | 666         |                               |
openconfig-if-ethernet               | 2018-04-10 | Installed   |                     |             |                               |
openconfig-platform                  | 2018-06-03 | Installed   | root:root           | 666         |                               |
openconfig-platform-port             | 2018-01-20 | Installed   |                     |             |                               |
openconfig-platform-transceiver      | 2018-05-15 | Installed   |                     |             |                               |
openconfig-terminal-device           | 2017-07-08 | Installed   | root:root           | 666         |                               |
openconfig-platform-linecard         | 2017-08-03 | Installed   |                     |             |                               |
openconfig-transport-line-common     | 2017-09-08 | Installed   |                     |             |                               |
openconfig-transport-line-protection | 2017-09-08 | Installed   | root:root           | 666         |                               |

...

1.4 Start Netconf server in push-data.sh

In push-data.sh, you should put the data into sysrepo, and start Netconf server.

...

There are two ways to push data into sysrepo.:

  • sysrepocfg: sysrepocfg is the configuration command about sysrepo, you could push init-components data via command like:
Code Block
sysrepocfg --import=init-components.xml --format=xml openconfig-platform

netconf-console

...

: netconf-console is a general Netconf client tool. We can use this command to import config-power XML data:

Code Block
netconf-console --host 127.0.0.1 --port 830 -u root -p root --rpc=/root/script/config-power.xml

...

1.5. Testing via netconf-console

sysrepo and Netopeer2 provide some useful tools for Netconf testing, however, ouside the docker container, we still recommend netconf-console. You can find a set of examples here: PowerConfig configuration via ONOS CLI or NetconfThe basic <get> and <merge> <edit-config> operations are executed by the files under directory emulator-test

...

.

1.6.  Notes about modification in yang files under emulator-oc-cassini directory

You can find some notes about modification in yang files under emulator-oc-cassini yang files here in this link