Versions Compared

Key

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

...

This sub-section describes the steps for running the control loop for apex policy version of the usecase using docker.

  • The first step is to clone the nonrtric repo and start the DmaaP message-router. Then, two topics are created in the message-router: POLICY-CLRUNTIME-PARTICIPANT (to be used by control loop runtime component of policy/clamp) and unauthenticated.SEC_FAULT_OUTPUT (for handling fault notification events).
Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout e-release --track origin/e-release
cd nonrtric/test/auto-test
./startMR.sh remote docker --env-file ../common/test_env-oran-e-release.sh
docker rename message-router onap-dmaap
curl -X POST -H "Content-Type: application/json" -d "{"topicName": "POLICY-CLRUNTIME-PARTICIPANT"}" http://localhost:3904/events/POLICY-CLRUNTIME-PARTICIPANT
curl -X POST -H "Content-Type: application/json" -d "{"topicName": "unauthenticated.SEC_FAULT_OUTPUT"}" http://localhost:3904/events/unauthenticated.SEC_FAULT_OUTPUT


  • After creating the topics in the message-router, start the ONAP Policy Framework using the docker-compose file available in nonrtric repo.
Code Block
languagebash
cd nonrtric/docker-compose/docker-compose-policy-framework
docker-compose up -d


  • The next step is to start the controlloop-runtime and policy-participant components of the clamp.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/docker-compose-controlloop
docker-compose up -d

...

"com.att.nsa.apiClient.http.HttpClient    : --> HTTP/1.1 200 OK"


  • Once all the components get up and running, the control loop can be commissioned and instantiated. This can be done by making a REST call to the controlloop-runtime component of the clamp. The tosca template for commissioning and the instantiation payload are provided in this directory of the nonrtric repo:
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/controlloop-rest-payloads

...

Next step is to change the control loop from PASSIVE to RUNNING state. Edit the "instantiation-command.json" file and replace PASSIVE with RUNNING. Making the above REST call once again will change the control loop to RUNNING state.


  • Once the control loop is in RUNNING state, check whether the apex policy has been deployed successfully in the policy framework. Making the below REST call to policy-api component should return the deployed policy.
Code Block
languagebash
curl -u 'healthcheck:zb!XztG34' -X GET "http://localhost:6869/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.linkmonitor/versions/1.0.0"

...

Code Block
languagebash
curl -u 'healthcheck:zb!XztG34' -X GET "http://localhost:6868/policy/pap/v1/policies/status"

...


  • Start the sdnr-simulator in a docker container that will receive the REST call made by apex policy when a link failure event is received.
Code Block
languagebash
docker run --rm --name sdnr-sim --network nonrtric-docker-net -e MR-HOST="http://onap-dmaap" -e MR-PORT="3904" registry.nordix.org/onap/sdnr-simulator:1.0.0


  • Send the example link failure event.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor
curl -X POST -H accept:application/json -H Content-Type:application/json "http://localhost:3904/events/unauthenticated.SEC_FAULT_OUTPUT/" -d @./events/LinkFailureEvent.json

...

"PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=HCL-O-DU-1123/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection=ERICSSON-O-RU-11225 HTTP/1.1" 200 -


  • In order to stop the docker containers and free up resources on the host machine, use the following commands:
Code Block
languagebash
cd nonrtric/docker-compose/docker-compose-policy-framework
docker-compose down

cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/docker-compose-controlloop
docker-compose down

docker volume rm docker-compose-policy-framework_db-vol

...