Versions Compared

Key

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

Table of Contents


1. Topology preparation

The topology of this demo contains three nodes:

...

  • device.json: You can download this file via command

    Code Block
    wget https://raw.githubusercontent.com/opennetworkinglab/ODTN-emulator/master/topo/with-rest-tapi/device.json

    The content is:

    Code Block
    languagejs
    {
      "devices" : {
        "netconf:127.0.0.1:11002" : {
          "basic" : {
            "name":"cassini2",
            "driver":"cassini-ocnos"
          },
          "netconf" : {
            "ip" : "127.0.0.1",
            "port" : "11002",
            "username" : "root",
            "password" : "root",
            "idle-timeout" : "0"
          }
        },
        "rest:127.0.0.1:11000": {
          "rest": {
            "ip": "127.0.0.1",
            "port": 11000,
            "protocol": "http",
            "testUrl":"/restconf/data/tapi-common:context",
            "manufacturer": "tapi-swagger",
            "hwVersion": "0",
            "swVersion": "2.1"
          },
          "basic": {
            "driver": "ols"
          }
        },
        "netconf:127.0.0.1:11003" : {
          "basic" : {
            "name":"cassini1",
            "driver":"cassini-ocnos"
          },
          "netconf" : {
            "ip" : "127.0.0.1",
            "port" : "11003",
            "username" : "root",
            "password" : "root",
            "idle-timeout" : "0"
          }
        }
      }
    }
  • link.json: You can download this file via command

    Code Block
    wget https://raw.githubusercontent.com/opennetworkinglab/ODTN-emulator/master/topo/with-rest-tapi/link.json

    The content is:

    Code Block
    languagejs
    {
      "links": {
        "netconf:127.0.0.1:11002/201-rest:127.0.0.1:11000/100000035178": {
          "basic": {
            "type": "OPTICAL",
            "metric": 1,
            "durable": true,
            "bidirectional": true
          }
        },
        "rest:127.0.0.1:11000/100000035182-netconf:127.0.0.1:11003/201": {
          "basic": {
            "type": "OPTICAL",
            "metric": 1,
            "durable": true,
            "bidirectional": true
          }
        }
      }
    }

2. Run Topology and ONOS instance

Firstly, start three device emulator:

...

Open the webpage, you will see the topology:

3. Connectivity Creation/Deletion

Now, you can execute connectivity operations based on the topology and the controller.

3.1 Connectivity Creation

In Python2.X environment, create line-side connectivity:

...

Code Block
ONFs-MacBook-Pro:tapi2.1-javaServer onf$ docker logs odtn-emulator_tapi_ols_1
23:18:18.825 [qtp1946827416-19] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextGet is called.
23:18:28.018 [qtp1946827416-17] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextConnectivityContextPost is called.
23:18:28.018 [qtp1946827416-17] WARN io.swagger.api.impl.DataApiServiceImpl - The list of TapiConnectivityConnection shouldn't be null or empty
23:18:28.019 [qtp1946827416-12] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextConnectivityContextPost is called.
23:18:28.019 [qtp1946827416-12] WARN io.swagger.api.impl.DataApiServiceImpl - The list of TapiConnectivityConnection shouldn't be null or empty
23:18:48.832 [qtp1946827416-16] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextGet is called.

3.2 Connectivity Deletion

In Python2.X environment, delete the installed line-side connectivity:

...