aboutsummaryrefslogtreecommitdiffstats
path: root/test/placement-tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/placement-tests')
-rw-r--r--test/placement-tests/policy_response.json872
-rw-r--r--test/placement-tests/policy_response2.json867
-rw-r--r--test/placement-tests/policy_response2_old_format.json182
-rw-r--r--test/placement-tests/policy_response_old_format.json182
-rw-r--r--test/placement-tests/request_placement_vfmod.json113
-rw-r--r--test/placement-tests/request_vfmod.json57
-rw-r--r--test/placement-tests/response_vfmod.json229
-rw-r--r--test/placement-tests/test_by_scope.yaml29
-rw-r--r--test/placement-tests/test_by_scope_old_format.yaml24
9 files changed, 2193 insertions, 362 deletions
diff --git a/test/placement-tests/policy_response.json b/test/placement-tests/policy_response.json
index 8de8537..a257ecc 100644
--- a/test/placement-tests/policy_response.json
+++ b/test/placement-tests/policy_response.json
@@ -1,182 +1,694 @@
-[
{
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"SubscriberPolicy\",\"policyName\":\"oofBeijing.SubscriberPolicy_v1\",\"description\":\"Subscriber Policy\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"1\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"subscriber\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"subscriberpolicy\",\"subscriber_x\",\"subscriber_y\"],\"properties\":{\"subscriberName\":[\"subscriber_x\",\"subscriber_y\"],\"subscriberRole\":[\"PVT Homing\"],\"provStatus\":[\"CAPPED\"]},\"policyType\":\"SubscriberPolicy\"}}",
- "policyName": "oofBeijing.Config_MS_SubscriberPolicy_v1.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "SubscriberPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"hpaPolicy\",\"policyName\":\"oofBeijing.hpaPolicy_vGMuxInfra\",\"description\":\"HPA policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"1.0\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"resources\":\"vGMuxInfra\",\"identity\":\"hpaPolicy_vGMuxInfra\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"hpaPolicy\",\"flavorFeatures\":[{\"flavorLabel\":\"flavor_label_vm_01\",\"flavorProperties\":[{\"hpa-feature\":\"cpuTopology\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numCpusockets\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpusockets\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"4\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"8\",\"operator\":\"<=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"ovsDpdk\",\"mandatory\":\"False\",\"score\":\"3\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\"hpa-attribute-value\":\"ovsDpdk_version\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"cpuInstructionSetExtensions\",\"mandatory\":\"True\",\"architecture\":\"INTEL-64\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"instructionSetExtensions\",\"hpa-attribute-value\":[\"<CPUINST>\",\"<CPUINST>\"],\"operator\":\"ALL\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_02\",\"flavorProperties\":[{\"hpa-feature\":\"cpuPinningy\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\"hpa-attribute-value\":\"<CPUTHREADPOLICY>\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\"hpa-attribute-value\":\"<CPUPOLICY>\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"localStorage\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"ephemeralDiskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"swapMemSize\",\"hpa-attribute-value\":\"16\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"pcie\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"functionType\",\"hpa-attribute-value\":\"<PCITYPEVALUE>\",\"operator\":\"=\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_03\",\"flavorProperties\":[{\"hpa-feature\":\"numa\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numaNodes\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaCpu-0\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-0\",\"hpa-attribute-value\":\"2048\",\"operator\":\"=\",\"unit\":\"MB\"},{\"hpa-attribute-key\":\"numaCpu-1\",\"hpa-attribute-value\":\"4\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-1\",\"value\":\"4096\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"hugePages\",\"mandatory\":\"False\",\"score\":\"7\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"<MEMORYPAGESIZE>\",\"operator\":\"=\",\"unit\":\"\"}]}]}]}}",
- "policyName": "oofBeijing.Config_MS_hpaPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "hpaPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vG\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vG\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"international\",\"ip\",\"vG\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vG\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
- "policyName": "oofBeijing.Config_MS_vnfPolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "VnfPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vGMuxInfra\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vGMuxInfra\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vGMuxInfra\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
- "policyName": "oofBeijing.Config_MS_vnfPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "VnfPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vG\",\"description\":\"Distance Policy for vG\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"1500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vG\",\"resources\":[\"vG\"],\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vG\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
- "policyName": "oofBeijing.Config_MS_distancePolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "distancePolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vG\", \"description\": \"Capacity policy for vG\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vG\", \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vG\", \"vim_fit\"], \"resources\": [\"vG\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
- "policyName": "oofBeijing.Config_MS_capacityPolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "capacityPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"optimizationQueryPolicy\", \"policyName\": \"oofBeijing.queryPolicy_vcpe\", \"description\": \"Optimization query policy for vcpe\", \"templateVersion\": \"0.0.1\", \"version\": \"oofBeijing\", \"priority\": \"3\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"queryProperties\": [{\"attribute\": \"locationId\", \"attribute_location\": \"customerLocation\", \"value\": \"\"}, {\"attribute\": \"id\", \"attribute_location\": \"vpnInfo.vpnId\", \"value\": \"\"}, {\"attribute\": \"upstreamBW\", \"attribute_location\": \"vpnInfo.upstreamBW\", \"value\": \"\"}, {\"attribute\": \"customerLatitude\", \"attribute_location\": \"customerLatitude\", \"value\": 32.89748}, {\"attribute\": \"customerLongitude\", \"attribute_location\": \"customerLongitude\", \"value\": -97.040443}], \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vGMuxInfra\", \"vG\", \"optimizationQueryPolicy\"], \"policyType\": \"optimizationQueryPolicy\"}}",
- "policyName": "oofBeijing.Config_MS_queryPolicy_vcpe.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "optimizationQueryPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"PlacementOptimizationPolicy\",\"policyName\":\"oofBeijing.PlacementOptimizationPolicy_vGMuxInfra\",\"description\":\"Placement Optimization Policy for vGMuxInfra\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"5\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"objectiveParameter\":{\"parameterAttributes\":[{\"resource\":[\"vGMuxInfra\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"},{\"resource\":[\"vG\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"}],\"operator\":\"sum\"},\"identity\":\"optimization\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\",\"vG\"],\"policyType\":\"placementOptimization\",\"objective\":\"minimize\"}}",
- "policyName": "oofBeijing.Config_MS_PlacementOptimizationPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "PlacementOptimizationPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vGMuxInfra\",\"description\":\"Distance Policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vGMuxInfra\",\"resources\":[\"vGMuxInfra\"],\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
- "policyName": "oofBeijing.Config_MS_distancePolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "distancePolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vGMuxInfra\", \"description\": \"Capacity policy for vGMuxInfra\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vGMuxInfra\", \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vGMuxInfra\", \"vim_fit\"], \"resources\": [\"vGMuxInfra\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
- "policyName": "oofBeijing.Config_MS_capacityPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "capacityPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
+ "policies": {
+ "OSDF_FRANKFURT.SubscriberPolicy_v1": {
+ "type": "onap.policies.optimization.SubscriberPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_v1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "identity": "subscriber_vCPE",
+ "properties": {
+ "subscriberName": [
+ "subscriber_x",
+ "subscriber_y"
+ ],
+ "subscriberRole": [
+ "PVT Homing"
+ ],
+ "provStatus": [
+ "CAPPED"
+ ]
+ }
+ }
+ },
+ "OSDF_FRANKFURT.vnfPolicy_vG": {
+ "type": "onap.policies.optimization.VnfPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.vnfPolicy_vG",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vnf_vG",
+ "applicableResources": "any",
+ "vnfProperties": [
+ {
+ "inventoryProvider": "aai",
+ "serviceType": "",
+ "inventoryType": "cloud",
+ "customerId": "",
+ "orchestrationStatus": "",
+ "equipmentRole": ""
+ }
+ ]
+ }
+ },
+ "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": {
+ "type": "onap.policies.optimization.VnfPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vnf_vGMuxInfra",
+ "applicableResources": "any",
+ "vnfProperties": [
+ {
+ "inventoryProvider": "aai",
+ "serviceType": "vGMuxInfra-xx",
+ "inventoryType": "service",
+ "customerId": "SDN-ETHERNET-INTERNET",
+ "orchestrationStatus": "",
+ "equipmentRole": ""
+ }
+ ]
+ }
+ },
+ "OSDF_FRANKFURT.Distance_vG_1": {
+ "type": "onap.policies.optimization.DistancePolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Distance_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "distance-vG",
+ "applicableResources": "any",
+ "distanceProperties": {
+ "locationInfo": "customer_loc",
+ "distance": {
+ "value": "1500",
+ "operator": "<",
+ "unit": "km"
+ }
+ }
+ }
+ },
+ "OSDF_FRANKFURT.Distance_vGMuxInfra": {
+ "type": "onap.policies.optimization.DistancePolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "distance-vGMuxInfra",
+ "applicableResources": "any",
+ "distanceProperties": {
+ "locationInfo": "customer_loc",
+ "distance": {
+ "value": "500",
+ "operator": "<",
+ "unit": "km"
+ }
+ }
+ }
+ },
+ "OSDF_FRANKFURT.Placement_optimization_1": {
+ "type": "onap.policies.optimization.OptimizationPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Placement_optimization_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG",
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "optimization",
+ "objective": "minimize",
+ "objectiveParameter": {
+ "parameterAttributes": [
+ {
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "1",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vG"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "1",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vG"
+ ],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vFW"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "100",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vFW"
+ ],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
+ }
+ ],
+ "operator": "sum"
+ }
+ }
+ },
+ "OSDF_FRANKFURT.queryPolicy_vCPE": {
+ "type": "onap.policies.optimization.QueryPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra",
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vCPE_Query_Policy",
+ "queryProperties": [
+ {
+ "attribute": "customerLatitude",
+ "attribute_location": "customerLatitude"
+ },
+ {
+ "attribute": "customerLongitude",
+ "attribute_location": "customerLongitude"
+ }
+ ]
+ }
+ },
+ "OSDF_FRANKFURT.hpa_policy_vG_1": {
+ "type": "onap.policies.optimization.HpaPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.hpa_policy_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "hpa-vG",
+ "flavorFeatures": [
+ {
+ "id": "vg_1",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_01",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "cpuTopology",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "2",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "4",
+ "operator": "<=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "2",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "4",
+ "operator": "<=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "4",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "8",
+ "operator": "<=",
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": true,
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": 6,
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": 6,
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "ovsDpdk",
+ "mandatory": false,
+ "score": 3,
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value": "ovsDpdk_version",
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "cpuInstructionSetExtensions",
+ "mandatory": true,
+ "architecture": "INTEL-64",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": [
+ "<CPUINST>",
+ "<CPUINST>"
+ ],
+ "operator": [
+ "ALL"
+ ],
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "vg_2",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_02",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "cpuPinningy",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "<CPUTHREADPOLICY>",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "<CPUPOLICY>",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": "GB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "localStorage",
+ "mandatory": "False",
+ "score": "5",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "diskSize",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": "GB"
+ },
+ {
+ "hpa-attribute-key": "ephemeralDiskSize",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": "GB"
+ },
+ {
+ "hpa-attribute-key": "swapMemSize",
+ "hpa-attribute-value": "16",
+ "operator": "=",
+ "unit": "MB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "pciePassthrough",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "pciCount",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "pciVendorId",
+ "hpa-attribute-value": "8086",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "pciDeviceId",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "vg_3",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_03",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "numa",
+ "mandatory": "False",
+ "score": "5",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numaNodes",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaCpu-0",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaMem-0",
+ "hpa-attribute-value": "2048",
+ "operator": "=",
+ "unit": "MB"
+ },
+ {
+ "hpa-attribute-key": "numaCpu-1",
+ "hpa-attribute-value": "4",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaMem-1",
+ "value": "4096",
+ "operator": "=",
+ "unit": "MB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": "GB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "hugePages",
+ "mandatory": "False",
+ "score": "7",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "memoryPageSize",
+ "hpa-attribute-value": "<MEMORYPAGESIZE>",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ },
+ "OSDF_FRANKFURT.Capacity_vG_1": {
+ "type": "onap.policies.optimization.Vim_fit",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Capacity_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "capacity_vG",
+ "applicableResources": "any",
+ "capacityProperty": {
+ "controller": "multicloud",
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ }
+ }
+ },
+ "OSDF_FRANKFURT.Capacity_vGMuxInfra": {
+ "type": "onap.policies.optimization.Vim_fit",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Capacity_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "capacity_vGMuxInfra",
+ "applicableResources": "any",
+ "capacityProperty": {
+ "controller": "multicloud",
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ }
+ }
+ }
+ }
}
-] \ No newline at end of file
diff --git a/test/placement-tests/policy_response2.json b/test/placement-tests/policy_response2.json
index 2cd6dcb..15ddbe1 100644
--- a/test/placement-tests/policy_response2.json
+++ b/test/placement-tests/policy_response2.json
@@ -1,182 +1,705 @@
-[
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"SubscriberPolicy\",\"policyName\":\"oofBeijing.SubscriberPolicy_v1\",\"description\":\"Subscriber Policy\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"1\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"subscriber\",\"policyScope\":[\"vCPE\",\"PVT Homing\",\"SubscriberPolicy\",\"subscriber_x\",\"subscriber_y\"],\"properties\":{\"subscriberName\":[\"subscriber_x\",\"subscriber_y\"],\"subscriberRole\":[\"PVT Homing\"],\"provStatus\":[\"CAPPED\"]},\"policyType\":\"SubscriberPolicy\"}}",
- "policyName": "oofBeijing.Config_MS_SubscriberPolicy_v1.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "SubscriberPolicy",
- "uuid": "",
- "Location": ""
+{
+ "policies": {
+ "OSDF_FRANKFURT.SubscriberPolicy_v1": {
+ "type": "onap.policies.optimization.SubscriberPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_v1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "identity": "subscriber_vCPE",
+ "properties": {
+ "subscriberName": [
+ "subscriber_x",
+ "subscriber_y"
+ ],
+ "subscriberRole": [
+ "PVT Homing"
+ ],
+ "provStatus": [
+ "CAPPED"
+ ]
+ }
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"hpaPolicy\",\"policyName\":\"oofBeijing.hpaPolicy_vGMuxInfra\",\"description\":\"HPA policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"1.0\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"resources\":\"vGMuxInfra\",\"identity\":\"hpaPolicy_vGMuxInfra\",\"policyScope\":[\"vCPE\",\"PVT Homing\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"hpaPolicy\",\"flavorFeatures\":[{\"flavorLabel\":\"flavor_label_vm_01\",\"flavorProperties\":[{\"hpa-feature\":\"cpuTopology\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numCpuSockets\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuSockets\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"4\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"8\",\"operator\":\"<=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"ovsDpdk\",\"mandatory\":\"False\",\"score\":\"3\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\"hpa-attribute-value\":\"ovsDpdk_version\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"cpuInstructionSetExtensions\",\"mandatory\":\"True\",\"architecture\":\"INTEL-64\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"instructionSetExtensions\",\"hpa-attribute-value\":[\"<CPUINST>\",\"<CPUINST>\"],\"operator\":\"ALL\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_02\",\"flavorProperties\":[{\"hpa-feature\":\"cpuPinningy\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\"hpa-attribute-value\":\"<CPUTHREADPOLICY>\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\"hpa-attribute-value\":\"<CPUPOLICY>\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"localStorage\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"ephemeralDiskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"swapMemSize\",\"hpa-attribute-value\":\"16\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"pcie\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"functionType\",\"hpa-attribute-value\":\"<PCITYPEVALUE>\",\"operator\":\"=\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_03\",\"flavorProperties\":[{\"hpa-feature\":\"numa\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numaNodes\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaCpu-0\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-0\",\"hpa-attribute-value\":\"2048\",\"operator\":\"=\",\"unit\":\"MB\"},{\"hpa-attribute-key\":\"numaCpu-1\",\"hpa-attribute-value\":\"4\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-1\",\"value\":\"4096\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"hugePages\",\"mandatory\":\"False\",\"score\":\"7\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"<MEMORYPAGESIZE>\",\"operator\":\"=\",\"unit\":\"\"}]}]}]}}",
- "policyName": "oofBeijing.Config_MS_hpaPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "hpaPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.vnfPolicy_vG": {
+ "type": "onap.policies.optimization.VnfPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.vnfPolicy_vG",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vnf_vG",
+ "applicableResources": "any",
+ "vnfProperties": [
+ {
+ "inventoryProvider": "aai",
+ "serviceType": "",
+ "inventoryType": "cloud",
+ "customerId": "",
+ "orchestrationStatus": "",
+ "equipmentRole": ""
+ }
+ ]
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vG\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vG\",\"policyScope\":[\"vCPE\",\"INTERNATIONAL\",\"ip\",\"vG\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vG\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
- "policyName": "oofBeijing.Config_MS_vnfPolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "VnfPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": {
+ "type": "onap.policies.optimization.VnfPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vnf_vGMuxInfra",
+ "applicableResources": "any",
+ "vnfProperties": [
+ {
+ "inventoryProvider": "aai",
+ "serviceType": "vGMuxInfra-xx",
+ "inventoryType": "service",
+ "customerId": "SDN-ETHERNET-INTERNET",
+ "orchestrationStatus": "",
+ "equipmentRole": ""
+ }
+ ]
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vGMuxInfra\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vGMuxInfra\",\"policyScope\":[\"vCPE\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vGMuxInfra\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
- "policyName": "oofBeijing.Config_MS_vnfPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "VnfPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.Distance_vG_1": {
+ "type": "onap.policies.optimization.DistancePolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Distance_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "distance-vG",
+ "applicableResources": "any",
+ "distanceProperties": {
+ "locationInfo": "customer_loc",
+ "distance": {
+ "value": "1500",
+ "operator": "<",
+ "unit": "km"
+ }
+ }
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vG\",\"description\":\"Distance Policy for vG\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"1500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vG\",\"resources\":[\"vG\"],\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vG\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
- "policyName": "oofBeijing.Config_MS_distancePolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "distancePolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.Distance_vGMuxInfra": {
+ "type": "onap.policies.optimization.DistancePolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "distance-vGMuxInfra",
+ "applicableResources": "any",
+ "distanceProperties": {
+ "locationInfo": "customer_loc",
+ "distance": {
+ "value": "500",
+ "operator": "<",
+ "unit": "km"
+ }
+ }
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vG\", \"description\": \"Capacity policy for vG\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vG\", \"policyScope\": [\"VCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vG\", \"vim_fit\"], \"resources\": [\"vG\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
- "policyName": "oofBeijing.Config_MS_capacityPolicy_vG.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "capacityPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.Placement_optimization_1": {
+ "type": "onap.policies.optimization.OptimizationPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Placement_optimization_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG",
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "optimization",
+ "objective": "minimize",
+ "objectiveParameter": {
+ "parameterAttributes": [
+ {
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "1",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vG"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "1",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vG"
+ ],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vFW"
+ ],
+ "customerLocationInfo": "customer_loc",
+ "parameter": "distance",
+ "weight": "100",
+ "operator": "product"
+ },
+ {
+ "resources": [
+ "vFW"
+ ],
+ "parameter": "hpa_score",
+ "weight": "200",
+ "operator": "product"
+ }
+ ],
+ "operator": "sum"
+ }
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"optimizationQueryPolicy\", \"policyName\": \"oofBeijing.queryPolicy_vCPE\", \"description\": \"Optimization query policy for vCPE\", \"templateVersion\": \"0.0.1\", \"version\": \"oofBeijing\", \"priority\": \"3\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"queryProperties\": [{\"attribute\": \"locationId\", \"attribute_location\": \"customerLocation\", \"value\": \"\"}, {\"attribute\": \"id\", \"attribute_location\": \"vpnInfo.vpnId\", \"value\": \"\"}, {\"attribute\": \"upstreamBW\", \"attribute_location\": \"vpnInfo.upstreamBW\", \"value\": \"\"}, {\"attribute\": \"customerLatitude\", \"attribute_location\": \"customerLatitude\", \"value\": 32.89748}, {\"attribute\": \"customerLongitude\", \"attribute_location\": \"customerLongitude\", \"value\": -97.040443}], \"policyScope\": [\"vCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vGMuxInfra\", \"vG\", \"optimizationQueryPolicy\"], \"policyType\": \"optimizationQueryPolicy\"}}",
- "policyName": "oofBeijing.Config_MS_queryPolicy_vCPE.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "optimizationQueryPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.queryPolicy_vCPE": {
+ "type": "onap.policies.optimization.QueryPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra",
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "vCPE_Query_Policy",
+ "queryProperties": [
+ {
+ "attribute": "customerLatitude",
+ "attribute_location": "customerLatitude"
+ },
+ {
+ "attribute": "customerLongitude",
+ "attribute_location": "customerLongitude"
+ }
+ ]
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"PlacementOptimizationPolicy\",\"policyName\":\"oofBeijing.PlacementOptimizationPolicy_vGMuxInfra\",\"description\":\"Placement Optimization Policy for vGMuxInfra\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"5\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"objectiveParameter\":{\"parameterAttributes\":[{\"resource\":[\"vGMuxInfra\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"},{\"resource\":[\"vG\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"}],\"operator\":\"sum\"},\"identity\":\"optimization\",\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\",\"vG\"],\"policyType\":\"placementOptimization\",\"objective\":\"minimize\"}}",
- "policyName": "oofBeijing.Config_MS_PlacementOptimizationPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "PlacementOptimizationPolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.hpa_policy_vG_1": {
+ "type": "onap.policies.optimization.HpaPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.hpa_policy_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "hpa-vG",
+ "flavorFeatures": [
+ {
+ "id": "vg_1",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_01",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "cpuTopology",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "2",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuSockets",
+ "hpa-attribute-value": "4",
+ "operator": "<=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "2",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuCores",
+ "hpa-attribute-value": "4",
+ "operator": "<=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "4",
+ "operator": ">=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numCpuThreads",
+ "hpa-attribute-value": "8",
+ "operator": "<=",
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": true,
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": 6,
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": 6,
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "ovsDpdk",
+ "mandatory": false,
+ "score": 3,
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "dataProcessingAccelerationLibrary",
+ "hpa-attribute-value": "ovsDpdk_version",
+ "operator": [
+ "="
+ ],
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "cpuInstructionSetExtensions",
+ "mandatory": true,
+ "architecture": "INTEL-64",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "instructionSetExtensions",
+ "hpa-attribute-value": [
+ "<CPUINST>",
+ "<CPUINST>"
+ ],
+ "operator": [
+ "ALL"
+ ],
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "vg_2",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_02",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "cpuPinningy",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "logicalCpuThreadPinningPolicy",
+ "hpa-attribute-value": "<CPUTHREADPOLICY>",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "logicalCpuPinningPolicy",
+ "hpa-attribute-value": "<CPUPOLICY>",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": "GB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "localStorage",
+ "mandatory": "False",
+ "score": "5",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "diskSize",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": "GB"
+ },
+ {
+ "hpa-attribute-key": "ephemeralDiskSize",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": "GB"
+ },
+ {
+ "hpa-attribute-key": "swapMemSize",
+ "hpa-attribute-value": "16",
+ "operator": "=",
+ "unit": "MB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "pciePassthrough",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "pciCount",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "pciVendorId",
+ "hpa-attribute-value": "8086",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "pciDeviceId",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "vg_3",
+ "type": "vnfc",
+ "directives": [
+ {
+ "type": "flavor_directives",
+ "attributes": [
+ {
+ "attribute_name": "flavor_label_vm_03",
+ "attribute_value": ""
+ }
+ ]
+ }
+ ],
+ "flavorProperties": [
+ {
+ "hpa-feature": "numa",
+ "mandatory": "False",
+ "score": "5",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numaNodes",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaCpu-0",
+ "hpa-attribute-value": "2",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaMem-0",
+ "hpa-attribute-value": "2048",
+ "operator": "=",
+ "unit": "MB"
+ },
+ {
+ "hpa-attribute-key": "numaCpu-1",
+ "hpa-attribute-value": "4",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "numaMem-1",
+ "value": "4096",
+ "operator": "=",
+ "unit": "MB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "basicCapabilities",
+ "mandatory": "True",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "numVirtualCpu",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": ""
+ },
+ {
+ "hpa-attribute-key": "virtualMemSize",
+ "hpa-attribute-value": "6",
+ "operator": "=",
+ "unit": "GB"
+ }
+ ]
+ },
+ {
+ "hpa-feature": "hugePages",
+ "mandatory": "False",
+ "score": "7",
+ "architecture": "generic",
+ "directives": [],
+ "hpa-feature-attributes": [
+ {
+ "hpa-attribute-key": "memoryPageSize",
+ "hpa-attribute-value": "<MEMORYPAGESIZE>",
+ "operator": "=",
+ "unit": ""
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vGMuxInfra\",\"description\":\"Distance Policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vGMuxInfra\",\"resources\":[\"vGMuxInfra\"],\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
- "policyName": "oofBeijing.Config_MS_distancePolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "distancePolicy",
- "uuid": "",
- "Location": ""
+ "OSDF_FRANKFURT.Capacity_vG_1": {
+ "type": "onap.policies.optimization.Vim_fit",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Capacity_vG_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vG"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "capacity_vG",
+ "applicableResources": "any",
+ "capacityProperty": {
+ "controller": "multicloud",
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ }
+ }
},
- "responseAttributes": { },
- "property": null
- },
- {
- "policyConfigMessage": "Config Retrieved! ",
- "policyConfigStatus": "CONFIG_RETRIEVED",
- "type": "JSON",
- "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vGMuxInfra\", \"description\": \"Capacity policy for vGMuxInfra\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vGMuxInfra\", \"policyScope\": [\"VCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vGMuxInfra\", \"vim_fit\"], \"resources\": [\"vGMuxInfra\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
- "policyName": "oofBeijing.Config_MS_capacityPolicy_vGMuxInfra.1.xml",
- "policyVersion": "1",
- "matchingConditions": {
- "ECOMPName": "SNIRO-Placement",
- "ONAPName": "SNIRO-Placement",
- "ConfigName": "",
- "service": "capacityPolicy",
- "uuid": "",
- "Location": ""
- },
- "responseAttributes": { },
- "property": null
+ "OSDF_FRANKFURT.Capacity_vGMuxInfra": {
+ "type": "onap.policies.optimization.Vim_fit",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Capacity_vGMuxInfra",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT",
+ "PVT Homing"
+ ],
+ "services": [
+ "vCPE"
+ ],
+ "resources": [
+ "vGMuxInfra"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "capacity_vGMuxInfra",
+ "applicableResources": "any",
+ "capacityProperty": {
+ "controller": "multicloud",
+ "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ }
+ }
+ }
}
-] \ No newline at end of file
+}
+
diff --git a/test/placement-tests/policy_response2_old_format.json b/test/placement-tests/policy_response2_old_format.json
new file mode 100644
index 0000000..2cd6dcb
--- /dev/null
+++ b/test/placement-tests/policy_response2_old_format.json
@@ -0,0 +1,182 @@
+[
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"SubscriberPolicy\",\"policyName\":\"oofBeijing.SubscriberPolicy_v1\",\"description\":\"Subscriber Policy\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"1\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"subscriber\",\"policyScope\":[\"vCPE\",\"PVT Homing\",\"SubscriberPolicy\",\"subscriber_x\",\"subscriber_y\"],\"properties\":{\"subscriberName\":[\"subscriber_x\",\"subscriber_y\"],\"subscriberRole\":[\"PVT Homing\"],\"provStatus\":[\"CAPPED\"]},\"policyType\":\"SubscriberPolicy\"}}",
+ "policyName": "oofBeijing.Config_MS_SubscriberPolicy_v1.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "SubscriberPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"hpaPolicy\",\"policyName\":\"oofBeijing.hpaPolicy_vGMuxInfra\",\"description\":\"HPA policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"1.0\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"resources\":\"vGMuxInfra\",\"identity\":\"hpaPolicy_vGMuxInfra\",\"policyScope\":[\"vCPE\",\"PVT Homing\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"hpaPolicy\",\"flavorFeatures\":[{\"flavorLabel\":\"flavor_label_vm_01\",\"flavorProperties\":[{\"hpa-feature\":\"cpuTopology\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numCpuSockets\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuSockets\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"4\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"8\",\"operator\":\"<=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"ovsDpdk\",\"mandatory\":\"False\",\"score\":\"3\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\"hpa-attribute-value\":\"ovsDpdk_version\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"cpuInstructionSetExtensions\",\"mandatory\":\"True\",\"architecture\":\"INTEL-64\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"instructionSetExtensions\",\"hpa-attribute-value\":[\"<CPUINST>\",\"<CPUINST>\"],\"operator\":\"ALL\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_02\",\"flavorProperties\":[{\"hpa-feature\":\"cpuPinningy\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\"hpa-attribute-value\":\"<CPUTHREADPOLICY>\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\"hpa-attribute-value\":\"<CPUPOLICY>\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"localStorage\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"ephemeralDiskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"swapMemSize\",\"hpa-attribute-value\":\"16\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"pcie\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"functionType\",\"hpa-attribute-value\":\"<PCITYPEVALUE>\",\"operator\":\"=\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_03\",\"flavorProperties\":[{\"hpa-feature\":\"numa\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numaNodes\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaCpu-0\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-0\",\"hpa-attribute-value\":\"2048\",\"operator\":\"=\",\"unit\":\"MB\"},{\"hpa-attribute-key\":\"numaCpu-1\",\"hpa-attribute-value\":\"4\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-1\",\"value\":\"4096\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"hugePages\",\"mandatory\":\"False\",\"score\":\"7\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"<MEMORYPAGESIZE>\",\"operator\":\"=\",\"unit\":\"\"}]}]}]}}",
+ "policyName": "oofBeijing.Config_MS_hpaPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "hpaPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vG\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vG\",\"policyScope\":[\"vCPE\",\"INTERNATIONAL\",\"ip\",\"vG\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vG\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
+ "policyName": "oofBeijing.Config_MS_vnfPolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "VnfPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vGMuxInfra\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vGMuxInfra\",\"policyScope\":[\"vCPE\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vGMuxInfra\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
+ "policyName": "oofBeijing.Config_MS_vnfPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "VnfPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vG\",\"description\":\"Distance Policy for vG\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"1500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vG\",\"resources\":[\"vG\"],\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vG\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
+ "policyName": "oofBeijing.Config_MS_distancePolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "distancePolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vG\", \"description\": \"Capacity policy for vG\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vG\", \"policyScope\": [\"VCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vG\", \"vim_fit\"], \"resources\": [\"vG\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
+ "policyName": "oofBeijing.Config_MS_capacityPolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "capacityPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"optimizationQueryPolicy\", \"policyName\": \"oofBeijing.queryPolicy_vCPE\", \"description\": \"Optimization query policy for vCPE\", \"templateVersion\": \"0.0.1\", \"version\": \"oofBeijing\", \"priority\": \"3\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"queryProperties\": [{\"attribute\": \"locationId\", \"attribute_location\": \"customerLocation\", \"value\": \"\"}, {\"attribute\": \"id\", \"attribute_location\": \"vpnInfo.vpnId\", \"value\": \"\"}, {\"attribute\": \"upstreamBW\", \"attribute_location\": \"vpnInfo.upstreamBW\", \"value\": \"\"}, {\"attribute\": \"customerLatitude\", \"attribute_location\": \"customerLatitude\", \"value\": 32.89748}, {\"attribute\": \"customerLongitude\", \"attribute_location\": \"customerLongitude\", \"value\": -97.040443}], \"policyScope\": [\"vCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vGMuxInfra\", \"vG\", \"optimizationQueryPolicy\"], \"policyType\": \"optimizationQueryPolicy\"}}",
+ "policyName": "oofBeijing.Config_MS_queryPolicy_vCPE.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "optimizationQueryPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"PlacementOptimizationPolicy\",\"policyName\":\"oofBeijing.PlacementOptimizationPolicy_vGMuxInfra\",\"description\":\"Placement Optimization Policy for vGMuxInfra\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"5\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"objectiveParameter\":{\"parameterAttributes\":[{\"resource\":[\"vGMuxInfra\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"},{\"resource\":[\"vG\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"}],\"operator\":\"sum\"},\"identity\":\"optimization\",\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\",\"vG\"],\"policyType\":\"placementOptimization\",\"objective\":\"minimize\"}}",
+ "policyName": "oofBeijing.Config_MS_PlacementOptimizationPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "PlacementOptimizationPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vGMuxInfra\",\"description\":\"Distance Policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vGMuxInfra\",\"resources\":[\"vGMuxInfra\"],\"policyScope\":[\"vCPE\",\"US\",\"INTERNATIONAL\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
+ "policyName": "oofBeijing.Config_MS_distancePolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "distancePolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vGMuxInfra\", \"description\": \"Capacity policy for vGMuxInfra\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vGMuxInfra\", \"policyScope\": [\"VCPE\",\"US\", \"INTERNATIONAL\", \"ip\", \"vGMuxInfra\", \"vim_fit\"], \"resources\": [\"vGMuxInfra\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
+ "policyName": "oofBeijing.Config_MS_capacityPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "capacityPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ }
+] \ No newline at end of file
diff --git a/test/placement-tests/policy_response_old_format.json b/test/placement-tests/policy_response_old_format.json
new file mode 100644
index 0000000..8de8537
--- /dev/null
+++ b/test/placement-tests/policy_response_old_format.json
@@ -0,0 +1,182 @@
+[
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"SubscriberPolicy\",\"policyName\":\"oofBeijing.SubscriberPolicy_v1\",\"description\":\"Subscriber Policy\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"1\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"subscriber\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"subscriberpolicy\",\"subscriber_x\",\"subscriber_y\"],\"properties\":{\"subscriberName\":[\"subscriber_x\",\"subscriber_y\"],\"subscriberRole\":[\"PVT Homing\"],\"provStatus\":[\"CAPPED\"]},\"policyType\":\"SubscriberPolicy\"}}",
+ "policyName": "oofBeijing.Config_MS_SubscriberPolicy_v1.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "SubscriberPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"hpaPolicy\",\"policyName\":\"oofBeijing.hpaPolicy_vGMuxInfra\",\"description\":\"HPA policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"1.0\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"resources\":\"vGMuxInfra\",\"identity\":\"hpaPolicy_vGMuxInfra\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"hpaPolicy\",\"flavorFeatures\":[{\"flavorLabel\":\"flavor_label_vm_01\",\"flavorProperties\":[{\"hpa-feature\":\"cpuTopology\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numCpusockets\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpusockets\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"2\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuCores\",\"hpa-attribute-value\":\"4\",\"operator\":\"<=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"4\",\"operator\":\">=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numCpuThreads\",\"hpa-attribute-value\":\"8\",\"operator\":\"<=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"ovsDpdk\",\"mandatory\":\"False\",\"score\":\"3\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"dataProcessingAccelerationLibrary\",\"hpa-attribute-value\":\"ovsDpdk_version\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"cpuInstructionSetExtensions\",\"mandatory\":\"True\",\"architecture\":\"INTEL-64\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"instructionSetExtensions\",\"hpa-attribute-value\":[\"<CPUINST>\",\"<CPUINST>\"],\"operator\":\"ALL\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_02\",\"flavorProperties\":[{\"hpa-feature\":\"cpuPinningy\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\",\"hpa-attribute-value\":\"<CPUTHREADPOLICY>\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"logicalCpuPinningPolicy\",\"hpa-attribute-value\":\"<CPUPOLICY>\",\"operator\":\"=\",\"unit\":\"\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"localStorage\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"ephemeralDiskSize\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"GB\"},{\"hpa-attribute-key\":\"swapMemSize\",\"hpa-attribute-value\":\"16\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"pcie\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"pciCount\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciVendorId\",\"hpa-attribute-value\":\"8086\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"pciDeviceId\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"functionType\",\"hpa-attribute-value\":\"<PCITYPEVALUE>\",\"operator\":\"=\",\"unit\":\"\"}]}]},{\"flavorLabel\":\"flavor_label_vm_03\",\"flavorProperties\":[{\"hpa-feature\":\"numa\",\"mandatory\":\"False\",\"score\":\"5\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numaNodes\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaCpu-0\",\"hpa-attribute-value\":\"2\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-0\",\"hpa-attribute-value\":\"2048\",\"operator\":\"=\",\"unit\":\"MB\"},{\"hpa-attribute-key\":\"numaCpu-1\",\"hpa-attribute-value\":\"4\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"numaMem-1\",\"value\":\"4096\",\"operator\":\"=\",\"unit\":\"MB\"}]},{\"hpa-feature\":\"basicCapabilities\",\"mandatory\":\"True\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"numVirtualCpu\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"\"},{\"hpa-attribute-key\":\"virtualMemSize\",\"hpa-attribute-value\":\"6\",\"operator\":\"=\",\"unit\":\"GB\"}]},{\"hpa-feature\":\"hugePages\",\"mandatory\":\"False\",\"score\":\"7\",\"architecture\":\"generic\",\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"memoryPageSize\",\"hpa-attribute-value\":\"<MEMORYPAGESIZE>\",\"operator\":\"=\",\"unit\":\"\"}]}]}]}}",
+ "policyName": "oofBeijing.Config_MS_hpaPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "hpaPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vG\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vG\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"international\",\"ip\",\"vG\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vG\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
+ "policyName": "oofBeijing.Config_MS_vnfPolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "VnfPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"VnfPolicy\",\"policyName\":\"oofBeijing.vnfPolicy_vGMuxInfra\",\"description\":\"vnfPolicy\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"6\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"identity\":\"vnf_vGMuxInfra\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"vnf_policy\",\"resources\":[\"vGMuxInfra\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"inventoryProvider\":\"aai\",\"serviceType\":\"\",\"inventoryType\":\"cloud\",\"customerId\":\"\"},{\"inventoryProvider\":\"multicloud\",\"serviceType\":\"HNGATEWAY\",\"inventoryType\":\"service\",\"customerId\":\"21014aa2-526b-11e6-beb8-9e71128cae77\"}]}}",
+ "policyName": "oofBeijing.Config_MS_vnfPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "VnfPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vG\",\"description\":\"Distance Policy for vG\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"1500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vG\",\"resources\":[\"vG\"],\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vG\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
+ "policyName": "oofBeijing.Config_MS_distancePolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "distancePolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vG\", \"description\": \"Capacity policy for vG\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vG\", \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vG\", \"vim_fit\"], \"resources\": [\"vG\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
+ "policyName": "oofBeijing.Config_MS_capacityPolicy_vG.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "capacityPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"optimizationQueryPolicy\", \"policyName\": \"oofBeijing.queryPolicy_vcpe\", \"description\": \"Optimization query policy for vcpe\", \"templateVersion\": \"0.0.1\", \"version\": \"oofBeijing\", \"priority\": \"3\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"queryProperties\": [{\"attribute\": \"locationId\", \"attribute_location\": \"customerLocation\", \"value\": \"\"}, {\"attribute\": \"id\", \"attribute_location\": \"vpnInfo.vpnId\", \"value\": \"\"}, {\"attribute\": \"upstreamBW\", \"attribute_location\": \"vpnInfo.upstreamBW\", \"value\": \"\"}, {\"attribute\": \"customerLatitude\", \"attribute_location\": \"customerLatitude\", \"value\": 32.89748}, {\"attribute\": \"customerLongitude\", \"attribute_location\": \"customerLongitude\", \"value\": -97.040443}], \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vGMuxInfra\", \"vG\", \"optimizationQueryPolicy\"], \"policyType\": \"optimizationQueryPolicy\"}}",
+ "policyName": "oofBeijing.Config_MS_queryPolicy_vcpe.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "optimizationQueryPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"PlacementOptimizationPolicy\",\"policyName\":\"oofBeijing.PlacementOptimizationPolicy_vGMuxInfra\",\"description\":\"Placement Optimization Policy for vGMuxInfra\",\"templateVersion\":\"1702.03\",\"version\":\"oofBeijing\",\"priority\":\"5\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"objectiveParameter\":{\"parameterAttributes\":[{\"resource\":[\"vGMuxInfra\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"},{\"resource\":[\"vG\"],\"customerLocationInfo\":\"customer_loc\",\"parameter\":\"distance\",\"weight\":\"1\",\"operator\":\"product\"}],\"operator\":\"sum\"},\"identity\":\"optimization\",\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\",\"vG\"],\"policyType\":\"placementOptimization\",\"objective\":\"minimize\"}}",
+ "policyName": "oofBeijing.Config_MS_PlacementOptimizationPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "PlacementOptimizationPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"distancePolicy\",\"policyName\":\"oofBeijing.distancePolicy_vGMuxInfra\",\"description\":\"Distance Policy for vGMuxInfra\",\"templateVersion\":\"0.0.1\",\"version\":\"oofBeijing\",\"priority\":\"3\",\"riskType\":\"test\",\"riskLevel\":\"2\",\"guard\":\"False\",\"content\":{\"distanceProperties\":{\"locationInfo\":\"customer_location\",\"distance\":{\"value\":\"500\",\"operator\":\"<\",\"unit\":\"km\"}},\"identity\":\"distance-vGMuxInfra\",\"resources\":[\"vGMuxInfra\"],\"policyScope\":[\"vcpe\",\"PVT Homing\",\"us\",\"international\",\"ip\",\"vGMuxInfra\"],\"policyType\":\"distancePolicy\",\"applicableResources\":\"any\"}}",
+ "policyName": "oofBeijing.Config_MS_distancePolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "distancePolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\": \"capacityPolicy\", \"policyName\": \"oofBeijing.capacityPolicy_vGMuxInfra\", \"description\": \"Capacity policy for vGMuxInfra\", \"templateVersion\": \"1702.03\", \"version\": \"oofBeijing\", \"priority\": \"5\", \"riskType\": \"test\", \"riskLevel\": \"2\", \"guard\": \"False\", \"content\": {\"identity\": \"capacity_vGMuxInfra\", \"policyScope\": [\"vcpe\", \"PVT Homing\",\"us\", \"international\", \"ip\", \"vGMuxInfra\", \"vim_fit\"], \"resources\": [\"vGMuxInfra\"], \"capacityProperty\": {\"controller\": \"multicloud\", \"request\": \"{\\\"vCPU\\\": 10, \\\"Memory\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_MEM\\\"}, \\\"unit\\\": \\\"GB\\\"}, \\\"Storage\\\": {\\\"quantity\\\": {\\\"get_param\\\": \\\"REQUIRED_DISK\\\", \\\"unit\\\": \\\"GB\\\"}}}\"}, \"policyType\": \"vim_fit\", \"applicableResources\": \"any\"}}",
+ "policyName": "oofBeijing.Config_MS_capacityPolicy_vGMuxInfra.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ONAPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "capacityPolicy",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": { },
+ "property": null
+ }
+] \ No newline at end of file
diff --git a/test/placement-tests/request_placement_vfmod.json b/test/placement-tests/request_placement_vfmod.json
new file mode 100644
index 0000000..4b2b852
--- /dev/null
+++ b/test/placement-tests/request_placement_vfmod.json
@@ -0,0 +1,113 @@
+{
+ "name": "de4f04e3-0a65-470b-9d07-8ea6c2fb3e10",
+ "files": {},
+ "timeout": 1200,
+ "num_solution": "100",
+ "template": {
+ "homing_template_version": "2017-10-10",
+ "parameters": {
+ "REQUIRED_MEM": "",
+ "REQUIRED_DISK": "",
+ "customer_lat": 1.1,
+ "customer_long": 2.2,
+ "service_name": "vFW_TD",
+ "service_id": "3e8d118c-10ca-4b4b-b3db-089b5e9e6a1c",
+ "chosen_region": "RegionOne"
+ },
+ "locations": {
+ "customer_loc": {
+ "latitude": {
+ "get_param": "customer_lat"
+ },
+ "longitude": {
+ "get_param": "customer_long"
+ }
+ }
+ },
+ "demands": {
+ "vFW-SINK": [
+ {
+ "inventory_provider": "aai",
+ "inventory_type": "vfmodule",
+ "service_type": "vFW-SINK-XX",
+ "service_resource_id": "vFW-SINK-XX",
+ "filtering_attributes": {
+ "global-customer-id": {
+ "get_param": "chosen_customer_id"
+ },
+ "model-invariant-id": "e7227847-dea6-4374-abca-4561b070fe7d",
+ "model-version-id": "763731df-84fd-494b-b824-01fc59a5ff2d",
+ "orchestration-status": [
+ "active"
+ ],
+ "prov-status": "ACTIVE",
+ "cloud-region-id": {
+ "get_param": "chosen_region"
+ },
+ "service_instance_id": {
+ "get_param": "service_id"
+ }
+ },
+ "passthrough_attributes": {
+ "td-role": "destination"
+ },
+ "excluded_candidates": [
+ {
+ "inventory_type": "vfmodule",
+ "candidate_id": [
+ "e765d576-8755-4145-8536-0bb6d9b1dc9a"
+ ]
+ }
+ ]
+ }
+ ],
+ "vPGN": [
+ {
+ "inventory_provider": "aai",
+ "inventory_type": "vfmodule",
+ "service_type": "vPGN-XX",
+ "service_resource_id": "vPGN-XX",
+ "unique": "False",
+ "filtering_attributes": {
+ "global-customer-id": {
+ "get_param": "chosen_customer_id"
+ },
+ "model-invariant-id": "762472ef-5284-4daa-ab32-3e7bee2ec355",
+ "model-version-id": "e02a7e5c-9d27-4360-ab7c-73bb83b07e3b",
+ "orchestration-status": [
+ "active"
+ ],
+ "prov-status": "ACTIVE",
+ "cloud-region-id": {
+ "get_param": "chosen_region"
+ },
+ "service_instance_id": {
+ "get_param": "service_id"
+ }
+ },
+ "passthrough_attributes": {
+ "td-role": "anchor"
+ }
+ }
+ ]
+ },
+ "constraints": {
+ "affinity_vFW_TD": {
+ "type": "zone",
+ "demands": [
+ "vFW-SINK",
+ "vPGN"
+ ],
+ "properties": {
+ "category": "region",
+ "qualifier": "same"
+ }
+ }
+ },
+ "optimization": {
+ "minimize": {
+ "sum": []
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/placement-tests/request_vfmod.json b/test/placement-tests/request_vfmod.json
new file mode 100644
index 0000000..1a8a462
--- /dev/null
+++ b/test/placement-tests/request_vfmod.json
@@ -0,0 +1,57 @@
+{
+ "requestInfo": {
+ "transactionId": "e576c75e-7536-4145-a1c0-d60b65bb1bb8",
+ "requestId": "de4f04e3-0a65-470b-9d07-8ea6c2fb3e10",
+ "callbackUrl": "http://0.0.0.0:9000/osdfCallback/",
+ "sourceId": "SO",
+ "requestType": "create",
+ "numSolutions": "100",
+ "optimizers": [
+ "placement"
+ ],
+ "timeout": 1200
+ },
+ "placementInfo": {
+ "requestParameters": {
+ "chosenRegion": "RegionOne"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "dbc2c763-6383-42d6-880a-b7d5c5bc84d9",
+ "subscriberName": "oof-so-chm"
+ },
+ "placementDemands": [
+ {
+ "resourceModuleName": "vFW-SINK",
+ "serviceResourceId": "vFW-SINK-XX",
+ "resourceModelInfo": {
+ "modelInvariantId": "e7227847-dea6-4374-abca-4561b070fe7d",
+ "modelVersionId": "763731df-84fd-494b-b824-01fc59a5ff2d"
+ },
+ "excludedCandidates": [
+ {
+ "identifierType": "vfmodule",
+ "identifiers": [
+ "e765d576-8755-4145-8536-0bb6d9b1dc9a"
+ ]
+ }
+ ]
+ },
+ {
+ "resourceModuleName": "vPGN",
+ "serviceResourceId": "vPGN-XX",
+ "resourceModelInfo": {
+ "modelInvariantId": "762472ef-5284-4daa-ab32-3e7bee2ec355",
+ "modelVersionId": "e02a7e5c-9d27-4360-ab7c-73bb83b07e3b"
+ }
+ }
+ ]
+ },
+ "serviceInfo": {
+ "serviceInstanceId": "3e8d118c-10ca-4b4b-b3db-089b5e9e6a1c",
+ "serviceName": "vFW_TD",
+ "modelInfo": {
+ "modelInvariantId": "TD-invariantId",
+ "modelVersionId": "TD-versionId"
+ }
+ }
+} \ No newline at end of file
diff --git a/test/placement-tests/response_vfmod.json b/test/placement-tests/response_vfmod.json
new file mode 100644
index 0000000..06e40de
--- /dev/null
+++ b/test/placement-tests/response_vfmod.json
@@ -0,0 +1,229 @@
+{
+ "transactionId": "",
+ "requestStatus": "completed",
+ "solutions": {
+ "placementSolutions": [
+ [{
+ "assignmentInfo": [{
+ "key": "locationType",
+ "value": "att_aic"
+ }, {
+ "key": "vnfHostName",
+ "value": "vFW-FW-MC"
+ }, {
+ "key": "locationId",
+ "value": "RegionOne"
+ }, {
+ "key": "isRehome",
+ "value": "false"
+ }, {
+ "key": "nf-name",
+ "value": "vFW-FW-MC"
+ }, {
+ "key": "vnf-type",
+ "value": "5G_EVE_Demo/5G_EVE_FW 0"
+ }, {
+ "key": "ipv6-oam-address",
+ "value": ""
+ }, {
+ "key": "ipv4-oam-address",
+ "value": "oam_network_zb4J"
+ }, {
+ "key": "vservers",
+ "value": [{
+ "vserver-id": "4a61b075-5ae0-4cfe-b213-27d3647a0578",
+ "l-interfaces": [{
+ "macaddr": "fa:16:3e:4a:00:56",
+ "interface-name": "vnf-snk-r1-t1-mc-vfw_private_3_port-tntiamoj2res",
+ "ipv4-addresses": ["10.100.100.1"],
+ "ipv6-addresses": [],
+ "interface-id": "ff27775b-a2b7-4e6e-8f71-6a5a5e6020cd",
+ "network-name": "",
+ "network-id": "59763a33-3296-4dc8-9ee6-2bdcd63322fc"
+ }, {
+ "macaddr": "fa:16:3e:a1:e8:c9",
+ "interface-name": "vnf-snk-r1-t1-mc-vfw_private_2_port-hiay5zan4da6",
+ "ipv4-addresses": ["10.0.110.1"],
+ "ipv6-addresses": [],
+ "interface-id": "0bb0bb92-a4d1-4104-b491-e469949f60a3",
+ "network-name": "",
+ "network-id": "cdb4bc25-2412-4b77-bbd5-791a02f8776d"
+ }, {
+ "macaddr": "fa:16:3e:45:e2:16",
+ "interface-name": "vnf-snk-r1-t1-mc-vfw_private_0_port-7xlr5kjvsmk6",
+ "ipv4-addresses": ["192.168.10.100"],
+ "ipv6-addresses": [],
+ "interface-id": "f0291365-6070-4baa-8470-8775bed7c2c4",
+ "network-name": "",
+ "network-id": "932ac514-639a-45b2-b1a3-4c5bb708b5c1"
+ }, {
+ "macaddr": "fa:16:3e:2f:0b:2f",
+ "interface-name": "vnf-snk-r1-t1-mc-vfw_private_1_port-khio4swt2vy3",
+ "ipv4-addresses": ["192.168.20.100"],
+ "ipv6-addresses": [],
+ "interface-id": "5ba290b0-0833-4008-acda-be1878b9ae0c",
+ "network-name": "",
+ "network-id": "bd64a2b0-0bdd-45b4-b755-65d5ebe1cee0"
+ }],
+ "vserver-name": "vfw-vfw-1-dt"
+ }, {
+ "vserver-id": "cf51eeab-8f75-4635-a01c-9f4bbd1e146e",
+ "l-interfaces": [{
+ "macaddr": "fa:16:3e:23:82:d7",
+ "interface-name": "vnf-snk-r1-t1-mc-vsn_private_2_port-spbtqjnybz5g",
+ "ipv4-addresses": ["10.100.100.3"],
+ "ipv6-addresses": [],
+ "interface-id": "1b3fd313-cde3-4df6-8ea8-bf4ae28e7e03",
+ "network-name": "",
+ "network-id": "59763a33-3296-4dc8-9ee6-2bdcd63322fc"
+ }, {
+ "macaddr": "fa:16:3e:fc:bd:16",
+ "interface-name": "vnf-snk-r1-t1-mc-vsn_private_1_port-spqyrticfqan",
+ "ipv4-addresses": ["10.0.110.3"],
+ "ipv6-addresses": [],
+ "interface-id": "1b33d675-f351-4766-8669-7314f774d52c",
+ "network-name": "",
+ "network-id": "cdb4bc25-2412-4b77-bbd5-791a02f8776d"
+ }, {
+ "macaddr": "fa:16:3e:3d:e9:c5",
+ "interface-name": "vnf-snk-r1-t1-mc-vsn_private_0_port-5ijwpdueh2fl",
+ "ipv4-addresses": ["192.168.20.250"],
+ "ipv6-addresses": [],
+ "interface-id": "cf82e256-8ccf-4e43-ba96-04ea2e47b5d2",
+ "network-name": "",
+ "network-id": "bd64a2b0-0bdd-45b4-b755-65d5ebe1cee0"
+ }],
+ "vserver-name": "vfw-vsn-1-dt"
+ }]
+ }, {
+ "key": "nf-type",
+ "value": "vnf"
+ }, {
+ "key": "vnfHostName",
+ "value": "vFW-FW-MC"
+ }, {
+ "key": "aic_version",
+ "value": "1"
+ }, {
+ "key": "cloudClli",
+ "value": "clli1"
+ }, {
+ "key": "service_instance_id",
+ "value": "3e8d118c-10ca-4b4b-b3db-089b5e9e6a1c"
+ }, {
+ "key": "cloudOwner",
+ "value": "CloudOwner"
+ }, {
+ "value": "vfw-0-mc",
+ "key": "vf-module-name"
+ }, {
+ "value": "85eec994-b635-42c7-87a1-d39720cad36d",
+ "key": "vf-module-id"
+ }, {
+ "key": "nf-id",
+ "value": "4d2dc294-dbb3-44a2-8422-fa61b30c21a9"
+ }],
+ "serviceResourceId": "vFW-SINK-XX",
+ "solution": {
+ "cloudOwner": "CloudOwner",
+ "identifiers": ["85eec994-b635-42c7-87a1-d39720cad36d"],
+ "identifierType": "vfmodule"
+ },
+ "resourceModuleName": "vFW-SINK"
+ }, {
+ "assignmentInfo": [{
+ "key": "locationType",
+ "value": "att_aic"
+ }, {
+ "key": "vnfHostName",
+ "value": "vFW-PKG-MC"
+ }, {
+ "key": "locationId",
+ "value": "RegionOne"
+ }, {
+ "key": "isRehome",
+ "value": "false"
+ }, {
+ "key": "nf-name",
+ "value": "vFW-PKG-MC"
+ }, {
+ "key": "vnf-type",
+ "value": "5G_EVE_Demo/5G_EVE_PKG 0"
+ }, {
+ "key": "ipv6-oam-address",
+ "value": ""
+ }, {
+ "key": "ipv4-oam-address",
+ "value": "oam_network_zb4J"
+ }, {
+ "key": "vservers",
+ "value": [{
+ "vserver-id": "00bddefc-126e-4e4f-a18d-99b94d8d9a30",
+ "l-interfaces": [{
+ "macaddr": "fa:16:3e:c4:07:7f",
+ "interface-name": "vnf-pkg-r1-t2-mc-vpg_private_2_port-mf7lu55usq7i",
+ "ipv4-addresses": ["10.100.100.2"],
+ "ipv6-addresses": [],
+ "interface-id": "4b333af1-90d6-42ae-8389-d440e6ff0e93",
+ "network-name": "",
+ "network-id": "59763a33-3296-4dc8-9ee6-2bdcd63322fc"
+ }, {
+ "macaddr": "fa:16:3e:b5:86:38",
+ "interface-name": "vnf-pkg-r1-t2-mc-vpg_private_1_port-734xxixicw6r",
+ "ipv4-addresses": ["10.0.110.2"],
+ "ipv6-addresses": [],
+ "interface-id": "85dd57e9-6e3a-48d0-a784-4598d627e798",
+ "network-name": "",
+ "network-id": "cdb4bc25-2412-4b77-bbd5-791a02f8776d"
+ }, {
+ "macaddr": "fa:16:3e:ff:d8:6f",
+ "interface-name": "vnf-pkg-r1-t2-mc-vpg_private_0_port-e5qdm3p5ijhe",
+ "ipv4-addresses": ["192.168.10.200"],
+ "ipv6-addresses": [],
+ "interface-id": "edaff25a-878e-4706-ad52-4e3d51cf6a82",
+ "network-name": "",
+ "network-id": "932ac514-639a-45b2-b1a3-4c5bb708b5c1"
+ }],
+ "vserver-name": "zdfw1fwl01pgn01"
+ }]
+ }, {
+ "key": "nf-type",
+ "value": "vnf"
+ }, {
+ "key": "vnfHostName",
+ "value": "vFW-PKG-MC"
+ }, {
+ "key": "aic_version",
+ "value": "1"
+ }, {
+ "key": "cloudClli",
+ "value": "clli1"
+ }, {
+ "key": "service_instance_id",
+ "value": "3e8d118c-10ca-4b4b-b3db-089b5e9e6a1c"
+ }, {
+ "key": "cloudOwner",
+ "value": "CloudOwner"
+ }, {
+ "value": "pkg-0-mc",
+ "key": "vf-module-name"
+ }, {
+ "value": "d187d743-5932-4fb9-a42d-db0a5be5ba7e",
+ "key": "vf-module-id"
+ }, {
+ "key": "nf-id",
+ "value": "fcbff633-47cc-4f38-a98d-4ba8285bd8b6"
+ }],
+ "serviceResourceId": "vPGN-XX",
+ "solution": {
+ "cloudOwner": "CloudOwner",
+ "identifiers": ["d187d743-5932-4fb9-a42d-db0a5be5ba7e"],
+ "identifierType": "vfmodule"
+ },
+ "resourceModuleName": "vPGN"
+ }]
+ ]
+ },
+ "statusMessage": "",
+ "requestId": "de4f04e3-0a65-470b-9d07-8ea6c2fb3e10"
+} \ No newline at end of file
diff --git a/test/placement-tests/test_by_scope.yaml b/test/placement-tests/test_by_scope.yaml
index 2cdd4e4..1968b89 100644
--- a/test/placement-tests/test_by_scope.yaml
+++ b/test/placement-tests/test_by_scope.yaml
@@ -2,23 +2,32 @@ references:
service_name:
source: request
value: serviceInfo.serviceName
+ resource:
+ source: request
+ value: placementInfo.placementDemands.resourceModuleName
subscriber_role:
- source: SubscriberPolicy
- value: content.properties.subscriberRole
+ source: onap.policies.optimization.SubscriberPolicy
+ value: properties.properties.subscriberRole
policy_info:
placement:
policy_fetch: by_scope
policy_scope:
- default_scope: OSDF_R2
- vcpe_scope: OSDF_R2
- secondary_scopes:
- -
- - get_param: service_name
- - SubscriberPolicy
- -
+ -
+ scope:
+ - OSDF_FRANKFURT
+ - onap.policies.optimization.SubscriberPolicy
+ service:
- get_param: service_name
+ -
+ scope:
+ - OSDF_FRANKFURT
- get_param: subscriber_role
+ service:
+ - get_param: service_name
+ # -
+ # - get_param: service_name
+ # - get_param: subscriber_role
default: # if no explicit service related information is needed
policy_fetch: by_name
- policy_scope: none
+ policy_scope: none \ No newline at end of file
diff --git a/test/placement-tests/test_by_scope_old_format.yaml b/test/placement-tests/test_by_scope_old_format.yaml
new file mode 100644
index 0000000..2cdd4e4
--- /dev/null
+++ b/test/placement-tests/test_by_scope_old_format.yaml
@@ -0,0 +1,24 @@
+references:
+ service_name:
+ source: request
+ value: serviceInfo.serviceName
+ subscriber_role:
+ source: SubscriberPolicy
+ value: content.properties.subscriberRole
+
+policy_info:
+ placement:
+ policy_fetch: by_scope
+ policy_scope:
+ default_scope: OSDF_R2
+ vcpe_scope: OSDF_R2
+ secondary_scopes:
+ -
+ - get_param: service_name
+ - SubscriberPolicy
+ -
+ - get_param: service_name
+ - get_param: subscriber_role
+ default: # if no explicit service related information is needed
+ policy_fetch: by_name
+ policy_scope: none