Versions Compared

Key

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

...

Policy model required for SON-handler service should be created and pushed to policy component.

Steps for creating and pushing the policy model:

1.Login to PDP container

Code Block
languagebash
firstline1
titleLogin to PDP container
kubectl exec -ti --namespace onap policy-pdp-0 bash

2.Create policy model

Code Block
languagebash
firstline1
titlePolicy Creation
curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "policyName": "com.PCIMS_CONFIG_POLICY",
  "configBody": "{ \"PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS\":60, \"PCI_MODCONFIG_POLICY_NAME\":\"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF\":\"OOF-PCI-OPTIMIZATION\", \"PCI_SDNR_TARGET_NAME\":\"SDNR\" }",
  "policyType": "Config",
  "attributes" : { "matching" : { "key1" : "value1" } },
  "policyConfigType": "Base",
  "onapName": "DCAE",
  "configName": "PCIMS_CONFIG_POLICY",
  "configBodyType": "JSON"
}' 'https://pdp:8081/pdp/api/createPolicy'


3.Push policy model

Code Block
languagebash
firstline1
titlePush Policy
curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "policyName": "com.PCIMS_CONFIG_POLICY",
  "policyType": "Base"
}' 'https://pdp:8081/pdp/api/pushPolicy'

4.Verify config policy is present

Code Block
languagebash
firstline1
titleFetch policy
curl -k -v --silent -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ "configName": "PCIMS_CONFIG_POLICY",    "policyName": "com.Config_PCIMS_CONFIG_POLICY1*",    "requestID":"e65cc45a-9efb-11e8-98d0-529269ffa459"  }' 'https://pdp:8081/pdp/api/getConfig'


Deployment Steps

  • Copy sonhms-blueprint and inputs file to /blueprints directory in DCAE bootstrap POD
  • Log-in to the DCAE bootstrap POD's main container
  • validate and deploy component

    Code Block
    languagebash
    firstline1
    titleDeploy component
     cfy install -b sonhms -d sonhms -i <inputsFilePath> <blueprintFilePath>


  • undeploy

    Code Block
    languagebash
    firstline1
    titleUndeploy component
    cfy uninstall sonhms


...