Versions Compared

Key

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

...

2. MSB Configuration

Register so-orchestrationTasks and so-serviceInstances datalake interface to MSB.

Interface registration can be done through portal.

...

Please find below curl commands with required data to be populated in AAI, provide the worker vm ip for nfsServer. however, you do not need to create these service profiles manually because SO creates them for you in the e2e slice allocation. You only need to do it manually if you are not testing with SO and instead, you are calling UUI & KPI-MS directly (no SO involved)

Code Block
themeEmacs
titlePopulateAAIdata
linenumberstrue
collapsetrue
curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://'$nfsServer':30233/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/11a9195f-c060-49dd-8f1b-6a4c8ab5d01n -d '{ 
  "service-instance-name": "e2eService1",
	"service-type": "embb",
	"service-role": "service-profile",
	"environment-context": "01-B989BD",
	"orchestration-status": "deactivated"}'

curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://'$nfsServer':30233/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/259fa29d-d589-4142-a4f0-a689a5061878 -d '{ 
    "service-instance-name": "e2eService2",
	"service-type": "embb",
	"service-role": "service-profile",
	"environment-context": "01-497651",
	"orchestration-status": "deactivated"}'

...

  1.  curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes" -H "Accept: application/json" -H "Content-Type: application/json" -d @kpipolicytype.json
  2.  curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.monitoring.docker.kpims.app/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @kpipolicyinstance.json
  3. curl --silent -k --user 'policyadmin:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @deploykpipolicy.json

To create the dmaap topic - unauthenticated.DCAE_KPI_OUTPUT ::


kpipolicytype.json

JSON Viewer
{
  "policy_types": {
    "onap.policies.monitoring.docker.kpims.app": {
      "derived_from": "onap.policies.Monitoring:1.0.0",
      "description": "KPI ms policy type",
      "properties": {
        "domain": {
          "required": true,
          "type": "string"
        },
		"methodForKpi":{
         "type":"list",
         "required":true,
         "entry_schema":{
         "type":"policy.data.methodForKpi_properties"
                    }
          }
       
      },
      "version": "1.0.0"
    }
  },
    "data_types": {
    "policy.data.methodForKpi_properties": {
      "derived_from": "tosca.nodes.Root",
      "properties": {
		     "eventName":{
                    "type":"string",
                    "required":true
                },
			 "controlLoopSchemaType":{
                    "type":"string",
                    "required":true
                },
			"policyScope":{
                    "type":"string",
                    "required":true
                },
			"policyName":{
                    "type":"string",
                    "required":true
                },
			"policyVersion":{
                    "type":"string",
                    "required":true
                },
			"kpis":{
                   "type":"list",
                   "required":true,
                   "entry_schema":{
                   "type":"policy.data.kpis_properties"
                    }
                }
		  
	  }
	},
	"policy.data.kpis_properties": {
      "derived_from": "tosca.nodes.Root",
      "properties": {
		     "measType":{
                    "type":"string",
                    "required":true
                },
			 "operation":{
                    "type":"string",
                    "required":true
                },
			"operands":{
                    "type":"string",
                    "required":true
                }
	  }
	}
	},
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0"
}

kpipolicyinstance.json


JSON Viewer
{
  "name": "ToscaServiceTemplateSimple",
  "topology_template": {
    "policies": [
      {
        "com.Config_KPIMS_CONFIG_POLICY": {
		  "type": "onap.policies.monitoring.docker.kpims.app",
          "type_version": "1.0.0",
          "version": "1.0.0",
          "metadata": {
            "policy-id": "com.Config_KPIMS_CONFIG_POLICY",
            "policy-version": "1"
          },
          "name": "com.Config_KPIMS_CONFIG_POLICY",
          "properties": {
           "domain": "measurementsForKpi",
		   "methodForKpi": [
		   {
		   "eventName": "perf3gpp_CORE-AMF_pmMeasResult",
		   "controlLoopSchemaType": "SLICE",
		   "policyScope": "resource=networkSlice;type=configuration",
		   "policyName": "configuration.dcae.microservice.kpi-computation",
		   "policyVersion": "v0.0.1",
		     "kpis": [{
				 "measType": "AMFRegNbr",
				 "operation": "RATIO",
				 "operands": ["RM.RegisteredSubNbrMean"]}
				 ]
			}, 
			{
			 "eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
			 "controlLoopSchemaType": "SLICE",
			 "policyScope": "resource=networkSlice;type=configuration",
			 "policyName": "configuration.dcae.microservice.kpi-computation",
			 "policyVersion": "v0.0.1",
			 "kpis": [{
				 "measType": "PDUSessionEstSR",
				 "operation": "RATIO",
				 "operands": ["SM.PDUSessionSetupSucc","SM.PDUSessionSetupReq"]}
				 ]
			}
			]
        }
      }
	  }
    ]
     },
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
  "version": "1.0.0"
}

deploykpipolicy.json

JSON Viewer
{
   "policies":[
      {
         "policy-id":"com.Config_KPIMS_CONFIG_POLICY",
         "policy-version":1
      }
   ]
}


To create the dmaap topic - unauthenticated.DCAE_KPI_OUTPUT ::

curl --header "Content-type: application/json" --request POST --data '{"owner": "","txenabled": false,"curl --header "Content-type: application/json" --request POST --data '{"owner": "","txenabled": false,"topicName": "unauthenticated.DCAE_KPI_OUTPUT"}' http://<message-router-ip>:3904/topics/create

...

      2. Give chmod 777 to upload folder which will be created automatically in the home dir.

Demo Recording:

View file
nameUUi_Monitoring_new_KPI.mp4
height400