Versions Compared

Key

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

...

Code Block
languageyml
titleapplication_configuration.json
{
  "config": {
    "//description": "Application configuration",
    "controller": [
      {
        "name": "controller1",
        "baseUrl": "http://sdnc_controller_container:8181",
        "userName": "admin",
        "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
      }
    ],
    "ric": [
      {
        "name": "ric1",
        "baseUrl": "http://ric1:8085/",
        "controller": "controller1controller",
        "managedElementIds": [
          "kista_1",
          "kista_2"
        ]
      },
      {
        "name": "ric2",
        "baseUrl": "http://ric2:8085/",
        "controller": "controller1controller",
        "managedElementIds": [
          "kista_3",
          "kista_4"
        ]
      }
    ]
  }
}

...

After you build the A1 adapter artefacts, down below CCSDK repo's and build it,

ProjectRepoGerrit LinkCommandNote
CCSDKccsdk/parentgit clone "https://gerrit.onap.org/r/ccsdk/parent" -b guilinmvn clean install -Dmaven.test.skip=trueIf the parent artefacts are not release you need to build this repo in order to build other ccsdk repo's (Including ccsdk/oran/a1-adapter)
CCSDKccsdk/featuregit clone "https://gerrit.onap.org/r/ccsdk/features" -b guilinmvn clean install -Dmaven.test.skip=true
CCSDKccsdk/distributiongit clone "https://gerrit.onap.org/r/ccsdk/distribution" -b guilinmvn clean install -Dmaven.test.skip=true -PdockerCreates the CCSDK docker image
SDNCsdnc/northboundgit clone "https://gerrit.onap.org/r/sdnc/northbound" -b guilinmvn clean install -Dmaven.test.skip=true
SDNCsdnc/oamgit clone "https://gerrit.onap.org/r/sdnc/oam" -b guilinmvn clean install -Dmaven.test.skip=true -PdockerCreates the SDNC docker image. Make sure you refer the right docker image version the pom file.(eg: you may need to update ccsdk.docker.version for onap/ccsdk-ansible-server-image from 1.0-STAGING-latest to 1.0-SNAPSHOT-latest)

If the build is successful an image with following name and tag shall be built, use the command 'docker images' to view newly built the image in the local docker registry.

Code Block
languagebash
themeMidnight
onap/sdnc-image latest
onap/sdnc-ansible-server-image latest
onap/admportal-sdnc-image latest
onap/ccsdk-dgbuilder-image latest
onap/sdnc-ueb-listener-image latest
onap/sdnc-dmaap-listener-image:latest

Run A1 Policy Adapter/Controller

To view the A1 policy operations, you need to run the SDNC docker image. This image has few other docker image dependency but not all are important for A1 policy testing. To bring up the sdnc container for A1 Policy Management testing you can do below change to the docker compose file,.

Code Block
languagebash
In sdnc/oam repo 
export MTU=10241500
docker network create nonrtric-docker-net
cd sdnc/oam/installation/src/main/yaml
docker-compose up 

...

The A1 Policy in ODL GUI can be accessed by this URL ,(may take several minutes before the URL works)

http://localhost:8282/apidoc/explorer/index.html
Username/password: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

...

  • Start docker containers for each ric defined in nonrtricoran/a1-policy-agentmanagement/config/application_configuration.json json in previous steps (in this example for ric1 and ric2) and providing A1 interface version OSC_2.1.0 with the following commands:: 

    docker run -p 8085:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 near-rt-ric-simulator:latest
    nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
    docker run -p 8086:8085 -p 8186:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 near-rt-ric-simulator:latest
  • Change directory:  

    cd a1-interface/near-rt-ric-simulator/test/OSC_2.1.0/jsonfiles
  • nexus3.o-ran-sc.org:10004/o-ran-sc/a1-simulator:2.0.0
  • Create a policy type json to load into the A1 simulators


    Code Block
    languagebash
    titlept1.json
    {
      "name": "pt1",
      "description": "pt1 policy type",
      "policy_type_id": 1,
      "create_schema": {
        "$schema": "http://json-schema.org/draft-07/schema#",
        "title": "OSC_Type1_1.0.0",
        "description": "Type 1 policy type",
        "type": "object",
        "properties": {
          "scope": {
            "type": "object",
            "properties": {
              "ueId": {
                "type": "string"
              },
              "qosId": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "ueId",
              "qosId"
            ]
          },
          "qosObjectives": {
            "type": "object",
            "properties": {
              "priorityLevel": {
                "type": "number"
              }
            },
            "additionalProperties": false,
            "required": [
              "priorityLevel"
            ]
          }
        },
        "additionalProperties": false,
        "required": [
          "scope", "qosObjectives"
        ]
      }
    }


  • Put the example policy type into the started A1 Put an example policy_type into the started near-rt-ric- simulator instances by running these curl commands (in this example to ric1 exposed to port 8085 and ric2 exposed to port 8086):

    curl -X PUT -v "http://localhost:8085/a1-p/policytypes/123" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json
    curl -X PUT -v "http://localhost:8086/a1-p/policytypes/123" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json

Run Policy

...

Management Service Docker Container

  • Run docker container using this command once A1 Controller and simulators have been fully started and optionally set the logging to trace (debug)the curl command will not work until the container is fully up and running).

    docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agentmanagement-container o-ran-sc/nonrtric-policy-agent:2service onap/ccsdk-oran-a1policymanagementservice:1.0.02-SNAPSHOT
    curl -X POST  http://localhost:8081/actuator/loggers/org.onap.ccsdk.oran.a1policymanagementservice a1policymanagementservice -H "Content-Type:application/json" -d {\"configuredLevel\":\"trace\"}
  • Once policy-agent the Policy Management Service is up and running, it establishes connections to all configured Near-RT RICs (Note: In Bronze Maintenance version it will be possible to point docker to use a different configuration file than the version included inside the container - e.g. to add additional near-RT-RICs)(ric1 and ric2).

  • If policy-agent-container is configured to log at DEBUG level, the following logs should appear to log to show that connection to the configured RICs has been established successfully via A1 Controller.

...


Code Block
languagebashtitleSDNC A1 Client
$ docker logs policy-agentmanagement-containerservice | grep "protocol version" 
2020-04-17 11:10:11.357 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:SDNC_OSC_OSC_V1 for Ric: ric1 
2020-04-17 11:10:11.387 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:SDNC_OSC_OSC_V1 for Ric: ric2

...


 

Policy Management Service Swagger API

For troubleshooting/verification purposes you can view/access the policy-agent swagger API from url: http://localhost:8081/swagger-ui.html

...

docker run -p 8080:8080 --network=nonrtric-docker-net nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-controlpanel:2.0.0

Open NONRTRIC / A1 Policy Control Panel UI

...