Page tree

Versions Compared


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


  • Docker container that runs a Netconf server. Follow the instructions posted How to build and run ODTN Emulators?
  • netconf-console tool that is a simulation tool for Netconf client.
  • "target-output-power" node defined in "openconfig-terminal-device.yang" as the operation target node.
  • Running ONOS instance that is able to configure power through two ways.

Assume that we have started an OpenConfig Cassini Emulator which runs a Netconf server in docker as follows:

Code Block
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                      NAMES
20c0298eb652        onosproject/oc-cassini:0.21   "sh /root/script/pus…"   2 hours ago         Up 2 hours          22/tcp, 8080/tcp,>830/tcp   odtn-emulator_openconfig_cassini_1_1

2. Perform Operations

2.1 Config Power by using Netconf tool like netconf-console

So we use the command listed below to send RPC request to the container:


The root node of "openconfig-platform.yang" is "<components>" and its sublist "<component>" contains "<name>" node as its identity. Besides "openconfig-terminal-device.yang" adds node "<optical-channel>" into "<component>" node. "<target-power-config>" is defined as a child node of "<optical-channel>".

2. Perform Operations




2.1.1 Perform <get> Operation


If you want to get the whole components, the content of get-components is:


Code Block
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ca069e53-020a-4201-a9d3-53f4e5534bec">
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <components xmlns="">
        <optical-channel xmlns="">

2.2 ONOS startup and node discovery

This section is the environment for section 2.3 and 2.4.

Firstly, an ONOS instance is started via command "bazel run onos-local -- clean". Secondly, the docker container connects to ONOS via command "onos-netcfg localhost device.json". The content of device.json is:

Code Block
  "devices" : {
    "netconf:" : {
      "basic" : {
      "netconf" : {
        "ip" : "",
        "port" : "11002",
        "username" : "root",
        "password" : "root",
        "idle-timeout" : "0"

Then, we use "onos localhost" to log into ONOS CLI environment and see if the docker container is detected.

Code Block
Welcome to Open Network Operating System (ONOS)!
     ____  _  ______  ____
    / __ \/ |/ / __ \/ __/
   / /_/ /    / /_/ /\ \

Mailing lists:

Come help out! Find out how at:

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'logout' to exit ONOS session.

onf@root > devices                                                                                                                                                   11:54:09
id=netconf:, available=true, local-status=connected 4m53s ago, role=MASTER, type=TERMINAL_DEVICE, mfr=EDGECORE, hw=Cassini, sw=OcNOS, serial=, chassis=1, driver=cassini-ocnos, ipaddress=, locType=none, name=cassini2, port=11002, protocol=NETCONF

2.3 Config Power by using ONOS CLI Command "power-config"

An ONOS command is provided to configure the power of line-side ports.

In ONOS CLI environment, the description for command "power-config" is listed:

Code Block
onf@root > help power-config                                                                                                                                         11:56:39

    Get/Edit the target-output-power for specific optical-channel

        onos:power-config [options] operation connection point [value]

                Netconf Operation including get, edit-config, etc.
        connection point
                target-output-power value. Unit: dBm

                Display this help message
        -j, --json
                Output JSON

This command also supports auto-completion function for each parameter.

Currently, only get and edit-config operations are supported:

Code Block
onf@root > power-config                                                                                                                                              11:56:43
get             lock            unlock          get-config      copy-config     edit-config     kill-session    close-session   delete-config

2.3.1 Perform <get> Operation

Through power-config command, you can get the power value of any line-side port of any optical device, for example,

Code Block
onf@root > power-config get netconf:                                                                                                              11:56:43
The target-output-power value in port 216 on device netconf: is -2.

2.3.2 Perform <edit-config> Operation

Through power-config command, you can modify the power value of any line-side port of any optical device, for example,

Code Block
onf@root > power-config edit-config netconf: -4                                                                                                   12:04:11
onf@root > power-config get netconf:                                                                                                              12:06:01
The target-output-power value in port 216 on device netconf: is -4.

2.4 Config Power on ONOS roadm GUI2 pages