...
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 |
---|
execute-tapi-post-call.py 127.0.0.1 tapi-connectivity:create-connectivity-service line-side |
The output is something like:
Code Block |
---|
There is no line-side service in ONOS now.
Build line-side connectivity:
|Item|SRC|DST|
|:--|:--|:--|
|onos-cp|netconf:127.0.0.1:11003/201|netconf:127.0.0.1:11002/201|
|connection id|line|line|
|sip uuid|d9d86f52-4db7-4515-8183-d20c5dd4c497|867fb6db-102d-417f-8687-e7ca327e901f|
The json content of creation operation for line-side connectivity service is
{"tapi-connectivity:input": {"end-point": [{"direction": "BIDIRECTIONAL", "layer-protocol-qualifier": "tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC", "protection-role": "WORK", "layer-protocol-name": "PHOTONIC_MEDIA", "role": "UNKNOWN", "service-interface-point": {"service-interface-point-uuid": "d9d86f52-4db7-4515-8183-d20c5dd4c497"}, "local-id": "Src_end_point"}, {"direction": "BIDIRECTIONAL", "layer-protocol-qualifier": "tapi-photonic-media:PHOTONIC_LAYER_QUALIFIER_NMC", "protection-role": "WORK", "layer-protocol-name": "PHOTONIC_MEDIA", "role": "UNKNOWN", "service-interface-point": {"service-interface-point-uuid": "867fb6db-102d-417f-8687-e7ca327e901f"}, "local-id": "Dst_end_point"}]}}.
The request context is: tapi-connectivity:create-connectivity-service.
The return message of the request is:
{"tapi-connectivity:output": {"service": {"connection": [{"connection-uuid": "170cc3c8-fdee-4a26-806e-bcbe04576c9e"}], "end-point": [{"service-interface-point": {"service-interface-point-uuid": "d9d86f52-4db7-4515-8183-d20c5dd4c497"}, "local-id": "e9971bde-232b-4b06-8ece-4457638eaace"}, {"service-interface-point": {"service-interface-point-uuid": "867fb6db-102d-417f-8687-e7ca327e901f"}, "local-id": "5c79dc42-833b-4008-bf9b-de3701bbc4ce"}], "uuid": "0244e790-f668-4265-855b-c9859aeccc30"}}} |
And the intent is installed:
Also, we could see the running logs of the container odtn-emulator_tapi_ols_1 to see the restful request on it:
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:
Code Block |
---|
execute-tapi-delete-call.py 127.0.0.1 both |
The output is something like:
Code Block |
---|
(py2) ONFs-MacBook-Pro:tmp onf$ 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": "0244e790-f668-4265-855b-c9859aeccc30"}}.
Returns json string for deletion operations is
<Response [200]> |
Also, we could see the updates of the running logs of odtn-emulator_tapi_ols_1:
Code Block |
---|
ONFs-MacBook-Pro:tapi2.1-javaServer onf$ docker logs odtn-emulator_tapi_ols_1
......
23:23:48.944 [qtp1946827416-16] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextGet is called.
23:24:03.005 [qtp1946827416-19] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextConnectivityContextConnectivityServiceuuidDelete is called.
23:24:03.006 [qtp1946827416-19] INFO io.swagger.api.impl.DataApiServiceImpl - remove the tapi-connectivity:connectivity-service with uuid 819578a0-8cdc-4394-971e-9c941d631af7.
23:24:03.008 [qtp1946827416-12] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextConnectivityContextConnectivityServiceuuidDelete is called.
23:24:03.009 [qtp1946827416-12] INFO io.swagger.api.impl.DataApiServiceImpl - remove the tapi-connectivity:connectivity-service with uuid 9d5d9e19-7889-449d-af8f-fb3d903a5500.
23:24:18.956 [qtp1946827416-17] INFO io.swagger.api.impl.DataApiServiceImpl - method dataContextGet is called. |