Versions Compared

Key

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

...

Code Block
titlevDNS Create Config API Call
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{

        "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"Measurement_vGMUX\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ABATED\" }, { \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"GREATER\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }",
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevCPE",
        "onapName": "DCAE"
}' 'http://pdp:8081/pdp/api/createPolicy'

TODO - Get the payload from Marco Platania

Code Block
titlevDNS - Operational Policy
linenumberstrue
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
  trigger_policy: unique-policy-id-1-scale-up
  timeout: 1200
  abatement: false
policies:
  - id: unique-policy-id-1-scale-up
    name: Create Scalea outnew theVF VNFModule
    description:
    actor: SO
    recipe: VF Module scaleOutCreate
    target:
      type: VNF
    payload:
      # Need to get from Marco
# TODO convert to YAML
"requestParameters":{
         "userParams":[
            {
               "name":"mmc",
               "value":"001"
            },
            {
      requestParameters: '{"usePreload":true,"userParams":[]}'
      configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
    retry: 0
    timeout: 1200
    success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    failure_retries: final_failure_retries
    failure_exception: final_failure_exception
    failure_guard: final_failure_guard
Code Block
titlevDNS Create Operational API Call
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "policyConfigType": "BRMS_PARAM",
        "namepolicyName": "mnccom.BRMSParamvDNS",
        "policyDescription": "BRMS Param vDNS policy",
        "valuepolicyScope": "01com",
        "attributes": {
  },              "MATCHING": {
                "namecontroller" : "mme_addramsterdam",
               "value":"vmme_private_ip_0"},
             },   "RULE": {
        {                "nametemplateName":"gtp_bind_addr",
               "value":"vmme_private_ip_0"
            },
  "ClosedLoopControlName",
          {                "nameclosedLoopControlName":"n_prob",
               "value":50
            },
"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
           {                 "namecontrolLoopYaml": "vnfHostIpAddress",
                "value": " veb_private_ip_0"
            }
         ],
         "usePreload":true
      }


    retry: 0
    timeout: 1200
    success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    failure_retries: final_failure_retries
    failure_exception: final_failure_exception
    failure_guard: final_failure_guard

TODO - Update the HTML escaped YAML

Code Block
titlevDNS Create Operational API Call
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "policyConfigType": "BRMS_PARAM",
        "policyName": "com.BRMSParamvDNS",controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++payload%3A%0D%0A++++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue,%22userParams%22%3A%5B%5D%7D%27%0D%0A++++++configurationParameters%3A+%27%5B%7B%22availability-zone%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22,%22xtz-123%22%3A%22$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone%5B0%5D%22%7D%5D%27%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
        "policyDescription": "BRMS Param vDNS policy",    }
    "policyScope": "com",   }
}' 'http://pdp:8081/pdp/api/createPolicy'
Code Block
titlevDNS Guard - Min/Max Create API Call
collapsetrue
# PROTOTYPE - development "attributes": {
                "MATCHING": {needs to be done first

curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "policyClass": "Decision",
        "policyName": "com.vDNS.MinMax",
       "controller"  "policyDescription": "Ensure number of instances within a range",
        "onapName": "amsterdamPDPD",
        "ruleProvider": "GUARD_MIN_MAX",
   },     "attributes": {
                "RULEMATCHING": {
                        "templateNameactor": "ClosedLoopControlNameSO",
                        "closedLoopControlNamerecipe": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3scaleOut",
                        "controlLoopYamltargets": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3%0D%0A++trigger_policy%3A+unique-policy-id-1-scale-up%0D%0A++timeout%3A+1200%0D%0A++abatement%3A+false%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-scale-up%0D%0A++++name%3A+Create+a+new+VF+Module%0D%0A++++description%3A%0D%0A++++actor%3A+SO%0D%0A++++recipe%3A+VF+Module+Create%0D%0A++++target%3A%0D%0A++++++type%3A+VNF%0D%0A++++retry%3A+0%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard".*",
                             "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
                        "min": "1",
                        "max": "5",
                        "guardActiveStart": "00:00:01-05:00",
                        "guardActiveEnd": "00:00:00-05:00"
                }
        }
}' 'http://pdp:8081/pdp/api/createPolicy'


Code Block
titlevDNS Guard - Min/Max Frequency Limiter Create API Call
collapsetrue
# PROTOTYPEDRAFT - developmentthis needs to be donetested first

curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "policyClass": "Decision",
        "policyName": "com.vDNS.MinMaxFrequency",
        "policyDescription": "EnsureLimit numbervDNS ofScale instancesUp withinover atime rangeperiod",
        "ecompNameonapName": "PDPD",
        "ruleProvider": "GUARD_YAML",
        "attributes": {
                "MATCHING": {
                        "actor": "SO",
                        "recipe": "scaleOut",
                        "targets": ".*",
                        "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
                        "minlimit": "1",
                        "timeWindow": "max"10",
                        "timeUnits": "5minute",
                        "guardActiveStart": "00:00:01-05:00",
                        "guardActiveEnd": "00:00:00-05:00"
                }
        }
}' 'http://pdp:8081/pdp/api/createPolicy'


Code Block
titlevDNS Guard - Frequency Limiter Create API CallPush Policies API call
linenumberstrue
collapsetrue
# DRAFT - this needs to be tested first
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
     
  "policyClasspdpGroup": "Decisiondefault",
        "policyName": "com.vDNS.FrequencyBRMSParamvDNS",
  
     "policyDescriptionpolicyType": "BRMS_Param"Limit
vDNS Scale Up over time period",
        "ecompName": "PDPD",
        "ruleProvider": "GUARD_YAML",
        "attributes": {
                "MATCHING": {
                        "actor": "SO",
                        "recipe": "scaleOut",
                        "targets": ".*",
       }' 'http://pdp:8081/pdp/api/pushPolicy'



curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.vDNS.MinMax",
  "policyType": "DECISION"
}' 'http://pdp:8081/pdp/api/pushPolicy'




curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.vDNS.Frequency",
  "policyType": "DECISION"
}' 'http://pdp:8081/pdp/api/pushPolicy'



curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevDNS",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'

DCAE Events and A&AI Enrichment (if necessary)

Code Block
titlevDNS - DCAE Control Loop Event (TCA) - vDNS (NOT Enriched with A&AI)
linenumberstrue
collapsetrue
{
                "clnameclosedLoopEventClient": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
  DCAE_INSTANCE_ID.dcae-tca",
                     "limitpolicyVersion": "1.0.0.5",
       
                "timeWindowpolicyName": "10vLoadBalancer",
                "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
        "timeUnits": "minute",       "target_type": "VM",
                "guardActiveStartAAI": "00:00:01-05:00",{
                        "guardActiveEnd"vserver.vserver-name": "00:00:00-05:00dfw1lb01lb01"
                },
        } }' 'http://pdp:8081/pdp/api/createPolicy'  
Code Block
titlevDNS Push Policies API call
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamvDNS",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'



curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.vDNS.MinMax",
  "policyType": "DECISION"
}' 'http://pdp:8081/pdp/api/pushPolicy'




curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.vDNS.Frequency",
  "policyType": "DECISION"
}' 'http://pdp:8081/pdp/api/pushPolicy'



curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevDNS",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'

...

Code Block
titlevDNS - DCAE Control Loop Event (TCA) - vDNS (NOT Enriched with A&AI)
linenumberstrue
collapsetrue
{
       "closedLoopAlarmStart": 1484677482204798,
                "closedLoopEventStatus": "ONSET",
                "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
                "version": "1.0.2",
                "target": "vserver.vserver-name",
                "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
                "from": "DCAE"
}
Code Block
titlevDNS - A&AI vserver query
linenumberstrue
collapsetrue
#PLD find the vserver version 


https://{aai}/aai/v11/nodes/vservers?vserver-name=dfw1lb01lb01



Code Block
titlevDNS - A&AI vserver query response
linenumberstrue
collapsetrue
{
    "vserver": [
        {
            "in-maint": false,
            "is-closed-loop-disabled": true,
            "prov-status": "ACTIVE",
            "relationship-list": {
         "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",      "relationship": [
         "policyVersion": "1.0.0.5",          {
      "policyName": "vLoadBalancer",                 "policyScoperelated-link": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",
                "target_type        "related-to": "VMgeneric-vnf",
                "AAI": {        "related-to-property": [
                          "vserver.vserver-name": "dfw1lb01lb01" {
               },                 "closedLoopAlarmStartproperty-key": 1484677482204798"generic-vnf.vnf-name",
                "closedLoopEventStatus": "ONSET",
                "closedLoopControlNameproperty-value": "ControlLoopvLoadBalancerMS-vDNSVnf-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",0809-2"
                "version": "1.0.2",           }
     "target": "vserver.vserver-name",                 "requestID": "97964e10-686e-4790-8c45-bdfa61df770f", ],
                        "fromrelationship-data": "DCAE"
}
Code Block
titlevDNS - A&AI vserver query
linenumberstrue
collapsetrue
#PLD find the vserver version 


https://{aai}/aai/v11/nodes/vservers?vserver-name=dfw1lb01lb01



Code Block
titlevDNS - A&AI vserver query response
linenumberstrue
collapsetrue
{ [
                        "vserver": [   {
     {             "in-maint": false,             "is-closed-loop-disabled": true,relationship-key": "generic-vnf.vnf-id",
                  "prov-status": "ACTIVE",             "relationship-listvalue": {"807a3f02-f878-436b-870c-f0e91e81570d"
                     "relationship": [      }
              {          ]
              "related-link": "/aai/v11/network/generic-vnfs/generic-vnf/807a3f02-f878-436b-870c-f0e91e81570d",     },
                   "related-to": "generic-vnf", {
                        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",
                        "related-to": "image",
                        "related-to-property": [
                            {
                                "property-key": "generic-vnfimage.vnfimage-name",
                                "property-value": "vLoadBalancerMS-Vnf-0809-2unknown"
                            }
                        ],
                        "relationship-data": [
                            {
                                "relationship-key": "genericcloud-vnfregion.vnfcloud-idowner",
                                "relationship-value": "807a3f02-f878-436b-870c-f0e91e81570dCloudOwner"
                            },
                           ] {
                    },            "relationship-key": "cloud-region.cloud-region-id",
       {                         "relatedrelationship-linkvalue": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/images/image/6e219e86-cd94-4989-9119-def29aa10b12",RegionOne"
                            "related-to": "image",
  },
                     "related-to-property": [
                            {
                                "propertyrelationship-key": "image.image-nameid",
                                "propertyrelationship-value": "unknown6e219e86-cd94-4989-9119-def29aa10b12"
                            }
                        ],
                        "relationship-data": [
       },
                    {

                               "relationship-key"related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region.cloud-owner",
       /CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39",
                        "relationshiprelated-valueto": "CloudOwnerflavor",
                            },"related-to-property": [
                            {
                                "relationshipproperty-key": "cloud-regionflavor.cloudflavor-region-idname",
                                "relationshipproperty-value": "RegionOnem1.medium"
                            },
                        ],
   {                        "relationship-data": [
        "relationship-key": "image.image-id",                    {
                                "relationship-valuekey": "6e219e86cloud-cd94-4989-9119-def29aa10b12"region.cloud-owner",
                            }
    "relationship-value": "CloudOwner"
                       ]     },
               },             {
       {                         "relatedrelationship-linkkey": "/aai/v11/cloud-infrastructure/cloud-regions/region.cloud-region/CloudOwner/RegionOne/flavors/flavor/764efb04-5a46-4806-a766-2bdd24559f39-id",
                         "related-to       "relationship-value": "flavorRegionOne",
                           "related-to-property": [ },
                            {
                                "propertyrelationship-key": "flavor.flavor-nameid",
                                "propertyrelationship-value": "m1.medium764efb04-5a46-4806-a766-2bdd24559f39"
                            }
                        ],
                    }
   "relationship-data": [            ]
            },
   {         "resource-version": "1533850964910",
            "vserver-id": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774",
            "relationshipvserver-keyname": "cloud-region.cloud-ownervlb-ms-0809-1",
               "vserver-name2": "vlb-ms-0809-7",
                "relationshipvserver-valueselflink": "CloudOwnerhttp://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
        }
    ]
}

Code Block
titlevDNS DCAE Control Loop Event - Enriched A&AI
linenumberstrue
collapsetrue
{
           },     "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
                "policyVersion": "1.0.0.5",
    {                "policyName": "vLoadBalancer",
                "relationship-keypolicyScope": "cloud-region.cloud-region-idresource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
                "target_type": "VM",
                "relationship-valueAAI": "RegionOne"{
                            },
   "vserver.vserver-name": "dfw1lb01lb01"
# TODO - add in the enriched A&AI
                },
       {         "closedLoopAlarmStart": 1484677482204798,
                      "relationship-key"closedLoopEventStatus": "flavor.flavor-idONSET",
   
                            "relationship-value"closedLoopControlName": "764efb04-5a46-4806-a766-2bdd24559f39"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
                "version": "1.0.2",
          }      "target": "vserver.vserver-name",
                 ]"requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
                    }
                ]
  "from": "DCAE"
}

A&AI API Interaction

Code Block
titlevDNS - A&AI vserver named query
linenumberstrue
collapsetrue
#PLD find the vserver version 


https://{aai}/aai/search/named-query

{
  "query-parameters": {
    "named-query": {
         },"named-query-uuid": "4ff56a54-9e3f-46b7-a337-07a1d3c6b469"
    }
    },
  "resourceinstance-versionfilters": "1533850964910",
 {
          "vserver-id"instance-filter": "1c94da3f-16f1-4fc7-9ed1-e018dfa62774", [
      {
        "vserver-name": "vlb-ms-0809-1",
 {
          "vserver-name2name": "vlb-ms-0809-7",vserver-71c978fb-29b8-437d-80e6-acf3a3a91e69"
        }
    "vserver-selflink": "http://localhost:8774/v2.1/4086f396c5e04caf9502c5fdeca575c4/servers/1c94da3f-16f1-4fc7-9ed1-e018dfa62774"
 }
    ]
  }
    ]
}

Code Block
titlevDNS DCAE Control Loop Event - Enriched A&AI vserver named query response
linenumberstrue
collapsetrue
{
    "inventory-response-item": [
        {
 "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",                 "policyVersion"vserver": "1.0.0.5",{
                "policyNamevserver-id": "vLoadBalancer143473ac-1b32-47bc-aa07-10a680d2bbbb",
                "policyScopevserver-name": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoopvlb-ms-0706-1",
                "target_typevserver-name2": "VMvlb-ms-0706-1",
                "AAIprov-status": {"ACTIVE",
                    "vserver.vserver-nameselflink": "dfw1lb01lb01"
# TODO - add in the enriched A&AIhttp://ecompctl1.research.att.com:8774/v2/3f2aaef74ecb4b19b35e26d0849fe9a2/servers/143473ac-1b32-47bc-aa07-10a680d2bbbb",
                        }"in-maint": false,
                "closedLoopAlarmStartis-closed-loop-disabled": 1484677482204798false,
                "closedLoopEventStatusresource-version": "ONSET",1531949079952"
            },
            "closedLoopControlNameextra-properties": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
{},
               "version"inventory-response-items": "1.0.2",{
                "targetinventory-response-item": "vserver.vserver-name",[
                    {
      "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",                 "frommodel-name": "DCAEvLoadBalancerMS"
}

SO API Interaction

Code Block
titlevDNS - SO Request
linenumberstrue
collapsetrue
TODO - this is new work
Code Block
titlevDNS - SO Response ACCEPTED
linenumberstrue
collapsetrue
TODO - this is new work
Code Block
titlevDNS - SO Response SUCCESS
linenumberstrue
collapsetrue
TODO - this is new work

vFirewall

Policy Creation

Code Block
titlevFirewall - TCA Configuration Policy Payload
linenumberstrue
collapsetrue
tca_policy: "{
  "domain": "measurementsForVfScaling",
  "metricsPerEventName": [,
                        "generic-vnf": {
     {       "eventName": "vFirewallBroadcastPackets",       "controlLoopSchemaType": "VNF",       "policyScopevnf-id": "DCAE",
f524b92a-b5bd-4c9d-9c92-2ef672bc070f",
     "policyName": "DCAE.Config_tca-hi-lo",                       "policyVersionvnf-name": "v0.0.vLoadBalancerMS-Vnf-0706-1",
        "thresholds": [         {           "closedLoopControlNamevnf-type": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",vLoadBalancerMS/vLoadBalancerMS 0",
                "version": "1.0.2",           "fieldPathservice-id": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta50e1b0be-e0c9-48e2-9f42-15279a783ee8",
          "thresholdValue": 300,                  "directionprov-status": "LESS_OR_EQUALPROV",
               "severity": "MAJOR",             "closedLoopEventStatusorchestration-status": "ONSETActive",
        },         {           "closedLoopControlNameipv4-oam-address": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a10.0.150.1",
          "version": "1.0.2",                  "fieldPathin-maint": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta"false,
          "thresholdValue": 700,                  "directionis-closed-loop-disabled": "GREATER_OR_EQUAL",false,
                "severity": "CRITICAL",           "closedLoopEventStatusresource-version": "ONSET1533141664663",
          }       ]     }   ]   }"
Code Block
titlevFirewall - Create Config Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{"model-invariant-id": "32f7ec6a-1c54-4c06-a548-fe84832e3c40",
                            "configBodymodel-version-id": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",
        "policyConfigType": "MicroService",2db7689c-a979-4418-b71f-6a45a32f4791",
                            "model-customization-id": "f3af2f41-8ea2-4f3c-8d85-aaede9699a71",
                            "nf-type": "nf-type",
                            "nf-function": "nf-function",
                            "nf-role": "nf-role",
                            "nf-naming-code": ""
                        },
                        "extra-properties": {
                            "extra-property": [
         "policyName": "com.MicroServicevFirewall",         "onapName": "DCAE" }' 'http://pdp:8081/pdp/api/createPolicy'  
Code Block
titlevFirewall - Operational Policy
linenumberstrue
collapsetrue
controlLoop:   version: 2.0.0   controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a {
  trigger_policy: unique-policy-id-1-modifyConfig
  timeout: 1200
  abatement: false

policies:
  - id: unique-policy-id-1-modifyConfig                                  "property-name": "model-ver.model-version-id",
    name: modify packet gen config     description:     actor: APPC     recipe: ModifyConfig     target:       # TBD - Cannot be known until instantiation is done"property-value": "2db7689c-a979-4418-b71f-6a45a32f4791"
               resourceID: Eace933104d443b496b8.nodes.heat.vpg 	  type: VNF	     retry: 0     timeout: 300},
    success: final_success     failure: final_failure     failure_timeout: final_failure_timeout     failure_retries: final_failure_retries     failure_exception: final_failure_exception   {
 failure_guard: final_failure_guard  
Code Block
titlevFirewall - Create Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{          "configBodyproperty-name": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",model-ver.model-name",
                                    "property-value": "vLoadBalancerMS"
                                },
                                {
                                    "property-name": "model.model-type",
                           "policyConfigType": "MicroService",         "policyNameproperty-value": "com.MicroServicevFirewallresource",
        "onapName": "DCAE" }' 'http://pdp:8081/pdp/api/createPolicy'  
Code Block
titlevFirewall - Push Policies
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamvFirewall",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'

curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevFirewall",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'

DCAE Events and A&AI Enrichment (if necessary)

Code Block
titlevFirewall - DCAE Control Loop Event (NOT enriched with A&AI)
linenumberstrue
collapsetrue
{
    "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
    "policyVersion": "1.0.0.5",
    "policyName": "vFirewall",
    "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
    "target_type": "VNF",
    "AAI": {     },
                                {
                                    "property-name": "model.model-invariant-id",
                                    "property-value": "32f7ec6a-1c54-4c06-a548-fe84832e3c40"
                          "generic-vnf.vnf-name": "zdfw1fwl01fwl02"     },
    "closedLoopAlarmStart": 1484855291527925,     "closedLoopEventStatus": "ONSET",     "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",     "version": "1.0.2",     "target": "generic-vnf.vnf-name",   {
 "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",     "from": "DCAE" }
Code Block
titlevFirewall - A&AI generic-vnf query
linenumberstrue
collapsetrue
https://{aai}/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=zdfw1fwl01fwl02   
Code Block
titlevFirewall - A&AI generic-vnf query response
linenumberstrue
collapsetrue
{     "vnf-id": "4e46ad6c-cebe-4460-858e-b5806883271b",     "vnf-name": "vfw7f5a57d6",     "vnf-type": "da818f33-97e1-4edf-98a5/5759f208-b75c-4b35-9599 0",     "serviceproperty-idname": "a322c144model-537c-4532-bf1b-0a4889083388ver.model-version",
    "prov-status": "PREPROV",     "orchestration-status": "Created",        "in-maint": false,     "is-closed-loop-disabled": false,     "resource-version": "1521467089262",     "modelproperty-invariant-idvalue": "a1efbbdd-2077-4b86-9fc0-244af99760f0",1.0"
        "model-version-id": "34c3221b-1326-4f35-9ed7-6f2f7e59d788",     "model-customization-id": "1798c9a9-eaae-438f-bac3-b013599e8909",     "nf-type": "",     "nf-function": "",     "nf-role": "",}
     "nf-naming-code": "",     "relationship-list": {         "relationship": [      ]
      {                 "related-to": "service-instance", },
                        "relatedinventory-response-linkitems": "/aai/v11/business/customers/customer/DemoCust_7d454ef5-f5ea-4346-b2d3-e9797f5a57d6/service-subscriptions/service-subscription/vFW/service-instances/service-instance/7c45e4f7-aa7a-4130-9ee3-c5c1d81840df", {
                            "relationshipinventory-response-dataitem": [
                    {            {
            "relationship-key": "customer.global-customer-id",
                        "relationshipmodel-valuename": "DemoCust_7d454ef5-f5ea-4346-b2d3-e9797f5a57d6"vLoadBalancerMS",
                           },         "service-instance": {
              {                          "relationshipservice-instance-keyid": "service-subscription.service-typef242d516-7c96-4b02-a74d-4363b4267459",
                        "relationship-value": "vFW"                     },
    "service-instance-name": "vLoadBalancerMS-Service-0706-1",
               {                         "relationshipenvironment-keycontext": "service-instance.service-instance-id",General_Revenue-Bearing",
                               "relationship-value": "7c45e4f7-aa7a-4130-9ee3-c5c1d81840df"              "workload-context": "Production",
      }                 ],                 "relatedmodel-toinvariant-propertyid": ["2d4e2c32-2ffb-494a-9677-073a08f637dd",
                    {                         "property-key"model-version-id": "service-instance.service-instance-name",4dd37f02-7da5-451c-ba76-032a5b465c65",
                         "property-value               "resource-version": "Service_Ete_Name7d454ef5-f5ea-4346-b2d3-e9797f5a57d6"1530889799597",
                    }                 ]   "orchestration-status": "Active"
        },             {               },
 "related-to": "vserver",                 "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/3f3f3c72-269d-45e6-8953-692424f2df1f",                 "relationshipextra-dataproperties": [{
                    {                    "extra-property": [
   "relationship-key": "cloud-region.cloud-owner",
                        "relationship-value": "CloudOwner"                  {
  },                     {                         "relationshipproperty-keyname": "cloudmodel-regionver.cloudmodel-regionversion-id",
                        "relationship-value": "RegionOne"                       },
  "property-value": "4dd37f02-7da5-451c-ba76-032a5b465c65"
                  {                         "relationship-key": "tenant.tenant-id" },
                        "relationship-value": "50b190410b2a4c229d8a6044a80ab7c1"                   {
 },                      {                         "relationshipproperty-keyname": "vservermodel-ver.vservermodel-idname",
                         "relationship-value": "3f3f3c72-269d-45e6-8953-692424f2df1f"                     } "property-value": "vLoadBalancerMS"
              ],                 "related-to-property": [            },
        {                         "property-key": "vserver.vserver-name",          {
              "property-value": "demofwl01pgn"                     }            "property-name": "model.model-type",
   ]                                             "property-value": "service"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "2d4e2c32-2ffb-494a-9677-073a08f637dd"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1.0"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "c0831ca7-0a20-4f03-a183-1135381b8707",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_2",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_2/122b563a-2c56-4804-aa81-970ba7741b55",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1531510457103",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 0
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "50e6e588-fe87-4663-aa10-51964f51a67d",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_4",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_4/ec246cff-38e3-4c89-99bf-21bc925b073c",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1531925572435",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 2
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                               "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "8853e587-07d9-4081-9f90-61af87cd34bf",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_3",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_3/10d56b1b-1d3e-4677-a31f-3449e1e3c457",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1531840660936",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 1
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "51dbbf67-6e25-4d0c-8c18-ba7f21b8cfb3",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_6",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_6/8486eafa-d860-4c17-a1bf-a1c436290806",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1532638352675",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 4
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "c6256fd8-dfa7-49fd-a320-4be08bb3a49d",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_7",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_7/8a587bc3-96b1-4ba7-9f4a-d40f669d08de",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1532702700715",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 5
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "dummy_f524b92a-b5bd-4c9d-9c92-2ef672bc070f",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_0",
                                        "is-base-vf-module": false,
                                        "resource-version": "1537212348939",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef"
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..dnsscaling..module-1",
                                    "vf-module": {
                                        "vf-module-id": "aa9294f3-8cd6-483c-8165-8e303b7022a4",
                                        "vf-module-name": "vLoadBalancerMS-Vnf-0706-1_5",
                                        "heat-stack-id": "vLoadBalancerMS-Vnf-0706-1_5/39e7f1bd-1746-4370-aec5-1ff83a28a9a9",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": false,
                                        "resource-version": "1532616866686",
                                        "model-invariant-id": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b",
                                        "model-version-id": "3db507c6-bec6-47a3-9ac3-5978d3f03882",
                                        "model-customization-id": "1726b74e-8831-4b0a-a1f3-c254cc2e8fef",
                                        "module-index": 3
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "3db507c6-bec6-47a3-9ac3-5978d3f03882"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..dnsscaling..module-1"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                            {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "285adb8d-b6b4-41f6-8f28-48f86ad4fa3b"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                },
                                {
                                    "model-name": "Vloadbalancerms..base_vlb..module-0",
                                    "vf-module": {
                                        "vf-module-id": "155949a5-8494-45c8-84db-3675dcc5a64f",
                                        "vf-module-name": "Vfmodule_vLBMS-0706-1",
                                        "heat-stack-id": "Vfmodule_vLBMS-0706-1/76c42b6b-09b0-434b-85a7-2b226eb3d31c",
                                        "orchestration-status": "active",
                                        "is-base-vf-module": true,
                                        "resource-version": "1530890184655",
                                        "model-invariant-id": "f96252ec-2729-45c7-ae73-a4e4bf495838",
                                       "model-version-id": "75122eb8-1482-4c68-b7cf-dd8458f58ba5",
                                        "model-customization-id": "f979a817-584e-4857-b585-c8f409eccbdd",
                                        "module-index": 0
                                    },
                                    "extra-properties": {
                                        "extra-property": [
                                            {
                                                "property-name": "model-ver.model-version-id",
                                                "property-value": "75122eb8-1482-4c68-b7cf-dd8458f58ba5"
                                            },
                                            {
                                                "property-name": "model-ver.model-name",
                                                "property-value": "Vloadbalancerms..base_vlb..module-0"
                                            },
                                            {
                                                "property-name": "model.model-type",
                                                "property-value": "resource"
                                            },
                                           {
                                                "property-name": "model.model-invariant-id",
                                                "property-value": "f96252ec-2729-45c7-ae73-a4e4bf495838"
                                            },
                                            {
                                                "property-name": "model-ver.model-version",
                                                "property-value": "1"
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    },
                    {
                        "tenant": {
                            "tenant-id": "3f2aaef74ecb4b19b35e26d0849fe9a2",
                            "tenant-name": "ONAP-demo-test",
                            "resource-version": "1529419258510"
                        },
                        "extra-properties": {},
                        "inventory-response-items": {
                            "inventory-response-item": [
                                {
                                    "cloud-region": {
                                        "cloud-owner": "CloudOwner",
                                        "cloud-region-id": "RegionOne",
                                        "cloud-type": "openstack",
                                        "owner-defined-type": "owner type",
                                        "cloud-region-version": "v2.5",
                                        "cloud-zone": "zone-1",
                                        "sriov-automation": false,
                                        "resource-version": "1529419258443"
                                    },
                                    "extra-properties": {}
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}



SO API Interaction

Code Block
titlevDNS - SO Request
linenumberstrue
collapsetrue
https://{so}/serviceInstantiation/v7/3b12f31f-8f2d-4f5c-b875-61ff1194b941/vnfs/db373a8d-f7be-4d02-8ac8-6ca4c305d144/vfModules/scaleOut

{
  "requestDetails": {
    "modelInfo": {
      "modelType": "vfModule",
      "modelInvariantId": "356a1cff-71f2-4086-9980-a2927ce11c1c",
      "modelVersionId": "6b93d804-cfc8-4be3-92cc-9336d135859a",
      "modelName": "Vloadbalancer..dnsscaling..module-1",
      "modelVersion": "1"
    },
    "cloudConfiguration": {
      "lcpCloudRegionId": "RegionOne",
      "tenantId": "41d6d38489bd40b09ea8a6b6b852dcbd"
    },
    "requestInfo": {
      "instanceName": "my_module_3",
      "source": "POLICY",
      "suppressRollback": false,
      "requestorId": "policy"
    },
    "relatedInstanceList": [
      {
        "relatedInstance": {
          "instanceId": "3b12f31f-8f2d-4f5c-b875-61ff1194b941",
          "modelInfo": {
            "modelType": "service",
            "modelInvariantId": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a",
            "modelVersionId": "732d4692-4b97-46f9-a996-0b3339e88c50",
            "modelName": "vLoadBalancer-1106",
            "modelVersion": "1.0"
          }
        }
      },
      {
        "relatedInstance": {
          "instanceId": "db373a8d-f7be-4d02-8ac8-6ca4c305d144",
          "modelInfo": {
            "modelType": "vnf",
            "modelInvariantId": "cee050ed-92a5-494f-ab04-234307a846dc",
            "modelVersionId": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2",
            "modelName": "vLoadBalancer",
            "modelVersion": "1.0",
            "modelCustomizationName": "vLoadBalancer 0"
          }
        }
      }
    ],
    "requestParameters": {
      "usePreload": true,
      "userParams": []
    },
    "configurationParameters": [
      {
        "availability-zone": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
        "xtz-123": "$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
      }
    ]
  }
}
Code Block
titlevDNS - SO Response ACCEPTED
linenumberstrue
collapsetrue
{
	"requestReferences": {
		"requestId": "60533ee3-814d-4949-be93-e6b26aace580"
	},
	"request": {
		"requestId":"d5bc27f2-1d5c-405d-a985-3e3f544c1582",
		"requestStatus": {
			"percentProgress": 0,
			"requestState": "IN_PROGRESS",
			"wasRolledBack": false
		}
	},
	"httpResponseCode": 0
}
Code Block
titlevDNS - SO Request Status Query (if not complete)
linenumberstrue
collapsetrue
https://{so}/orchestrationRequests/v5/60533ee3-814d-4949-be93-e6b26aace580
Code Block
titlevDNS - SO Response SUCCESS
linenumberstrue
collapsetrue
{
	"requestReferences": {
		"requestId": "60533ee3-814d-4949-be93-e6b26aace580"
	},
	"request": {
		"requestId":"d5bc27f2-1d5c-405d-a985-3e3f544c1582",
		"requestStatus": {
			"percentProgress": 100,
			"requestState": "COMPLETE",
			"wasRolledBack": false
		}
	},
	"httpResponseCode": 0
}




vFirewall

Policy Creation

Code Block
titlevFirewall - TCA Configuration Policy Payload
linenumberstrue
collapsetrue
tca_policy: "{
  "domain": "measurementsForVfScaling",
  "metricsPerEventName": [
    {
      "eventName": "vFirewallBroadcastPackets",
      "controlLoopSchemaType": "VNF",
      "policyScope": "DCAE",
      "policyName": "DCAE.Config_tca-hi-lo",
      "policyVersion": "v0.0.1",
 
      "thresholds": [
        {
          "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
          "version": "1.0.2",
          "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
          "thresholdValue": 300,
          "direction": "LESS_OR_EQUAL",
          "severity": "MAJOR",
          "closedLoopEventStatus": "ONSET"
        },
        {
          "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
          "version": "1.0.2",
          "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
          "thresholdValue": 700,
          "direction": "GREATER_OR_EQUAL",
          "severity": "CRITICAL",
          "closedLoopEventStatus": "ONSET"
        }
      ]
    }
  ]
 
}"
Code Block
titlevFirewall - Create Config Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevFirewall",
        "onapName": "DCAE"
}' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titlevFirewall - Operational Policy
linenumberstrue
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
  trigger_policy: unique-policy-id-1-modifyConfig
  timeout: 1200
  abatement: false

policies:
  - id: unique-policy-id-1-modifyConfig
    name: modify packet gen config
    description:
    actor: APPC
    recipe: ModifyConfig
    target:
      # TBD - Cannot be known until instantiation is done
      resourceID: Eace933104d443b496b8.nodes.heat.vpg
	  type: VNF	
    retry: 0
    timeout: 300
    success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    failure_retries: final_failure_retries
    failure_exception: final_failure_exception
    failure_guard: final_failure_guard

Code Block
titlevFirewall - Create Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{

        "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevFirewall\", \"description\": \"MicroService vFirewall Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"vFirewallBroadcastPackets\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 300, \"direction\": \"LESS_OR_EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ONSET\" }, { \"closedLoopControlName\": \"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta\", \"thresholdValue\": 700, \"direction\": \"GREATER_OR_EQUAL\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" } ] }] } } }",
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevFirewall",
        "onapName": "DCAE"
}' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titlevFirewall - Push Policies
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamvFirewall",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'

curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevFirewall",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'

DCAE Events and A&AI Enrichment (if necessary)

Code Block
titlevFirewall - DCAE Control Loop Event (NOT enriched with A&AI)
linenumberstrue
collapsetrue
{
    "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
    "policyVersion": "1.0.0.5",
    "policyName": "vFirewall",
    "policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=SampleClosedLoop",
    "target_type": "VNF",
    "AAI": {
        "generic-vnf.vnf-name": "zdfw1fwl01fwl02"
    },
    "closedLoopAlarmStart": 1484855291527925,
    "closedLoopEventStatus": "ONSET",
    "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
    "version": "1.0.2",
    "target": "generic-vnf.vnf-name",
    "requestID": "8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc",
    "from": "DCAE"
}
Code Block
titlevFirewall - A&AI generic-vnf query
linenumberstrue
collapsetrue
https://{aai}/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=zdfw1fwl01fwl02


Code Block
titlevFirewall - A&AI generic-vnf query response
linenumberstrue
collapsetrue
{
    "vnf-id": "4e46ad6c-cebe-4460-858e-b5806883271b",
    "vnf-name": "vfw7f5a57d6",
    "vnf-type": "da818f33-97e1-4edf-98a5/5759f208-b75c-4b35-9599 0",
    "service-id": "a322c144-537c-4532-bf1b-0a4889083388",
    "prov-status": "PREPROV",
    "orchestration-status": "Created",
    "in-maint": false,
    "is-closed-loop-disabled": false,
    "resource-version": "1521467089262",
    "model-invariant-id": "a1efbbdd-2077-4b86-9fc0-244af99760f0",
    "model-version-id": "34c3221b-1326-4f35-9ed7-6f2f7e59d788",
    "model-customization-id": "1798c9a9-eaae-438f-bac3-b013599e8909",
    "nf-type": "",
    "nf-function": "",
    "nf-role": "",
    "nf-naming-code": "",
    "relationship-list": {
        "relationship": [
            {
                "related-to": "service-instance",
                "related-link": "/aai/v11/business/customers/customer/DemoCust_7d454ef5-f5ea-4346-b2d3-e9797f5a57d6/service-subscriptions/service-subscription/vFW/service-instances/service-instance/7c45e4f7-aa7a-4130-9ee3-c5c1d81840df",
                "relationship-data": [
                    {
                        "relationship-key": "customer.global-customer-id",
                        "relationship-value": "DemoCust_7d454ef5-f5ea-4346-b2d3-e9797f5a57d6"
                    },
                    {
                        "relationship-key": "service-subscription.service-type",
                        "relationship-value": "vFW"
                    },
                    {
                        "relationship-key": "service-instance.service-instance-id",
                        "relationship-value": "7c45e4f7-aa7a-4130-9ee3-c5c1d81840df"
                    }
                ],
                "related-to-property": [
                    {
                        "property-key": "service-instance.service-instance-name",
                        "property-value": "Service_Ete_Name7d454ef5-f5ea-4346-b2d3-e9797f5a57d6"
                    }
                ]
            },
            {
                "related-to": "vserver",
                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/3f3f3c72-269d-45e6-8953-692424f2df1f",
                "relationship-data": [
                    {
                        "relationship-key": "cloud-region.cloud-owner",
                        "relationship-value": "CloudOwner"
                    },
                    {
                        "relationship-key": "cloud-region.cloud-region-id",
                        "relationship-value": "RegionOne"
                    },
                    {
                        "relationship-key": "tenant.tenant-id",
                        "relationship-value": "50b190410b2a4c229d8a6044a80ab7c1"
                    },
                    {
                        "relationship-key": "vserver.vserver-id",
                        "relationship-value": "3f3f3c72-269d-45e6-8953-692424f2df1f"
                    }
                ],
                "related-to-property": [
                    {
                        "property-key": "vserver.vserver-name",
                        "property-value": "demofwl01pgn"
                    }
                ]
            },
            {
                "related-to": "vserver",
                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/4c45d0a4-a873-4d95-87ca-2a198322c9c4",
                "relationship-data": [
                    {
                        "relationship-key": "cloud-region.cloud-owner",
                        "relationship-value": "CloudOwner"
                    },
                    {
                        "relationship-key": "cloud-region.cloud-region-id",
                        "relationship-value": "RegionOne"
                    },
                    {
                        "relationship-key": "tenant.tenant-id",
                        "relationship-value": "50b190410b2a4c229d8a6044a80ab7c1"
                    },
                    {
                        "relationship-key": "vserver.vserver-id",
                        "relationship-value": "4c45d0a4-a873-4d95-87ca-2a198322c9c4"
                    }
                ],
                "related-to-property": [
                    {
                        "property-key": "vserver.vserver-name",
                        "property-value": "demofwl01snk"
                    }
                ]
            },
            {
                "related-to": "vserver",
                "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/b96416ef-fc4e-49cb-8120-1d56686d2e90",
                "relationship-data": [
                    {
                        "relationship-key": "cloud-region.cloud-owner",
                        "relationship-value": "CloudOwner"
                    },
                    {
                        "relationship-key": "cloud-region.cloud-region-id",
                        "relationship-value": "RegionOne"
                    },
                    {
                        "relationship-key": "tenant.tenant-id",
                        "relationship-value": "50b190410b2a4c229d8a6044a80ab7c1"
                    },
                    {
                        "relationship-key": "vserver.vserver-id",
                        "relationship-value": "b96416ef-fc4e-49cb-8120-1d56686d2e90"
                    }
                ],
                "related-to-property": [
                    {
                        "property-key": "vserver.vserver-name",
                        "property-value": "vfw7f5a57d6"
                    }
                ]
            }
        ]
    }
}

APPC API Interaction

Code Block
titlevFirewall - APPC Request
linenumberstrue
collapsetrue
{
    "CommonHeader": {
          "TimeStamp": 1500997725298,
          "APIver": "1.01",
          "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200",
          "RequestTrack": [],
          "Flags": []
    },
    "Action": "ModifyConfig",
    "Payload": {
        "generic-vnf.vnf-id": "fw0001vm001fw001",
        "pg-streams": {
            "pg-stream": [
            {
                "id": "fw_udp1",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp2",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp3",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp4",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp5",
                "is-enabled": "true"
            }]
        }
    }
}
Code Block
titlevFirewall - APPC Responses
linenumberstrue
collapsetrue
ACCEPT response
 
{
    "Status": {
        "Value": "ACCEPTED",
        "Code": "100"
    },
    "Payload": {
        "pg-streams": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}",
        "generic-vnf.vnf-id": "fw0001vm001fw001"
    },
    "CommonHeader": {
        "TimeStamp": "1493841850199",
        "APIver": "1.01",
        "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200",
        "SubrequestID": null,
        "OriginatorID": null
    }
}
 
 
SUCCESS response
 
 
{
    "Status": {
        "Value": "SUCCESS",
        "Code": "400"
    },
    "Payload": {
        "pg-streams": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}",
        "generic-vnf.vnf-id": "fw0001vm001fw001"
    },
    "CommonHeader": {
        "TimeStamp": "1493841850199",
        "APIver": "1.01",
        "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200",
        "SubrequestID": null,
        "OriginatorID": null
    }
}


TODO FAILED response


vCPE

Policy Creation and Pushing

Code Block
titlevCPE - TCA Configuration Policy Payload
linenumberstrue
collapsetrue
tca_policy: "{
       "domain": "measurementsForVfScaling",
       "metricsPerEventName": [{
              "eventName": "Measurement_vGMUX",
              "controlLoopSchemaType": "VNF",
              "policyScope": "DCAE",
              "policyName": "DCAE.Config_tca-hi-lo",
              "policyVersion": "v0.0.1",
              "thresholds": [{
                     "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
                     "version": "1.0.2",
                     "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
                     "thresholdValue": 0,
                     "direction": "EQUAL",
                     "severity": "MAJOR",
                     "closedLoopEventStatus": "ABATED"
              }, {
                     "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
                     "version": "1.0.2",
                     "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
                     "thresholdValue": 0,
                     "direction": "GREATER",
                     "severity": "CRITICAL",
                     "closedLoopEventStatus": "ONSET"
              }]
       }]
}"
Code Block
titlevCPE - Create Config Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{

        "configBody": "{ \"service\": \"tca_policy\", \"location\": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"Measurement_vGMUX\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ABATED\" }, { \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"GREATER\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }",
        "policyConfigType": "MicroService",
        "policyName": "com.MicroServicevCPE",
        "onapName": "DCAE"
}' 'http://pdp:8081/pdp/api/createPolicy'
Code Block
titlevCPE Operational Policy
linenumberstrue
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
  trigger_policy: unique-policy-id-1-restart
  timeout: 3600
  abatement: true

policies:
  - id: unique-policy-id-1-restart
    name: Restart the VM
    description:
    actor: APPC
    recipe: Restart
    target:
      type: VM
    retry: 3
    timeout: 1200
    success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    failure_retries: final_failure_retries
    failure_exception: final_failure_exception
    failure_guard: final_failure_guard
Code Block
titlevCPE - Create Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
        "policyConfigType": "BRMS_PARAM",
        "policyName": "com.BRMSParamvCPE",
        "policyDescription": "BRMS Param vCPE policy",
        "policyScope": "com",
        "attributes": {
            "MATCHING": {
                "controller" : "amsterdam"
            },
                "RULE": {
                        "templateName": "ClosedLoopControlName",
                        "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
                        "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                "related-to": "vserver",}
        }
        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/4c45d0a4-a873-4d95-87ca-2a198322c9c4",
                "relationship-data": [
                    {
                        "relationship-key": "cloud-region.cloud-owner",
                        "relationship-value": "CloudOwner"
                    },
                    {
      }' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titlevCPE - Push Policies
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamvCPE",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'


curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevCPE",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'


DCAE Events and A&AI Enrichment (if necessary)

Code Block
titlevCPE - DCAE Control Loop Event (TCA) - NOT Enriched
linenumberstrue
collapsetrue
{
                 "relationship-key"closedLoopControlName": "cloud-region.cloud-region-idControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
                        "relationship-value"version": "RegionOne1.0.2",
                    }"requestID": "0abc0000-b032-4e4b-bd30-88260f444888",
            "closedLoopAlarmStart": 1478189220547,
      {      "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
                 "relationship-key"target_type": "tenant.tenant-idVNF",
           
            "relationship-valuetarget": "50b190410b2a4c229d8a6044a80ab7c1"generic-vnf.vnf-name",
            "AAI": {
      },         "generic-vnf.vnf-name"         : "vCPE_Infrastructure_vGMUX_demo_app"
  {          },
              "relationship-keyfrom": "vserver.vserver-idDCAE",
            "policyScope": "DCAE",
            "relationship-valuepolicyName": "4c45d0a4-a873-4d95-87ca-2a198322c9c4"DCAE.Config_tca-hi-lo",
            "policyVersion": "v0.0.1",
      }      "closedLoopEventStatus": "ONSET"
}
Code Block
titlevCPE - A&AI generic-vnf query
linenumberstrue
collapsetrue
Code Block
titlevCPE - A&AI generic-vnf query response
linenumberstrue
collapsetrue
Code Block
titlevCPE - DCAE Control Loop Event (TCA) - A&AI Enriched
linenumberstrue
collapsetrue
Code Block
titleDCAE ABATED Control Loop Event
linenumberstrue
collapsetrue
{
        ],                 "related-to-property": [
  "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
            "version": "1.0.2",
   {         "requestID": "0abc0000-b032-4e4b-bd30-88260f444888",
              "property-keyclosedLoopAlarmStart": "vserver.vserver-name"1478189220547,
            "closedLoopAlarmEnd": 1478589220547,
            "property-valueclosedLoopEventClient": "demofwl01snk"DCAE_INSTANCE_ID.dcae-tca",
            "target_type": "VNF",
      }      "target": "generic-vnf.vnf-name",
         ]   "AAI": {

			"generic-vnf.vnf-name" : "vCPE_Infrastructure_vGMUX_demo_app"
    },             {
   },
            "related-tofrom": "vserverDCAE",
       
        "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/50b190410b2a4c229d8a6044a80ab7c1/vservers/vserver/b96416ef-fc4e-49cb-8120-1d56686d2e90",    "policyScope": "DCAE",
            "relationship-datapolicyName": ["DCAE.Config_tca-hi-lo",
            "policyVersion": "v0.0.1",
      {      "closedLoopEventStatus": "ABATED"
}

APPC API Interaction

Code Block
titleAPPC request
linenumberstrue
collapsetrue
{
  "body": {
    "input": {
      "relationshipcommon-keyheader": "cloud-region.cloud-owner", {
        "timestamp": "2017-08-25T21:06:23.037Z",
        "api-ver": "2.00",
        "relationshiporiginator-valueid": "CloudOwner"a20e2073-30b1-4357-893b-f5ed57b66ef0",
        "request-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
          }"sub-request-id": "1",
        "flags": {}
      },
   {       "action": "Restart",
      "action-identifiers": {
         "relationshipvnf-keyid": "cloud-region.cloud-region-id",vCPE_Infrastructure_vGMUX_demo_app"
      }
    }
  },
     "version": "2.0",
   "relationshiprpc-valuename": "RegionOnerestart",
  "correlation-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1",
  "type": "request"
}
Code Block
titleAPPC response
linenumberstrue
collapsetrue
{
  "body": {
    "output": {
 },     "common-header": {
        "timestamp": "2017-08-25T21:06:23.037Z",
    {    "api-ver": "2.00",
                   "relationship-key"originator-id": "tenant.tenant-ida20e2073-30b1-4357-893b-f5ed57b66ef0",
             "request-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
          "relationshipsub-request-valueid": "50b190410b2a4c229d8a6044a80ab7c11",
            "flags": {}
       },
      "status": {
        "code": 400,
   {     "message": "Restart Successful"
      }
    }
  },
  "relationship-keyversion": "vserver2.vserver-id00",
  "rpc-name": "restart",
  "correlation-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1",
  "type": "response"
}

VOLTE

Policy Creation

NOTE: VOLTE Configuration Policy for Holmes does not exist. This gap should be addressed in the future.

Code Block
titleVOLTE - Operational Policy
linenumberstrue
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName: ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b
   "relationship-value"trigger_policy: "b96416efunique-fc4epolicy-49cbid-81201-1d56686d2e90"restart
           timeout: 3600
  abatement: false

policies:
  }- id: unique-policy-id-1-restart
    name: Restart the VM
    description:
 ],   actor: VFC
    recipe: Restart
    target:
 "related-to-property": [    type: VM
    retry: 3
    timeout: 1200
   { success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    failure_retries: final_failure_retries
    "property-key": "vserver.vserver-name",failure_exception: final_failure_exception
    failure_guard: final_failure_guard
Code Block
titleVOLTE - Create Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw=='  "property-value": "vfw7f5a57d6"
 --header 'Environment: TEST' -d '{
        "policyConfigType": "BRMS_PARAM",
        }
"policyName": "com.BRMSParamVOLTE",
        "policyDescription": "BRMS Param VOLTE policy",
  ]      "policyScope": "com",
     }   "attributes": {
    ]     } }  

APPC API Interaction

vFirewall - APPC Responses
Code Block
titlevFirewall - APPC Request
linenumberstrue
collapsetrue
{
    "CommonHeaderMATCHING": {
    
     "TimeStamp": 1500997725298,           "APIvercontroller" : "1.01amsterdam",
           "RequestID": "664be3d2-6c12-4f4b-a3e7-c349acced200" },
          "RequestTrack": [],           "Flags"RULE": []
{
   },     "Action": "ModifyConfig",     "Payload": {         "generic-vnf.vnf-idtemplateName": "fw0001vm001fw001ClosedLoopControlName",
        "pg-streams": {                "pg-streamclosedLoopControlName": [
   "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
        {                 "id": "fw_udp1",controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"
                "is-enabled": "true"}
           }
 },
            {
                "id": "fw_udp2",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp3",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp4",
                "is-enabled": "true"
            },
            {
                "id": "fw_udp5",
                "is-enabled": "true"
            }]
        }
    }
}
Code Block
title
' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titleVOLTE - Push Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamVOLTE",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'


DCAE Events and A&AI Enrichment (if necessary)

Code Block
titleDCAE Control Loop Event (HOLMES) - VOLTE
linenumberstrue
collapsetrue
{
	"closedLoopEventClient": "DCAE.HolmesInstance",
    "policyVersion": "1.0.0.5",
    "policyName": "vVOLTE",
    "policyScope": "resource=volte,service=VolteSErvice,type=SampleType,closedLoopControlName=CL-VOLTE-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
    "target_type": "VM",
    "AAI": {
		"vserver.vserver-name": "dfw1lb01lb01",
 		"service-instance.service-instance-id" : "TBD",
		"generic-vnf.vnf-id" : "TBD",
		"generic-vnf.vnf-name" : "TBD"
    },
    "closedLoopAlarmStart": 1484677482204798,
    "closedLoopEventStatus": "ONSET",
    "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
    "version": "1.0.2",
    "target": "vserver.vserver-name",
    "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
    "from": "DCAE"
}
Code Block
titleA&AI Call
linenumberstrue
collapsetrue
This call is a simple GET in order to retrieve "is-closed-loop-diable" flag.
Code Block
titleA&AI Response
linenumberstrue
collapsetrue
ACCEPTBelow is a sample GET response format. Field {values are just examples. Will "Status": {
    update to real values later.

{
   "Valuevnf-id": "ACCEPTED5e49ca06-2972-4532-9ed4-6d071588d792",
        "Code"vnf-name": "100"
    },
USUCP0PCOIL0110UJRT01",
   "Payloadvnf-type": {
        "pg-streamsRT": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}",
        "generic-vnf.vnf-id": "fw0001vm001fw001"
    },
    "CommonHeader": {
        "TimeStamp": "1493841850199",,
   "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
   "equipment-role": "UCPE",
   "orchestration-status": "created",
   "management-option": "ATT",
   "ipv4-oam-address": "32.40.68.35",
   "ipv4-loopback0-address": "32.40.64.57",
   "nm-lan-v6-address": "2001:1890:e00e:fffe::1345",
   "management-v6-address": "2001:1890:e00e:fffd::36",
   "in-maint": false,
   "is-closed-loop-disabled": false,
   "resource-version": "1493389458092",
   "relationship-list": {"relationship": [
		{
         	"APIverrelated-to": "1.01service-instance",
         	"RequestIDrelated-link": "664be3d2-6c12-4f4b-a3e7-c349acced200https://aai-int1.test.att.com:8443/aai/v9/business/customers/customer/1610_Func_Global_20160817084727/service-subscriptions/service-subscription/uCPE-VMS/service-instances/service-instance/USUCP0PCOIL0110UJZZ01",
         	"SubrequestIDrelationship-data": [
null,         "OriginatorID": null	{
     } }     SUCCESS response   "relationship-key": 
{"customer.global-customer-id",
     "Status": {         "Valuerelationship-value": "SUCCESS",
 1610_Func_Global_20160817084727"
      "Code": "400"     },
    "Payload": {       {
 "pg-streams": "{\\\"pg-streams\\\": {\\\"pg-stream\\\":[{\\\"id\\\":\\\"fw_udp1\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp2\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp3\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp4\\\", \\\"is-enabled\\\":\\\"true\\\"},{\\\"id\\\":\\\"fw_udp5\\\", \\\"is-enabled\\\":\\\"true\\\"}]}}",          "relationship-key": "service-subscription.service-type",
               "relationship-value": "uCPE-VMS"
            },
            {
               "relationship-key": "service-instance.service-instance-id",
               "relationship-value": "USUCP0PCOIL0110UJZZ01"
            }
         	],
         "generic-vnf.vnf-idrelated-to-property": [{"property-key": "fw0001vm001fw001"service-instance.service-instance-name"}]
      	},
    "CommonHeader":    {
         	"TimeStamprelated-to": "1493841850199vserver",
         	"APIverrelated-link": "1.01https://aai-int1.test.att.com:8443/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USUCP0PCOIL0110UJZZ01%3A%3AuCPE-VMS/vservers/vserver/3b2558f4-39d8-40e7-bfc7-30660fb52c45",
        "RequestID": 	"664be3d2-6c12-4f4b-a3e7-c349acced200",
 relationship-data": [
      "SubrequestID": null,     {
   "OriginatorID": null     } }   TODO FAILED response

...

Policy Creation and Pushing

Code Block
titlevCPE - TCA Configuration Policy Payload
linenumberstrue
collapsetrue
tca_policy: "{ "relationship-key": "cloud-region.cloud-owner",
               "domainrelationship-value": "measurementsForVfScaling",att-aic"
            },
          "metricsPerEventName":  [{
               "eventNamerelationship-key": "Measurement_vGMUXcloud-region.cloud-region-id",
               "controlLoopSchemaTyperelationship-value": "VNF",AAIAIC25"
            },
            "policyScope": "DCAE",{
               "policyNamerelationship-key": "DCAEtenant.Config_tca-hi-lotenant-id",
               "policyVersionrelationship-value": "v0.0.1",USUCP0PCOIL0110UJZZ01::uCPE-VMS"
            },
     "thresholds": [{      {
               "closedLoopControlNamerelationship-key": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6evserver.vserver-id",
               "relationship-value": "3b2558f4-39d8-40e7-bfc7-30660fb52c45"
        "version": "1.0.2",    }
         	],
         	"fieldPathrelated-to-property": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",      
			{
              "thresholdValue	"property-key": 0"vserver.vserver-name",
            	"property-value": "USUCP0PCOIL0110UJZZ01-vsrx"
       "direction": "EQUAL",
 	}]
      	}
   	]}
}


VFC API Interaction


CCVPN

Policy Creation

Code Block
languagetext
titleCCVPN - Operational Policy
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName:  "severity": "MAJOR",
      ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c55b
  trigger_policy: unique-policy-id-16-receateE2EService
  timeout: 3600
  abatement: false
   
policies:
  - id: unique-policy-id-16-recreateE2EService
    "closedLoopEventStatus": "ABATED"
 name: Recreate E2E Service
    description:
    actor: SO
    recipe: Recreate_E2E_Service
}, {   target:
      type: VM
    retry: 3
    "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",timeout: 1200
    success: final_success
    failure: final_failure
    failure_timeout: final_failure_timeout
    "version": "1.0.2",failure_retries: final_failure_retries
    failure_exception: final_failure_exception
    failure_guard: final_failure_guard


DCAE Events and A&AI Enrichment (if necessary)

Code Block
languagetext
titleCCVPN - DCAE CL Event
collapsetrue
{
    "closedLoopEventClient": "DCAE.HolmesInstance",
    "fieldPathpolicyVersion": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value1.0.0.5",
      "policyName": "CCVPN",
              "thresholdValue": 0"policyScope": "service=SOTNService,type=SampleType,closedLoopControlName=CL-CCVPN-d925ed73-8231-4d02-9545-db4e101f88f8",
    "target_type": "VM",
    "AAI":  {
        "directionvserver.vserver-name": "GREATERTBD",
        "service-instance.service-instance-id" : "service-instance-example-1,service-instance-example-2,service-instance-example-3",
          "severity""service-instance-example-1.input-parameters" : "CRITICALinput-parameters-1",
        "service-instance-example-2.input-parameters" : "input-parameters-2",
          "closedLoopEventStatus""service-instance-example-3.input-parameters" : "ONSET"
         input-parameters-3"
    }]
   ,
   }] }"
Code Block
titlevCPE - Create Config Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{

   "closedLoopAlarmStart": 1484677482204798,
    "closedLoopEventStatus": "null",
    "closedLoopControlName": "ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c55b",
    "version": "1.0.2",
    "configBodytarget": "{ \"service\"vserver.vserver-name",
    "requestID": \"tca_policy\"97964e10-686e-4790-8c45-bdfa61df770f",
\"location\    "from": \"SampleServiceLocation\", \"uuid\": \"test\", \"policyName\": \"MicroServicevCPE\", \"description\": \"MicroService vCPE Policy\", \"configName\": \"SampleConfigName\", \"templateVersion\": \"OpenSource.version.1\", \"version\": \"1.1.0\", \"priority\": \"1\", \"policyScope\": \"resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"riskType\": \"SampleRiskType\", \"riskLevel\": \"1\", \"guard\": \"False\", \"content\": { \"tca_policy\": { \"domain\": \"measurementsForVfScaling\", \"metricsPerEventName\": [{ \"eventName\": \"Measurement_vGMUX\", \"controlLoopSchemaType\": \"VNF\", \"policyScope\": \"DCAE\", \"policyName\": \"DCAE.Config_tca-hi-lo\", \"policyVersion\": \"v0.0.1\", \"thresholds\": [{ \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"EQUAL\", \"severity\": \"MAJOR\", \"closedLoopEventStatus\": \"ABATED\" }, { \"closedLoopControlName\": \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e\", \"version\": \"1.0.2\", \"fieldPath\": \"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value\", \"thresholdValue\": 0, \"direction\": \"GREATER\", \"severity\": \"CRITICAL\", \"closedLoopEventStatus\": \"ONSET\" }] }] } } }","DCAE"
}

Status Update

Code Block
languagetext
titleCCVPN - Update TP Status
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/network/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces/p-interface/{ifName}
Method: PATCH
Request Body:
{
    "operational-status": "some status"
}
Code Block
languagetext
titleCCVPN - Update Logic-link Status
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/network/logical-links/logical-link/{linkName}
Method: PATCH
Request Body:
{
    "operational-status": "some status"
}


Alarm Correlation

Code Block
languagetext
titleCCVPN - Query for Logical-links
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/network/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}&operational-status={status}
Method: GET
Resquest Body:
{
}
 
 
Response Body:
{   
    "results" : [
        {
        "p-interface" : {
             "interface-name":{ifName}",                 
             "network-ref": "some ref",
             "transparent": "some blue",
             "operational-status":"[status}",
             "speed-value" : "some speed",
             "relationship-list":
                "relationship" : [
                    {
                      "related-to" : "logic-link",
                      "policyConfigTyperelated-link" :'url of logical-link"MicroService",
           "policyName": "com.MicroServicevCPE",           "relationship-data":[
             "onapName": "DCAE" }' 'http://pdp:8081/pdp/api/createPolicy'
Code Block
titlevCPE Operational Policy
linenumberstrue
collapsetrue
controlLoop:   version: 2.0.0   controlLoopName: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e   trigger_policy"relationship-key" : unique-policy-id-1-restart"logical-link.link.name",
     timeout: 3600   abatement: true  policies:   - id: unique-policy-id-1-restart        name: Restart the VM
 "relationship-value"; "some name"
   description:     actor: APPC     recipe: Restart     target:  ]
    type: VM     retry: 3     timeout: 1200   }
 success: final_success     failure: final_failure     failure_timeout: final_failure_timeout ]
    failure_retries: final_failure_retries     failure_exception: final_failure_exception }
    failure_guard: final_failure_guard
Code Block
titlevCPE - Create Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{]
}


Service Instance Information Queries

Code Block
languagetext
titleCCVPN - Get vpn-binding from TP
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/network/network-resources/network-resource/{networkId}/pnfs/pnf/{pnfName}/p-interfaces?interface-name={ifName}&operational-status={status}
Method: GET
Request Body:
{
}
 
Response Body:
{
    "results": [
      {
        "p-interface": {
          "policyConfigTypeinterface-name": "BRMS_PARAM{ifName}",
          "policyNamenetwork-ref": "com.BRMSParamvCPEsome ref",
          "policyDescriptiontransparent": "BRMSsome Paramvalue",
vCPE policy",         "policyScopeoperational-status ": "com{status}",
          "attributesspeed-value": {
 "some speed",
          "MATCHINGrelationship-list": {
 
              "controllerrelationship" : "amsterdam" [
                  {
    },                  "RULErelated-to": {
 "vpn-binding",
                      "templateNamerelated-link": "ClosedLoopControlNameurl of vpn-binding",
     
                  "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",    "relationship-data": [
                         "controlLoopYamlrelationship-key": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+true%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+APPC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guardvpn-binding.vpn-id",
                         "relationship-value": "some id"
                      ]
                  }
              ]
          }
}' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titlevCPE - Push Policies
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamvCPE",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'


curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.MicroServicevCPE",
  "policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'

DCAE Events and A&AI Enrichment (if necessary)

Code Block
titlevCPE - DCAE Control Loop Event (TCA) - NOT Enriched
linenumberstrue
collapsetrue
{
         }
      }
    ]
}
Code Block
languagetext
titleCCVPN - Get connectivity from vpn-binding
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/network/vpn-bindings?vpn-id={vpnId}
Method: GET
Request Body:
{
}
 
Response Body:
{
    "results": [
      {
        "vpn-binding": {
          "vpn-id": "{vpnId}",
          "vpn-name": "some name",
          "access-provider-id": "provider id",
          "closedLoopControlNameaccess-client-id": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6eclient id",

           "versionaccess-topology-id": "1.0.2topology id",
 
          "requestIDsrc-access-node-id": "0abc0000-b032-4e4b-bd30-88260f444888src node id",
 
          "closedLoopAlarmStartsrc-access-ltp-id": 1478189220547,"src ltp id",
          "closedLoopEventClientdst-access-node-id": "DCAE_INSTANCE_ID.dcae-tcadst node id",
 
          "target_typedst-access-ltp-id": "VNF",dst ltp id,
          "targetoperational-status": "generic-vnf.vnf-namesome status",
 
          "AAIrelationship-list": {
               "generic-vnf.vnf-name"relationship" : "vCPE_Infrastructure_vGMUX_demo_app"[
              },    {
        "from": "DCAE",             "policyScoperelated-to": "DCAEconnectivity",
            "policyName          "related-link": "DCAE.Config_tca-hi-lourl of connectivity",
            "policyVersion": "v0.0.1",             "closedLoopEventStatus"relationship-data": "ONSET"
}
Code Block
titlevCPE - A&AI generic-vnf query
linenumberstrue
collapsetrue
Code Block
titlevCPE - A&AI generic-vnf query response
linenumberstrue
collapsetrue
Code Block
titlevCPE - DCAE Control Loop Event (TCA) - A&AI Enriched
linenumberstrue
collapsetrue
Code Block
titleDCAE ABATED Control Loop Event
linenumberstrue
collapsetrue
{[
                         "closedLoopControlNamerelationship-key": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",connectivity. connectivity-id",
                "version         "relationship-value": "1.0.2",some id"
                      ]
              "requestID": "0abc0000-b032-4e4b-bd30-88260f444888",   }
         "closedLoopAlarmStart": 1478189220547,    ]
        "closedLoopAlarmEnd": 1478589220547,  }
        }
 "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",    }
    ]
}
Code Block
languagetext
titleCCVPN - Query service instances by connectivity
collapsetrue
URL: https://<AAI  "target_type": "VNF",
      host>:<AAI port>/aai/v14/network/connectivities/connectivity/{connectivityId}
Method: Get
Request Body:
{
}
Response Body:
{
     "targetresults": "generic-vnf.vnf-name",[
      {
     "AAI": {  			"generic-vnf.vnf-name" : "vCPE_Infrastructure_vGMUX_demo_app""connectivity": {
            },
"connectivity-id": "{connectivityId}",
           "frombandwidth-profile-name": "DCAEsome profile",

           "policyScopevpn-type": "DCAEsome type",
 
          "policyNamecir": "DCAE.Config_tca-hi-locir value",
            "policyVersioneir": "v0.0.1eir value",
            "closedLoopEventStatuscbs": "ABATED"
}

APPC API Interaction

Code Block
titleAPPC request
linenumberstrue
collapsetrue
{
  "body": {cbs value",
          "inputebs": {"ebs value",
     "common-header": {
        "timestampcolor-aware": "2017-08-25T21:06:23.037Zcolor value",
          "apicoupling-verflag": "2.00flag value",
          "originatoretht-svc-idname": "a20e2073-30b1-4357-893b-f5ed57b66ef0some name",
          "requestaccess-provider-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0provider id",
          "subaccess-requestclient-id": "1client id",
          "flagsaccess-topology-id": {}
"topology id",
     },
      "actionaccess-node-id": "Restartnode id",
          "actionaccess-ltp-identifiersid": {"ltp id",
          "vnfconnectivity-idselflink": "vCPE_Infrastructure_vGMUX_demo_app"some URL",
      }    "cvlan }": "some  }tag",
  "version": "2.0",   "rpc-name": "restart",   "correlationoperational-idstatus": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1some status",

 "type": "request"
}
Code Block
titleAPPC response
linenumberstrue
collapsetrue
{        "bodyrelationship-list": {
    "output": {          "relationship" : [
           "common-header": {      {
  "timestamp": "2017-08-25T21:06:23.037Z",         "api-ver": "2.00",         "originatorrelated-idto": "a20e2073-30b1-4357-893b-f5ed57b66ef0",service-instance",
            "request-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",         "subrelated-request-idlink": "1url of service-instance",
        "flags": {}
      },       "statusrelationship-data": [      {         "code": 400,        
"message": "Restart Successful"       }     }   },   "version": "2.00",   "rpc-name": "restart",   "correlationrelationship-idkey": "a20e2073service-30b1instance.service-4357-893b-f5ed57b66ef0-1instance-id",      "type": "response"
}

VOLTE

Policy Creation

NOTE: VOLTE Configuration Policy for Holmes does not exist. This gap should be addressed in the future.

Code Block
titleVOLTE - Operational Policy
linenumberstrue
collapsetrue
controlLoop:
  version: 2.0.0
  controlLoopName: ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b
  trigger_policy: unique-policy-id-1-restart
  timeout: 3600
  abatement: false

policies:
  - id: unique-policy-id-1-restart
    name: Restart the VM
    description:
    actor: VFC
    recipe: Restart
    target:                  
                            "relationship-value": "some id"
                      ]
      type: VM     retry: 3     timeout:}
1200     success: final_success     failure: final_failure  ]
  failure_timeout: final_failure_timeout     failure_retries: final_failure_retries }
   failure_exception: final_failure_exception
   }
   failure_guard: final_failure_guard ]
Code Block
languagetext
titleVOLTE - Create Operational Policy
linenumberstrue
CCVPN - Get all 3 services instances from CCVPN
collapsetrue
curlFrom -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/html' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d 'service-instance URL:
 
URL: https://<AAI host>:<AAI port>/aai/v14/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances?service-instance-id={servId}
 
Derive the service-subscription URL:
URL: https://<AAI host>:<AAI port>/aai/v14/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}
 
 
Method: GET
Request Body:
{
}
Response Body:
{
    "results": [
      {
        "policyConfigTypeservice-subscription": "BRMS_PARAM",{
          "policyNameservice-type": "com.BRMSParamVOLTE{service-type}",
        "policyDescription  "temp-ub-sub-account-id": "BRMSsome Paramsub VOLTE policyaccount",
          "policyScopeservice-instances": "com", {
              "attributesservice-instance": [
{                {
"MATCHING": {                 "controllerservice-instance-id" : "amsterdamsome id 1",
            },      "service-instance-name": "some name 1",
         "RULE": {        "environment-context": "some context 1",
             "templateName": "ClosedLoopControlName",    "workload-context": "some workload 1",
                 "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
      relationship-list": {
                 "controlLoopYaml": "controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard"     "relationship" : [
                      ]
                  }
                }
}' 'http://pdp:8081/pdp/api/createPolicy'

Code Block
titleVOLTE - Push Operational Policy
linenumberstrue
collapsetrue
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
  "pdpGroup": "default",
  "policyName": "com.BRMSParamVOLTE",
  "policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'

DCAE Events and A&AI Enrichment (if necessary)

Code Block
titleDCAE Control Loop Event (HOLMES) - VOLTE
linenumberstrue
collapsetrue
{
	"closedLoopEventClient": "DCAE.HolmesInstance",
    "policyVersion": "1.0.0.5",
    "policyName": "vVOLTE",
    "policyScope": "resource=volte,service=VolteSErvice,type=SampleType,closedLoopControlName=CL-VOLTE-SIG-d925ed73-8231-4d02-9545-db4e101f88f8",
    "target_type": "VM",
    "AAI": {
		"vserver.vserver-name": "dfw1lb01lb01",
 		"service-instance.service-instance-id" : "TBD",
		"generic-vnf.vnf-id" : "TBD",
		"generic-vnf.vnf-name" : "TBD"
    },
    "closedLoopAlarmStart": 1484677482204798,
    "closedLoopEventStatus": "ONSET",
    "closedLoopControlName": "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b",
    "version": "1.0.2",
    "target": "vserver.vserver-name",
    "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
    "from": "DCAE"
}
Code Block
titleA&AI Call
linenumberstrue
collapsetrue
This call is a simple GET in order to retrieve "is-closed-loop-diable" flag.
Code Block
titleA&AI Response
linenumberstrue
collapsetrue
Below is a sample GET response format. Field values are just examples. Will update to real values later.

{
   "vnf-id": "5e49ca06-2972-4532-9ed4-6d071588d792",
   "vnf-name": "USUCP0PCOIL0110UJRT01",
   "vnf-type": "RT",
   "service-id": "d7bb0a21-66f2-4e6d-87d9-9ef3ced63ae4",
   "equipment-role": "UCPE",
   "orchestration-status": "created",
   "management-option": "ATT",
   "ipv4-oam-address": "32.40.68.35",
   "ipv4-loopback0-address": "32.40.64.57",
   "nm-lan-v6-address": "2001:1890:e00e:fffe::1345",
   "management-v6-address": "2001:1890:e00e:fffd::36",
   "in-maint": false,
   "is-closed-loop-disabled": false,
   "resource-version": "1493389458092",,
                {
                  "service-instance-id": "some id 2",
                  "service-instance-name": "some name 2",
                  "environment-context": "some context 2",
                  "workload-context": "some workload 2",
                  "relationship-list": {
                      "relationship" : [
                      ]
                  }
                },
                {
                  "service-instance-id": "some id 3",
                  "service-instance-name": "some name 3",
                  "environment-context": "some context 3",
                  "workload-context": "some workload 3",
                  "relationship-list": {
                      "relationship" : [
		{
                      ]
                  	"related-to": "service-instance",}
           	"related-link": "https://aai-int1.test.att.com:8443/aai/v9/business/customers/customer/1610_Func_Global_20160817084727/service-subscriptions/service-subscription/uCPE-VMS/service-instances/service-instance/USUCP0PCOIL0110UJZZ01",     }
         	"relationship-data": [    ]
     	{     },
          "relationship-keylist": "customer.global-customer-id",{
               "relationship-value" : "1610_Func_Global_20160817084727" [
              ]
     },     }
       { }
      }
    ]
}

"relationship-key": "service-subscription.service-type",
         
Code Block
languagetext
titleCCVPN - Query 'input-parameters' for 'service-instance'
collapsetrue
URL: https://<AAI host>:<AAI port>/aai/v14/business/customers/customer/{global-custoner-id}/service-subscriptions/service-subscription/{service-type}/service-instances?service-instance-id={serviceId}
Method: GET
Request Body:
{
}
Response Body:
{
     "relationshipservice-instance-valueid": "uCPE-VMS"
            }{service-instance-id}",
    "service-instance-name" : "instance name",
    {
 "service-type": "some type",
    "service-role": "some role",
      "relationshipmodel-invariant-keyid": "service-instance.service-instance-model id",
    "model-version-id":     "model version",
     "relationshipinput-valueparameters:":request parameters"USUCP0PCOIL0110UJZZ01",  // ... This is the service instance recreation input looked up by }CL.
    "resource-version": "some version"
}
 	],
 
Example of response body:
{
    "relatedservice-toinstance-propertyid": [{"property-key": "service-instance.service-instance-name"}]176d9eba-1662-4289-8396-0097b50fd485",
    "service-type": "E2E 	}Service",
    "service-role":    {
    "E2E Service",
    	"relatedmodel-invariant-toid": "vserver"c22a9483-d2b6-49cc-b1f7-ef34c93572a1",
         	"related-link"model-version-id": "https://aai-int1.test.att.com:8443/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant/USUCP0PCOIL0110UJZZ01%3A%3AuCPE-VMS/vservers/vserver/3b2558f4-39d8-40e7-bfc7-30660fb52c45",
    71d0e396-e246-4c23-aa57-6da2043d6209",
    	"relationship-data": [input-parameters:".....;",             // {... This is the service instance recreation input looked up by CL.
    "relationshipresource-keyversion": "cloud-region.cloud-owner",1528975017336"
    "relationship-list": {
         "relationship-value": "att-aic"[
            },{
            {
  "related-to": "pnf",
            "relationshiprelated-keylink": "cloud-region.cloud-region-id",
 /aai/v11/network/pnfs/pnf/MME-0001",
             "relationship-valuedata": "AAIAIC25" [
                },    {    
    {                "relationship-key": "tenantpnf.tenantpnf-id",      
                    "relationship-value": "USUCP0PCOIL0110UJZZ01::uCPE-VMS176d9eba-1662-4289-8396-0097b50fd466"
            },        }
             {   ],
            "relationshiprelated-to-keyproperty": "vserver.vserver-id",[
               "relationship-value": "3b2558f4-39d8-40e7-bfc7-30660fb52c45"    {
        }          	],  "property-key": "pnf.pnf-name",      
	"related-to-property": [       			{             	"property-keyvalue": "vserver.vserverMME-name",0001"
                    }
     	"property-value": "USUCP0PCOIL0110UJZZ01-vsrx"          	}]
       	}     } 
    	]    ]
    }
}

...


SO API Interaction

CCVPN

Policy Creation

DCAE Events and A&AI Enrichment (if necessary)





...

requestParameters: '{}'