Versions Compared

Key

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

...

Code Block
languagejs
themeEmacs
titlePush Distance Policy for vFW
collapsetrue
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'
Code Block
languagejs
themeEmacs
titleCreate HPA Policy for vFW
collapsetrue
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\": \"hpaPolicy\", \"guard\": \"False\", \"content\": {\"flavorFeatures\": [{\"directives\": [{\"attributes\": [{\"attribute_value\": \"\", \"attribute_name\": \"label_1\"}], \"type\": \"flavor_directives\"}], \"type\": \"vnfc\", \"flavorProperties\": [{\"mandatory\": \"True\", \"hpa-feature-attributes\": [{\"hpa-attribute-value\": \"2\", \"unit\": \"\", \"operator\": \">=\", \"hpa-attribute-key\": \"numVirtualCpu\"}, {\"hpa-attribute-value\": \"8\", \"unit\": \"MB\", \"operator\": \">=\", \"hpa-attribute-key\": \"virtualMemSize\"}], \"directives\": [], \"hpa-version\": \"v1\", \"architecture\": \"generic\", \"hpa-feature\": \"basicCapabilities\"}, {\"mandatory\": \"True\", \"hpa-feature-attributes\": [{\"hpa-attribute-value\": \"2\", \"unit\": \"\", \"operator\": \"=\", \"hpa-attribute-key\": \"numaNodes\"}, {\"hpa-attribute-value\": \"2\", \"operator\": \"=\", \"hpa-attribute-key\": \"numaCpu-0\"}, {\"hpa-attribute-value\": \"4\", \"operator\": \"=\", \"hpa-attribute-key\": \"numaCpu-1\"}, {\"hpa-attribute-value\": \"2\", \"unit\": \"GB\", \"operator\": \"=\", \"hpa-attribute-key\": \"numaMem-0\"}, {\"hpa-attribute-value\": \"4\", \"unit\": \"GB\", \"operator\": \"=\", \"hpa-attribute-key\": \"numaMem-1\"}], \"directives\": [], \"hpa-version\": \"v1\", \"architecture\": \"generic\", \"hpa-feature\": \"numa\"}, {\"mandatory\": \"True\", \"hpa-feature-attributes\": [{\"hpa-attribute-value\": \"2\", \"unit\": \"MB\", \"operator\": \"=\", \"hpa-attribute-key\": \"memoryPageSize\"}, {\"hpa-attribute-value\": \"4\", \"operator\": \"=\", \"hpa-attribute-key\": \"numberOfPages\"}], \"directives\": [], \"hpa-version\": \"v1\", \"architecture\": \"generic\", \"hpa-feature\": \"hugePages\"}, {\"mandatory\": \"False\", \"score\": \"100\", \"directives\": [{\"attributes\": [{\"attribute_value\": \"direct\", \"attribute_name\": \"oof_returned_vnic_type_for_firewall_protected\"}], \"type\": \"sriovNICNetwork_directives\"}], \"hpa-version\": \"v1\", \"hpa-feature-attributes\": [{\"hpa-attribute-value\": \"1\", \"unit\": \"\", \"operator\": \"=\", \"hpa-attribute-key\": \"pciCount\"}, {\"hpa-attribute-value\": \"1234\", \"unit\": \"\", \"operator\": \"=\", \"hpa-attribute-key\": \"pciVendorId\"}, {\"hpa-attribute-value\": \"7890\", \"unit\": \"\", \"operator\": \"=\", \"hpa-attribute-key\": \"pciDeviceId\"}], \"architecture\": \"Intel64\", \"hpa-feature\": \"sriovNICNetwork\"}], \"id\": \"vfw_1\"}, {\"directives\": [{\"attributes\": [{\"attribute_value\": \"\", \"attribute_name\": \"label_2\"}], \"type\": \"flavor_directives\"}], \"type\": \"vnfc\", \"flavorProperties\": [{\"mandatory\": \"True\", \"hpa-feature-attributes\": [{\"hpa-attribute-value\": \"1\", \"operator\": \">=\", \"hpa-attribute-key\": \"numVirtualCpu\"}, {\"hpa-attribute-value\": \"7\", \"unit\": \"GB\", \"operator\": \">=\", \"hpa-attribute-key\": \"virtualMemSize\"}], \"directives\": [], \"hpa-version\": \"v1\", \"architecture\": \"generic\", \"hpa-feature\": \"basicCapabilities\"}], \"id\": \"vfw_2\"}, {\"directives\": [{\"attributes\": [{\"attribute_value\": \"\", \"attribute_name\": \"label_3\"}], \"type\": \"flavor_directives\"}], \"id\": \"vfw_3\", \"type\": \"vnfc\", \"flavorProperties\": [{\"mandatory\": \"True\", \"directives\": [], \"hpa-version\": \"v1\", \"hpa-feature-attributes\": [], \"architecture\": \"generic\", \"hpa-feature\": \"basicCapabilities\"}]}], \"policyType\": \"hpa\", \"policyScope\": [\"vfw\", \"us\", \"international\", \"ip\"], \"identity\": \"hpa-vFW\", \"resources\": [\"vFW\", \"7400fd06C75f4a44A68f\"]}, \"priority\": \"3\", \"templateVersion\": \"OpenSource.version.1\", \"riskLevel\": \"2\", \"description\": \"HPA policy for vFW\", \"policyName\": \"OSDF_CASABLANCA.hpa_policy_vFW_1\", \"version\": \"test1\", \"riskType\": \"test\"}",
    "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_1",
    "policyConfigType": "MicroService",
    "onapName": "SampleDemo",
    "policyScope": "OSDF_CASABLANCA"
}' 'https://pdp:8081/pdp/api/createPolicy'
Code Block
languagejs
themeEmacs
titlePush HPA Policy for vFW
collapsetrue
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.hpa_policy_vFW_1",
"policyType": "MicroService"
}' 'https://pdp:8081/pdp/api/pushPolicy'
Code Block
languagejs
themeEmacs
titleCreate Optimiazation Policy for vFW
collapsetrue
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\": \"optimizationPolicy\", \"guard\": \"False\", \"content\": {\"policyType\": \"placement_optimization\", \"objective\": \"minimize\", \"objectiveParameter\": {\"operator\": \"sum\", \"parameterAttributes\": [{\"parameter\": \"distance\", \"operator\": \"product\", \"customerLocationInfo\": \"customer_loc\", \"weight\": \"1\", \"resources\": [\"vGMuxInfra\"]}, {\"parameter\": \"distance\", \"operator\": \"product\", \"customerLocationInfo\": \"customer_loc\", \"weight\": \"1\", \"resources\": [\"vG\"]}, {\"parameter\": \"hpa_score\", \"operator\": \"product\", \"weight\": \"200\", \"resources\": [\"vG\"]}, {\"parameter\": \"distance\", \"operator\": \"product\", \"customerLocationInfo\": \"customer_loc\", \"weight\": \"100\", \"resources\": [\"vFW\", \"7400fd06C75f4a44A68f\"]}, {\"parameter\": \"hpa_score\", \"operator\": \"product\", \"weight\": \"200\", \"resources\": [\"vFW\", \"7400fd06C75f4a44A68f\"]}]}, \"identity\": \"optimization\", \"policyScope\": [\"vcpe\", \"us\", \"international\", \"ip\", \"vGMuxInfra\", \"vG\", \"vfw\"]}, \"priority\": \"5\", \"templateVersion\": \"OpenSource.version.1\", \"riskLevel\": \"3\", \"description\": \"Placement Optimization Policy for vGMuxInfra\", \"policyName\": \"OSDF_CASABLANCA.Placement_Optimization_1\", \"version\": \"test1\", \"riskType\": \"test\"}",
    "policyName": "OSDF_CASABLANCA.Placement_Optimization_1",
    "policyConfigType": "MicroService",
    "onapName": "SampleDemo",
    "policyScope": "OSDF_CASABLANCA"
}' 'https://pdp:8081/pdp/api/createPolicy'
Code Block
languagejs
themeEmacs
titlePush Optimization Policy for vFW
collapsetrue
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.Placement_Optimization_1",
"policyType": "MicroService"
}' 'https://pdp:8081/pdp/api/pushPolicy'
Code Block
languagejs
themeEmacs
titleCreate Query Policy for vFW
collapsetrue
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\": \"queryPolicy\", \"guard\": \"False\", \"content\": {\"policyType\": \"request_param_query\", \"queryProperties\": [{\"attribute\": \"customerLatitude\", \"attribute_location\": \"customerLatitude\"}, {\"attribute\": \"customerLongitude\", \"attribute_location\": \"customerLongitude\"}], \"identity\": \"vFW_Query_Policy\", \"serviceName\": \"vFW\", \"policyScope\": [\"vfw\", \"us\", \"international\", \"ip\"]}, \"priority\": \"3\", \"templateVersion\": \"OpenSource.version.1\", \"riskLevel\": \"2\", \"description\": \"Query policy for vFW\", \"policyName\": \"OSDF_CASABLANCA.QueryPolicy_vFW\", \"version\": \"test1\", \"riskType\": \"test\"}",
    "policyName": "OSDF_CASABLANCA.QueryPolicy_vFW",
    "policyConfigType": "MicroService",
    "onapName": "SampleDemo",
    "policyScope": "OSDF_CASABLANCA"
}' 'https://pdp:8081/pdp/api/createPolicy'
Code Block
languagejs
themeEmacs
titlePush Query Policy for vFW
collapsetrue
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.QueryPolicy_vFW",
"policyType": "MicroService"
}' 'https://pdp:8081/pdp/api/pushPolicy'
Code Block
languagejs
themeEmacs
titleCreate VNF Policy for vFW
collapsetrue
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\": \"vnfPolicy\", \"guard\": \"False\", \"content\": {\"policyType\": \"vnfPolicy\", \"policyScope\": [\"vfw\", \"us\", \"international\", \"ip\"], \"identity\": \"vnf_vFW\", \"resources\": [\"vFW\", \"7400fd06C75f4a44A68f\"], \"applicableResources\": \"any\", \"vnfProperties\": [{\"equipmentRole\": \"\", \"inventoryProvider\": \"aai\", \"inventoryType\": \"cloud\", \"serviceType\": \"\", \"customerId\": \"\", \"orchestrationStatus\": \"\"}]}, \"priority\": \"6\", \"templateVersion\": \"OpenSource.version.1\", \"riskLevel\": \"3\", \"description\": \"vnfPolicy\", \"policyName\": \"OSDF_CASABLANCA.vnfPolicy_vFW\", \"version\": \"test1\", \"riskType\": \"test\"}",
    "policyName": "OSDF_CASABLANCA.vnfPolicy_vFW",
    "policyConfigType": "MicroService",
    "onapName": "SampleDemo",
    "policyScope": "OSDF_CASABLANCA"
}' 'https://pdp:8081/pdp/api/createPolicy'
Code Block
languagejs
themeEmacs
titlePush VNF Policy for vFW
collapsetrue
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.vnfPolicy_vFW",
"policyType": "MicroService"
}' 'https://pdp:8081/pdp/api/pushPolicy'