...
OOF Policy models including HPA available hereĀ OOF Policy Tosca Models
Create and Push Policy
Login to the OOF pod (OSDF) - and use the pdp servicename and port using the curl commands below.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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' |
...