You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
Disclaimer: We are using the HPA & Cloud Agnostic Intent - R3 Test Plan as reference. The postman given here are only for reference. Please make necessary edits according to the test plan.
Generating AAI data
Note: Required only if the Multicloud has no real cloud-regions and HPA discovery cannot happen.
If Multicloud team has data for creating the Cloud-region and doesn't have the HPA, then please update the existing data with the flavors with HPA.
- Import the postman collection CASABLANCA_AAI_postman.json
- To add/remove HPA Capabilities edit the flavors section in the body of PUT Cloud-Region{x}
- Once all the necessary Use postman to add the complex and cloud regions in the order specified below
- Use the GET requests to verify the data.
Creating Policy
Note: For testing purposes, policies go hand in hand with the available HPA capabilities. This means for a matching homing solution to be identified, we have to inject policies that is a subset of available HPA capabilities.
Create Policy model
Using the policy GUI upload all the policy models in the portal.
OOF Policy models including HPA available here OOF Policy Tosca Models
Create and Push Policy
curl -k -v -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"configBody": "{\"service\": \"distancePolicy\", \"guard\": \"False\", \"content\": {\"policyType\": \"distance_to_location\", \"applicableResources\": \"any\", \"identity\": \"distance-vFW\", \"policyScope\": [\"vfw\", \"us\", \"international\", \"ip\"], \"distanceProperties\": {\"distance\": {\"value\": \"100\", \"unit\": \"km\", \"operator\": \"<\"}, \"locationInfo\": \"customer_loc\"}, \"resources\": [\"vFW\", \"7400fd06C75f4a44A68f\"]}, \"priority\": \"3\", \"templateVersion\": \"OpenSource.version.1\", \"riskLevel\": \"2\", \"description\": \"Distance Policy for vFW\", \"policyName\": \"OSDF_CASABLANCA.Distance_vFW_1\", \"version\": \"test1\", \"riskType\": \"test\"}",
"policyName": "OSDF_CASABLANCA.Distance_vFW_1",
"policyConfigType": "MicroService",
"onapName": "SampleDemo",
"policyScope": "OSDF_CASABLANCA"
}' 'https://pdp:8081/pdp/api/createPolicy'
curl -k -v -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": "OSDF_CASABLANCA.Distance_vFW_1",
"policyType": "MicroService"
}' 'https://pdp:8081/pdp/api/pushPolicy'