Versions Compared

Key

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

...

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: ScaleCreate a outnew theVF VNFModule
    description:
    actor: SO
    recipe: scaleOutVF Module Create
    target:
      type: VNF
    payload:
      #
Need to get from Marco       requestParameters: '{"usePreload":true,"userParams":[]}'
       configurationParameters: '[{"availabilityip-zoneaddr":"$.vnfvf-module-topology.vnfvf-resourcemodule-assignments.availability-zones.availability-zone[0parameters.param[9]","xtzoam-ip-123addr":"$.vnfvf-module-topology.vnfvf-resource-assignments.availability-zones.availability-zone[0module-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 Guard - Min/Max Create API Call
collapsetrue
# PROTOTYPE - development 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",
        "policyDescription": "Ensure number of instances within a range",
        "ecompNameonapName": "PDPD",
        "ruleProvider": "GUARD_YAMLMIN_MAX",
        "attributes": {
                "MATCHING": {
                        "actor": "SO",
                        "recipe": "scaleOut",
                        "targets": ".*",
                        "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 - Frequency Limiter Create API Call
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 '{
        "policyClass": "Decision",
        "policyName": "com.vDNS.Frequency",
        "policyDescription": "Limit vDNS Scale Up over time period",
        "ecompNameonapName": "PDPD",
        "ruleProvider": "GUARD_YAML",
        "attributes": {
                "MATCHING": {
                        "actor": "SO",
                        "recipe": "scaleOut",
                        "targets": ".*",
                        "clname": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
                        "limit": "1",
                        "timeWindow": "10",
                        "timeUnits": "minute",
                        "guardActiveStart": "00:00:01-05:00",
                        "guardActiveEnd": "00:00:00-05:00"
                }
        }
}' 'http://pdp:8081/pdp/api/createPolicy'

...

Code Block
titlevDNS - SO Response ACCEPTED (TODO - Update)
linenumberstrue
collapsetrue
{
	"requestReferences": {
		"requestId": "60533ee3-814d-4949-be93-e6b26aace580"
	},
	"request": {
		"requestId":"d5bc27f2-1d5c-405d-a985-3e3f544c1582",
		"requestStatus": {
			"percentProgress": 0,
			"requestState": "COMPLETEIN_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 (TODO - Add)
linenumberstrue
collapsetrue
TODO - this is new work{
	"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
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:
{
    "service-instance-id": "{service-instance-id}",
    "service-instance-name" : "instance name",
    "service-type": "some type",
    "service-role": "some role",
    "model-invariant-id": "model id",
    "model-version-id": "model version",
    "input-parameters:"request parameters",  // ... This is the service instance recreation input looked up by CL.
    "resource-version": "some version"
}
 
 
Example of response body:
{
    "service-instance-id": "176d9eba-1662-4289-8396-0097b50fd485",
    "service-type": "E2E Service",
    "service-role": "E2E Service",
    "model-invariant-id": "c22a9483-d2b6-49cc-b1f7-ef34c93572a1",
    "model-version-id": "71d0e396-e246-4c23-aa57-6da2043d6209",
    "input-parameters:".....;",             // ... This is the service instance recreation input looked up by CL.
    "resource-version": "1528975017336"
    "relationship-list": {
         "relationship": [
            {
            "related-to": "pnf",
            "related-link": "/aai/v11/network/pnfs/pnf/MME-0001",
            "relationship-data": [
                    {    
                    "relationship-key": "pnf.pnf-id",      
                    "relationship-value": "176d9eba-1662-4289-8396-0097b50fd466"
                    }
                ],
            "related-to-property": [
                    {
                    "property-key": "pnf.pnf-name",      
                    "property-value": "MME-0001"
                    }
                ]
            } 
        ]
    }
}


SO API Interaction





requestParameters: '{}'