Versions Compared

Key

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

...

Send create-connectivity-service request to onos via RESTCONF NBI.script execute-tapi-post-call.py as listes:


Code Block
# Create client-side service

Checking the TAPI context, you can see following objects are created:

  • New connectivity service you request
  • Top level connection of the connectivity service and its endpoints(CEPs)
  • Lower connections which are needed in order to build top level connection, and their endpoints(CEPs)
Image Removed
Code Block
onos> odtn-show-tapi-context
XML:
...
  </service-interface-point>
  <connectivity-context xmlns="urn:onf:otcc:yang:tapi-connectivity">
    <connection>
      <lower-connection>
        <connection-uuid>6da7b390-2a01-4d9e-a689-343c1803a177</connection-uuid>
      </lower-connection>
      <uuid>d80253ec-2fd6-4825-ba5a-748e76471b2c</uuid>
      <connection-end-point>
        <node-edge-point-uuid>93713b87-29df-4ae6-a0b6-3d3cab310fbc</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c0ae8abc-4ec0-4206-9c7a-1b8778836848</node-uuid>
        <connection-end-point-uuid>94ad373a-7c97-4c0d-8e9b-0c5f330feca6</connection-end-point-uuid>
      </connection-end-point>
      <lower-connection>
        <connection-uuid>6ffe23d0-54ac-436c-9813-4c0911a24a7a</connection-uuid>
      </lower-connection>
      <route>
        <local-id>fd367d66-b34f-40d2-a300-83bb8ae77b06</local-id>
        <connection-end-point>
          <node-edge-point-uuid>08a326a0-a41e-4560-8b82-64dc5d60757b</node-edge-point-uuid>
          <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
          <node-uuid>c0ae8abc-4ec0-4206-9c7a-1b8778836848</node-uuid>
          <connection-end-point-uuid>e5a1a667-08fb-4cb1-9e2e-bb59bdbf285b</connection-end-point-uuid>
        </connection-end-point>
        <connection-end-point>
          <node-edge-point-uuid>93713b87-29df-4ae6-a0b6-3d3cab310fbc</node-edge-point-uuid>
          <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
          <node-uuid>c0ae8abc-4ec0-4206-9c7a-1b8778836848</node-uuid>
          <connection-end-point-uuid>94ad373a-7c97-4c0d-8e9b-0c5f330feca6</connection-end-point-uuid>
        </connection-end-point>
        <connection-end-point>
          <node-edge-point-uuid>bb680ea0-2727-4a7b-8340-9e9c9723edaa</node-edge-point-uuid>
          <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
          <node-uuid>c2efff40-5cc3-42d2-9da1-51eb35d63cf3</node-uuid>
          <connection-end-point-uuid>6ad5d097-8d12-4d7e-8e97-8c259680afcd</connection-end-point-uuid>
        </connection-end-point>
        <connection-end-point>
          <node-edge-point-uuid>59925a0c-14bd-4d54-be17-1a78c7676f8a</node-edge-point-uuid>
          <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
          <node-uuid>c2efff40-5cc3-42d2-9da1-51eb35d63cf3</node-uuid>
          <connection-end-point-uuid>a40f010d-f11c-4f3f-af07-7e08d331ac0b</connection-end-point-uuid>
        </connection-end-point>
      </route>
      <connection-end-point>
        <node-edge-point-uuid>59925a0c-14bd-4d54-be17-1a78c7676f8a</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c2efff40-5cc3-42d2-9da1-51eb35d63cf3</node-uuid>
        <connection-end-point-uuid>a40f010d-f11c-4f3f-af07-7e08d331ac0b</connection-end-point-uuid>
      </connection-end-point>
    </connection>
    <connection>
      <uuid>6da7b390-2a01-4d9e-a689-343c1803a177</uuid>
      <connection-end-point>
        <node-edge-point-uuid>bb680ea0-2727-4a7b-8340-9e9c9723edaa</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c2efff40-5cc3-42d2-9da1-51eb35d63cf3</node-uuid>
        <connection-end-point-uuid>6ad5d097-8d12-4d7e-8e97-8c259680afcd</connection-end-point-uuid>
      </connection-end-point>
      <route>
        <local-id>9f78a983-f97d-4758-9b18-9b1b928e50ad</local-id>
      </route>
      <connection-end-point>
        <node-edge-point-uuid>59925a0c-14bd-4d54-be17-1a78c7676f8a</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c2efff40-5cc3-42d2-9da1-51eb35d63cf3</node-uuid>
        <connection-end-point-uuid>a40f010d-f11c-4f3f-af07-7e08d331ac0b</connection-end-point-uuid>
      </connection-end-point>
    </connection>
    <connectivity-service>
      <end-point>
        <local-id>25081371-a1a1-4f08-a1cc-2093bbbc1117</local-id>
        <service-interface-point>
          <service-interface-point-uuid>c1063a08-571c-48d5-a983-2b517f337577</service-interface-point-uuid>
        </service-interface-point>
      </end-point>
      <uuid>492f6d31-bca3-4409-bc00-571520742f37</uuid>
      <end-point>
        <local-id>8dabd880-a8e0-4757-919b-e2ee05063351</local-id>
        <service-interface-point>
          <service-interface-point-uuid>58d68cb1-acb6-41e2-896d-44ca9339df63</service-interface-point-uuid>
        </service-interface-point>
      </end-point>
      <connection>
        <connection-uuid>d80253ec-2fd6-4825-ba5a-748e76471b2c</connection-uuid>
      </connection>
    </connectivity-service>
    <connection>
      <connection-end-point>
        <node-edge-point-uuid>08a326a0-a41e-4560-8b82-64dc5d60757b</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c0ae8abc-4ec0-4206-9c7a-1b8778836848</node-uuid>
        <connection-end-point-uuid>e5a1a667-08fb-4cb1-9e2e-bb59bdbf285b</connection-end-point-uuid>
      </connection-end-point>
      <uuid>6ffe23d0-54ac-436c-9813-4c0911a24a7a</uuid>
      <connection-end-point>
        <node-edge-point-uuid>93713b87-29df-4ae6-a0b6-3d3cab310fbc</node-edge-point-uuid>
        <topology-uuid>78ac28ce-8427-40a8-bbd3-f84d61d9438c</topology-uuid>
        <node-uuid>c0ae8abc-4ec0-4206-9c7a-1b8778836848</node-uuid>
        <connection-end-point-uuid>94ad373a-7c97-4c0d-8e9b-0c5f330feca6</connection-end-point-uuid>
      </connection-end-point>
      <route>
        <local-id>2401b6ed-a47a-41a0-aac8-fb4a324d3755</local-id>
      </route>
    </connection>
  </connectivity-context>
...

...

 (Python 2.7.x)
execute-tapi-post-call.py 127.0.0.1 tapi-connectivity:create-connectivity-service client-side
Info
titleline-side service

You can also use script execute-tapi-post-call.py to create line-side service, just use command: 

    execute-tapi-post-call.py 127.0.0.1 tapi-connectivity:create-connectivity-service line-side


The output is :

Code Block
There is no existed connectivity service inside ONOS.
Create client-side services:
	- from netconf:127.0.0.1:11003/104 to netconf:127.0.0.1:11002/104.
This service should go through:
	- netconf:127.0.0.1:11003/204 and netconf:127.0.0.1:11002/204.

The request context is:	tapi-connectivity:create-connectivity-service.

The return message of the request is:
		{"tapi-connectivity:output": {"service": {"connection": [{"connection-uuid": "92cff1b5-cfa9-4329-9dec-a007a3259109"}], "end-point": [{"service-interface-point": {"service-interface-point-uuid": "7be5a226-c27d-4815-b121-004a26af35e5"}, "local-id": "4515e51a-1567-42c0-a37f-71b9fe4f9d1b"}, {"service-interface-point": {"service-interface-point-uuid": "d25ac16a-c6ef-44a6-bc65-1e03eedb52e8"}, "local-id": "21b2dd0f-bc2e-40b9-af31-234e101e76df"}], "uuid": "4bb766b4-1e3e-48cb-a302-15f70a353a08"}}}

Checking the TAPI context, you can see following objects are created:

  • New connectivity service you request
  • Top level connection of the connectivity service and its endpoints(CEPs)
  • Lower connections which are needed in order to build top level connection, and their endpoints(CEPs)
Image Added


There are two ways to check the connectivity.

1. You can use curl to request connectivity-service, and get the output:

Code Block
$curl 
Code Block
# login docker container's bash environment remotely
onos$ docker exec -it <container_id> bash


# see NETCONF log
root@bf79f4f9906d:/opt/emulator$ cd logs && vim netconf.log


log
-----
<rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <terminal-device xc:operation="merge" xmlns="http://openconfig.net/yang/terminal-device">
        <logical-channels>
          <channel xmlns="http://openconfig.net/yang/terminal-device" xc:operation="merge">
            <index>GIGECLIENTCTP.1-A-2-T1</index>
            <config>
              <index>GIGECLIENTCTP.1-A-2-T1</index>
            </config>
            <logical-channel-assignments>
              <assignment>
                <index>GIGECLIENTCTP.1-A-2-T1</index>
                <config>
                  <assignment-type>LOGICAL_CHANNEL</assignment-type>
                  <logical-channel>GIGECLIENTCTP.1-L1-1-1</logical-channel>
                  <allocation>100</allocation>
                </config>
              </assignment>
            </logical-channel-assignments>
          </channel>
        </logical-channels>
      </terminal-device>
    </config>
  </edit-config>
</rpc>

23-Jul-2018::16:44:26.872 **< sess:53 write:
<rpc-reply message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <ok/>
</rpc-reply>

diff of running-config
------------------------
 devices {
     device xt3300_1 {
         config {
             oc-opt-term:terminal-device {
                 logical-channels {
+                    channel GIGECLIENTCTP.1-A-2-T1 {
+                        config {
+                            index GIGECLIENTCTP.1-A-2-T1;
+                        }
+                        logical-channel-assignments {
+                            assignment GIGECLIENTCTP.1-A-2-T1 {
+                                config {
+                                    assignment-type LOGICAL_CHANNEL;
+                                    logical-channel GIGECLIENTCTP.1-L1-1-1;
+                                    allocation 100.0;
+                                }
+                            }
+                        }
+                    }
                 }
             }
         }
     }
 }

You can get the created connectivity service from RESTCONF NBI  (There is an limitation, please check Available TAPI NBI endpoints).

Code Block
$ curl -u onos:rocks -X POST -H Content-Type:application/json -T empty-body.json http://localhost:8181/onos/restconf/operations/tapi-connectivity:get-connectivity-service-list | jq

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   482481  100   478  100     43   81232591     6716 --:--:-- --:--:-- --:--:--  82412597
{
  "tapi-connectivity:output": {
    "service": [
      {
        "connection": [
          {
            "connection-uuid": "d80253ec-2fd6-4825-ba5a-748e76471b2c"
          }
        ],
        "end-point": [
          {
            "local-idconnection": "25081371-a1a1-4f08-a1cc-2093bbbc1117",[
            "service-interface-point": {
              "service-interfaceconnection-point-uuid": "c1063a0892cff1b5-571ccfa9-48d54329-a9839dec-2b517f337577a007a3259109"
            }
          }],
          {
            "local-id": "8dabd880-a8e0-4757-919b-e2ee05063351",
 "end-point": [
           "service-interface-point": {
              "service-interface-point-uuidlocal-id": "58d68cb121b2dd0f-acb6bc2e-41e240b9-896daf31-44ca9339df63234e101e76df",
            }
          }"service-interface-point": {
        ],
        ""service-interface-point-uuid": "492f6d31d25ac16a-bca3c6ef-440944a6-bc00bc65-571520742f371e03eedb52e8"
      }
    ]
  }
}

Delete TAPI Connectivity Service

Get the connectivity-service uuid you want to delete from RESTCONF NBI, and send delete-connectivity-service request.

Code Block
$ curl -u onos:rocks -X POST -H Content-Type:application/json -T empty-body.json http://localhost:8181/onos/restconf/operations/tapi-connectivity:get-connectivity-service-list | jq '.[][][].uuid'
"492f6d31-bca3-4409-bc00-571520742f37"

$ cat delete-connectivity-service.json
{
 },
      "tapi-connectivity:input":
    {
            "servicelocal-id-or-name" : "492f6d314515e51a-bca31567-440942c0-bc00a37f-571520742f3771b9fe4f9d1b",
            }
}

$ curl -u onos:rocks -X POST -H Content-Type:application/json -T delete-connectivity-service.json http://localhost:8181/onos/restconf/operations/tapi-connectivity:delete-connectivity-service | jq
{
  "tapi-connectivity:output": {
    "service": {
"service-interface-point": {
              "service-interface-point-uuid": "7be5a226-c27d-4815-b121-004a26af35e5"
            }
          }
        ],
        "uuid": "492f6d314bb766b4-bca31e3e-440948cb-bc00a302-571520742f3715f70a353a08"
      }
    ]
  }
}

If you run "2. you can use odtn-show-tapi-context" from ONOS CLI,  you can find that all TAPI objects related to the deleted connectivity-service are removed.

Also you can see that the remote device received following edit-config request and updated its running config. The config which has created at the create-connectivity-service request are deleted.

to see the full connectivity context:


Code Block
onos> odtn-show-tapi-context
XML:
...
  </service-interface-point>
  <connectivity-context
Code Block
log
-----
<rpc message-id="5" xmlns="urn:ietfonf:paramsotcc:xml:ns:netconf:base:1.0">
  <edit-config>yang:tapi-connectivity">
    <connection>
      <connection-end-point>
        <node-edge-point-uuid>698ee55b-f983-4674-b10d-48171f2772dc</node-edge-point-uuid>
        <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
        <node-uuid>66e83ebf-b44f-4967-828b-6a348d9722ef</node-uuid>
    <target>
      <running/>
<connection-end-point-uuid>81f568bd-6260-45f3-991b-ae6dc0059419</connection-end-point-uuid>
      </target>connection-end-point>
    <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
      <terminal-device xc:operation="merge" xmlns="http://openconfig.net/yang/terminal-device"> <uuid>2a1683da-7015-4cde-92c8-5f43d8dd3f9b</uuid>
        <logical-channels><route>
          <channel xmlns="http://openconfig.net/yang/terminal-device" xc:operation="delete"><local-id>cd23e8a9-ba72-45ab-bc7b-7b498a38aab4</local-id>
      </route>
      <connection-end-point>
      <index>GIGECLIENTCTP.1-A-2-T1</index>  <node-edge-point-uuid>dcd09ae9-03d3-499f-a576-6a6e0c5da343</node-edge-point-uuid>
        <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
    <config>
    <node-uuid>66e83ebf-b44f-4967-828b-6a348d9722ef</node-uuid>
          <index>GIGECLIENTCTP.1-A-2-T1</index>
  <connection-end-point-uuid>8a3640ad-6748-467e-b5e8-0414d1642145</connection-end-point-uuid>
      </connection-end-point>
    </connection>
    <connection>
  </config>
    <route>
        <logical-channel-assignments><local-id>a8beb725-2fc3-466e-8dca-a0c7840d678b</local-id>
      </route>
        <assignment><uuid>a69d88a0-4b01-4ce2-a342-95ae69834481</uuid>
      <connection-end-point>
        <node-edge-point-uuid>19b790e5-afb2-4967-b43a-296de5a30165</node-edge-point-uuid>
        <index>GIGECLIENTCTP.1-A-2-T1</index><topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
        <node-uuid>cb99dbc3-1b8f-4cc2-98f1-d71714e0217d</node-uuid>
        <config><connection-end-point-uuid>bf1fc653-2012-4696-88d7-3b52ae00127e</connection-end-point-uuid>
          </connection-end-point>
        <assignment-type>LOGICAL_CHANNEL</assignment-type><connection-end-point>
        <node-edge-point-uuid>c92a5b72-bc42-4117-b2a3-0cad464a5ac7</node-edge-point-uuid>
          <logical-channel>GIGECLIENTCTP.1-L1-1-1</logical-channel><topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
        <node-uuid>cb99dbc3-1b8f-4cc2-98f1-d71714e0217d</node-uuid>
          <allocation>100</allocation><connection-end-point-uuid>630ceaf8-5df1-4991-ad0c-fc53ee11e03a</connection-end-point-uuid>
      </connection-end-point>
    </connection>
      </config><connectivity-service>
      <end-point>
        </assignment><local-id>21b2dd0f-bc2e-40b9-af31-234e101e76df</local-id>
            </logical-channel-assignments><service-interface-point>
          </channel><service-interface-point-uuid>d25ac16a-c6ef-44a6-bc65-1e03eedb52e8</service-interface-point-uuid>
        </logicalservice-interface-channels>point>
      </terminalend-device>point>
    </config>
  </edit-config>
</rpc>

23-Jul-2018::16:46:59.870 **< sess:53 write:
<rpc-reply message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <ok/>
</rpc-reply>


diff
-----
 devices {
     device xt3300_1 {<uuid>4bb766b4-1e3e-48cb-a302-15f70a353a08</uuid>
      <connection>
        <connection-uuid>92cff1b5-cfa9-4329-9dec-a007a3259109</connection-uuid>
      </connection>
      <end-point>
        <local-id>4515e51a-1567-42c0-a37f-71b9fe4f9d1b</local-id>
        <service-interface-point>
         config { <service-interface-point-uuid>7be5a226-c27d-4815-b121-004a26af35e5</service-interface-point-uuid>
        </service-interface-point>
      oc-opt-term:terminal-device {
  </end-point>
    </connectivity-service>
    <connection>
      <route>
         logical-channels {
-<local-id>bbe12ceb-8bd4-4b5e-ad32-ff04ba07ba3a</local-id>
        <connection-end-point>
            channel GIGECLIENTCTP.1-A-2-T1 {
-<node-edge-point-uuid>698ee55b-f983-4674-b10d-48171f2772dc</node-edge-point-uuid>
          <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
              config {
-<node-uuid>66e83ebf-b44f-4967-828b-6a348d9722ef</node-uuid>
          <connection-end-point-uuid>81f568bd-6260-45f3-991b-ae6dc0059419</connection-end-point-uuid>
        </connection-end-point>
          index GIGECLIENTCTP.1-A-2-T1;
-  <connection-end-point>
          <node-edge-point-uuid>19b790e5-afb2-4967-b43a-296de5a30165</node-edge-point-uuid>
            }
-<topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
          <node-uuid>cb99dbc3-1b8f-4cc2-98f1-d71714e0217d</node-uuid>
              logical-channel-assignments {
-<connection-end-point-uuid>bf1fc653-2012-4696-88d7-3b52ae00127e</connection-end-point-uuid>
        </connection-end-point>
        <connection-end-point>
            assignment GIGECLIENTCTP.1-A-2-T1 {
-<node-edge-point-uuid>c92a5b72-bc42-4117-b2a3-0cad464a5ac7</node-edge-point-uuid>
          <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
          <node-uuid>cb99dbc3-1b8f-4cc2-98f1-d71714e0217d</node-uuid>
          <connection-end-point-uuid>630ceaf8-5df1-4991-ad0c-fc53ee11e03a</connection-end-point-uuid>
  config {
-     </connection-end-point>
        <connection-end-point>
          <node-edge-point-uuid>dcd09ae9-03d3-499f-a576-6a6e0c5da343</node-edge-point-uuid>
          <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
   assignment-type LOGICAL_CHANNEL;
-      <node-uuid>66e83ebf-b44f-4967-828b-6a348d9722ef</node-uuid>
          <connection-end-point-uuid>8a3640ad-6748-467e-b5e8-0414d1642145</connection-end-point-uuid>
        </connection-end-point>
      </route>
      logical-channel GIGECLIENTCTP.1-L1-1-1;
-<connection-end-point>
        <node-edge-point-uuid>698ee55b-f983-4674-b10d-48171f2772dc</node-edge-point-uuid>
        <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
        <node-uuid>66e83ebf-b44f-4967-828b-6a348d9722ef</node-uuid>
            allocation 100.0;
-<connection-end-point-uuid>81f568bd-6260-45f3-991b-ae6dc0059419</connection-end-point-uuid>
      </connection-end-point>
      <uuid>92cff1b5-cfa9-4329-9dec-a007a3259109</uuid>
      <connection-end-point>
              }
-<node-edge-point-uuid>c92a5b72-bc42-4117-b2a3-0cad464a5ac7</node-edge-point-uuid>
        <topology-uuid>64498305-73ff-487b-bb63-4c2921335604</topology-uuid>
        <node-uuid>cb99dbc3-1b8f-4cc2-98f1-d71714e0217d</node-uuid>
            }
-<connection-end-point-uuid>630ceaf8-5df1-4991-ad0c-fc53ee11e03a</connection-end-point-uuid>
               </connection-end-point>
         }
-<lower-connection>
        <connection-uuid>a69d88a0-4b01-4ce2-a342-95ae69834481</connection-uuid>
      </lower-connection>
      }<lower-connection>
        <connection-uuid>2a1683da-7015-4cde-92c8-5f43d8dd3f9b</connection-uuid>
         }</lower-connection>
    </connection>
  </connectivity-context>
...

Delete TAPI Connectivity Service

You can use the script execute-tapi-delete-call.py to delete created connectivity. If the client-side service is created, the deletion operation and its output is :

Code Block
$ execute-tapi-delete-call.py 127.0.0.1 both

The json content of }
deletion operation for connectivity service is
		{"tapi-connectivity:input":    }
     }
 }{"service-id-or-name": "4bb766b4-1e3e-48cb-a302-15f70a353a08"}}.
Returns json string for deletion operations is
 <Response [200]>


If you run "odtn-show-tapi-context" from ONOS CLI,  you can find that all TAPI objects related to the deleted connectivity-service are removed.

Also you can see that the remote device received following edit-config request and updated its running config. The config which has created at the create-connectivity-service request are deleted.