Versions Compared

Key

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

This page describe how to execute <get> and <edit-config> operations about "target-output-power" XML node via Netconf. There are totally three ways to config power.


Table of Contents

1. Environment Requirement

  • 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.

...

Code Block
languagetext
linenumberstrue
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, 0.0.0.0:11002->830/tcp   odtn-emulator_openconfig_cassini_1_1

2 Execute Operations

2.1 ONOS startup and node discovery

This section is the environment for section 2.3 and 2.4.

...

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

Documentation: wiki.onosproject.org
Tutorials:     tutorials.onosproject.org
Mailing lists: lists.onosproject.org

Come help out! Find out how at: contribute.onosproject.org

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:127.0.0.1:11002, 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=127.0.0.1, locType=none, name=cassini2, port=11002, protocol=NETCONF

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

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

...

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.2.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:127.0.0.1:11002/216                                                                                                              11:56:43
The target-output-power value in port 216 on device netconf:127.0.0.1:11002 is -2.


2.2.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:127.0.0.1:11002/216 -4                                                                                                   12:04:11
onf@root > power-config get netconf:127.0.0.1:11002/216                                                                                                              12:06:01
The target-output-power value in port 216 on device netconf:127.0.0.1:11002 is -4.

2.3 Config Power on

...

Apart from configuring the power in ONOS CLI, the customer view of roadm application also provides the button to do that.

Firstly, we use command "onos localhost app activate roadm" to activate roadm application. Then, open the roadm page http://localhost:8181/onos/ui/#/roadm-gui:

Image Removed

Select one device netconf:127.0.0.1:11002, and click the port icon on the right-top corner, then you can edit the power of its line-side ports on port page http://localhost:8181/onos/ui/#/roadm-gui/roadm-port-gui?devId=netconf:127.0.0.1:11002. The client-side ports couldn't be edited (see port 116).

Image Removed

...

a single device 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.3.1 Perform <get> Operation

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

...

Code Block
languagexml
linenumberstrue
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:703f18cc-512f-411c-8b8d-f07a87b4797f">
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <name>oe1/2</name>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-5.1</target-output-power>
            <line-port>oe1</line-port>
          </config>
        </optical-channel>
      </component>
    </components>
  </data>
</nc:rpc-reply>

2.3.2 Perform <edit-config> operation

If you want to change the target-output-power value as 0dBm  instead of the default -5.1 dBm  where "<name>" ID is "oe1/2", the content of file is set-target-output-power :

...