diff options
Diffstat (limited to 'test/policy-local-files')
67 files changed, 3099 insertions, 269 deletions
diff --git a/test/policy-local-files/Affinity_vCPE_1.json b/test/policy-local-files/Affinity_vCPE_1.json index 6f0ecb3..5364d5d 100644 --- a/test/policy-local-files/Affinity_vCPE_1.json +++ b/test/policy-local-files/Affinity_vCPE_1.json @@ -1,21 +1,33 @@ { - "service": "zone", - "policyName": "OSDF_R2.Affinity_vCPE_1", - "description": "Optimization query policy for vCPE", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "identity": "affinity_vCPE", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "affinityProperty": { - "qualifier": "same", - "category": "complex" - }, - "policyType": "zone", - "resources": ["vGMuxInfra", "vG"] + "OSDF_FRANKFURT.Affinity_vCPE_1": { + "type": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.Affinity_vCPE_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "vCPE" + ], + "resources": [ + "vG", + "vGMuxInfra" + ], + "geography": [ + "US", + "INTERNATIONAL" + ], + "identity": "affinity_vCPE", + "applicableResources": "any", + "affinityProperties": { + "qualifier": "same", + "category": "complex" + } } + } } diff --git a/test/policy-local-files/Affinity_vFW_TD.json b/test/policy-local-files/Affinity_vFW_TD.json new file mode 100644 index 0000000..5df3bf4 --- /dev/null +++ b/test/policy-local-files/Affinity_vFW_TD.json @@ -0,0 +1,31 @@ +{ + "OSDF_FRANKFURT.Affinity_vFW_TD": { + "type": "onap.policies.optimization.resource.AffinityPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.Affinity_vFW_TD", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT", + "TD" + ], + "resources": [ + "vFW-SINK", + "vPGN" + ], + "geography": [ + "US", + "INTERNATIONAL" + ], + "identity": "affinity_vFW_TD", + "applicableResources": "any", + "affinityProperties": { + "qualifier": "same", + "category": "region" + } + } + } +} diff --git a/test/policy-local-files/Attribute_vNS_1.json b/test/policy-local-files/Attribute_vNS_1.json new file mode 100644 index 0000000..97c967c --- /dev/null +++ b/test/policy-local-files/Attribute_vNS_1.json @@ -0,0 +1,51 @@ +{ + "OSDF_FRANKFURT.Attribute_vNS_1": { + "type": "onap.policies.optimization.resource.AttributePolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.Attribute_vNS_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "vNS" + ], + "resources": [ + "vNS" + ], + "geography": [ + "US", + "INTERNATIONAL" + ], + "identity": "attribute-vNS", + "attributeProperties": { + "cloudRegion": { + "serviceRequests": [ + "", + "" + ], + "cloudRequests": [ + "", + "" + ] + }, + "networkRoles": { + "all": [ + "", + "" + ] + }, + "complex": { + "any": [ + "", + "" + ] + } + } + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/Capacity_vGMuxInfra.json b/test/policy-local-files/Capacity_vGMuxInfra.json index 2578544..7ce02bf 100644 --- a/test/policy-local-files/Capacity_vGMuxInfra.json +++ b/test/policy-local-files/Capacity_vGMuxInfra.json @@ -1,22 +1,32 @@ { - "service": "vim_fit", - "policyName": "OSDF_R2.Capacity_vGMuxInfra", - "description": "Capacity policy for vGMuxInfra", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "5", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "identity": "capacity_vGMuxInfra", - "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "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" + "OSDF_FRANKFURT.Capacity_vGMuxInfra": { + "type": "onap.policies.optimization.resource.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\"}}" + } } + } } diff --git a/test/policy-local-files/Capacity_vG_1.json b/test/policy-local-files/Capacity_vG_1.json index c1682fa..c897a87 100644 --- a/test/policy-local-files/Capacity_vG_1.json +++ b/test/policy-local-files/Capacity_vG_1.json @@ -1,22 +1,32 @@ { - "service": "vim_fit", - "policyName": "OSDF_R2.Capacity_vG_1", - "description": "Capacity policy for vG", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "5", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "identity": "capacity_vG", - "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vG"], - "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" + "OSDF_FRANKFURT.Capacity_vG_1": { + "type": "onap.policies.optimization.resource.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\"}}" + } } + } } diff --git a/test/policy-local-files/Distance_vGMuxInfra_1.json b/test/policy-local-files/Distance_vGMuxInfra_1.json index 61ec500..163d0df 100644 --- a/test/policy-local-files/Distance_vGMuxInfra_1.json +++ b/test/policy-local-files/Distance_vGMuxInfra_1.json @@ -1,22 +1,36 @@ { - "service": "distance_to_location", - "policyName": "OSDF_R2.Distance_vGMuxInfra", - "description": "Distance Policy for vGMuxInfra", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "distanceProperties": { - "locationInfo": "customer_location", - "distance": { "value": "500", "operator": "<", "unit": "km" } + "OSDF_FRANKFURT.Distance_vGMuxInfra": { + "type": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra", + "policy-version": 1 }, - "identity": "distance-vGMuxInfra", - "resources": ["vGMuxInfra"], - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "distancePolicy", - "applicableResources": "any" + "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" + } + } + } } } diff --git a/test/policy-local-files/Distance_vG_1.json b/test/policy-local-files/Distance_vG_1.json index 06c3ada..aa6badc 100644 --- a/test/policy-local-files/Distance_vG_1.json +++ b/test/policy-local-files/Distance_vG_1.json @@ -1,22 +1,36 @@ { - "service": "distance_to_location", - "policyName": "OSDF_R2.Distance_vG_1", - "description": "Distance Policy for vG", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "distanceProperties": { - "locationInfo": "customer_location", - "distance": { "value": "1500", "operator": "<", "unit": "km" } + "OSDF_FRANKFURT.Distance_vG_1": { + "type": "onap.policies.optimization.resource.DistancePolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.Distance_vG_1", + "policy-version": 1 }, - "identity": "distance-vG", - "resources": ["vG"], - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "distancePolicy", - "applicableResources": "any" + "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" + } + } + } } } diff --git a/test/policy-local-files/Placement_Optimization_1.json b/test/policy-local-files/Placement_Optimization_1.json index ab3c586..62b024c 100644 --- a/test/policy-local-files/Placement_Optimization_1.json +++ b/test/policy-local-files/Placement_Optimization_1.json @@ -1,15 +1,30 @@ { - "service": "placementOptimization", - "policyName": "OSDF_R2.Placement_Optimization_1", - "description": "Placement Optimization Policy for vGMuxInfra", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "5", - "riskType": "test", - "riskLevel": "3", - "guard": "False", - "content": { - "objectiveParameter": { + "OSDF_FRANKFURT.Placement_optimization_1": { + "type": "onap.policies.optimization.resource.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"], @@ -30,13 +45,23 @@ "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" - }, - "identity": "optimization", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "policyType": "placementOptimization", - "objective": "minimize" + } } + } } diff --git a/test/policy-local-files/QueryPolicy_vCPE.json b/test/policy-local-files/QueryPolicy_vCPE.json index 27f49d2..3bcc67e 100644 --- a/test/policy-local-files/QueryPolicy_vCPE.json +++ b/test/policy-local-files/QueryPolicy_vCPE.json @@ -1,21 +1,38 @@ { - "service": "optimizationQueryPolicy", - "policyName": "OSDF_R2.QueryPolicy_vCPE", - "description": "Optimization query policy for vCPE", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "queryProperties": [ - {"attribute":"customerLatitude", "attribute_location": "customerLatitude"}, - {"attribute":"customerLongitude", "attribute_location": "customerLongitude"} - ], - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "policyType": "optimizationQueryPolicy", - "serviceName": "vCPE", - "identity": "vCPE_Query_Policy" + "OSDF_FRANKFURT.queryPolicy_vCPE": { + "type": "onap.policies.optimization.service.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" + } + ] + } } } diff --git a/test/policy-local-files/QueryPolicy_vCPE_2.json b/test/policy-local-files/QueryPolicy_vCPE_2.json index 7f1db83..3d9f4ca 100644 --- a/test/policy-local-files/QueryPolicy_vCPE_2.json +++ b/test/policy-local-files/QueryPolicy_vCPE_2.json @@ -1,23 +1,55 @@ { - "service": "optimizationQueryPolicy", - "policyName": "oofBeijing.queryPolicy_vCPE", - "description": "Optimization query policy for vCPE", - "templateVersion": "0.0.1", - "version": "oofBeijing", - "priority": "5", - "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": 1.1}, - {"attribute":"customerLongitude", "attribute_location": "customerLongitude", "value": 2.2} - ], - "serviceName": "vCPE", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG", "optimizationQueryPolicy"], - "policyType": "optimizationQueryPolicy" + "OSDF_FRANKFURT.queryPolicy_vCPE": { + "type": "onap.policies.optimization.service.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": "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": 1.1 + }, + { + "attribute": "customerLongitude", + "attribute_location": "customerLongitude", + "value": 2.2 + } + ] + } } } diff --git a/test/policy-local-files/QueryPolicy_vFW_TD.json b/test/policy-local-files/QueryPolicy_vFW_TD.json new file mode 100644 index 0000000..ab199ac --- /dev/null +++ b/test/policy-local-files/QueryPolicy_vFW_TD.json @@ -0,0 +1,47 @@ +{ + "OSDF_FRANKFURT.queryPolicy_vFW_TD": { + "type": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.queryPolicy_vFW_TD", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "vFW_TD" + ], + "resources": [ + "vFW-SINK", + "vPGN" + ], + "geography": [ + "US" + ], + "identity": "vFW_TD_Query_Policy", + "queryProperties": [ + { + "attribute": "chosen_region", + "attribute_location": "chosenRegion" + }, + { + "attribute": "chosen_customer_id", + "attribute_location": "chosenCustomerId" + }, + { + "attribute": "customerLatitude", + "attribute_location": "customerLatitude", + "value": 1.1 + }, + { + "attribute": "customerLongitude", + "attribute_location": "customerLongitude", + "value": 2.2 + } + ] + } + } +} diff --git a/test/policy-local-files/aggregationPolicy_URLLC_1.json b/test/policy-local-files/aggregationPolicy_URLLC_1.json new file mode 100644 index 0000000..13014c1 --- /dev/null +++ b/test/policy-local-files/aggregationPolicy_URLLC_1.json @@ -0,0 +1,37 @@ +{ + "OSDF_FRANKFURT.Aggregation_URLLC_1":{ + "type":"onap.policies.optimization.resource.AggregationPolicy", + "version":"1.0.0", + "type_version":"1.0.0", + "metadata":{ + "policy-id":"OSDF_FRANKFURT.Aggregation_URLLC_1", + "policy-version":1 + }, + "properties":{ + "scope":[ + "OSDF_FRANKFURT", + "URLLC_1" + ], + "geography": [], + "resources":[ + "URLLC_Core_1" + ], + "services":[ + "URLLC_1" + ], + "identity":"Aggregation_URLLC_1", + "applicableResources":"any", + "aggregationProperties":[ + { + "attribute":"latency", + "function":"sum", + "operator":"lte", + "threshold":{ + "get_param": "latency" + }, + "unit":"ms" + } + ] + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/hpa_policy_vGMuxInfra_1.json b/test/policy-local-files/hpa_policy_vGMuxInfra_1.json index ce0b7e3..b6317f8 100644 --- a/test/policy-local-files/hpa_policy_vGMuxInfra_1.json +++ b/test/policy-local-files/hpa_policy_vGMuxInfra_1.json @@ -1,18 +1,27 @@ { - "service": "hpaPolicy", - "policyName": "OSDF_R2.hpa_policy_vGMuxInfra_1", - "description": "HPA policy for vGMuxInfra", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "resources": "vGMuxInfra", - "identity": "hpaPolicy_vGMuxInfra", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "hpaPolicy", + "OSDF_FRANKFURT.hpa_policy_vGMuxInfra_1": { + "type": "onap.policies.optimization.resource.HpaPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.hpa_policy_vGMuxInfra_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "vCPE" + ], + "resources": [ + "vGMuxInfra" + ], + "geography": [ + "US", + "INTERNATIONAL" + ], + "identity": "hpa-vGMuxInfra", "flavorFeatures": [ { "id": "vgmux_1", @@ -28,8 +37,8 @@ ] } ], - "flavorProperties":[ - { + "flavorProperties": [ + { "hpa-feature" : "cpuTopology", "mandatory" : "True", "architecture": "generic", @@ -43,33 +52,64 @@ {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""} ] }, - { - "hpa-feature" : "basicCapabilities", - "mandatory" : "True", + { + "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-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", + "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-attribute-key": "dataProcessingAccelerationLibrary", + "hpa-attribute-value": "ovsDpdk_version", + "operator": [ + "=" + ], + "unit": "" + } ] }, { - "hpa-feature" : "cpuInstructionSetExtensions", - "mandatory" : "True", + "hpa-feature": "cpuInstructionSetExtensions", + "mandatory": true, "architecture": "INTEL-64", "directives": [], "hpa-feature-attributes": [ - {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""} + { + "hpa-attribute-key": "instructionSetExtensions", + "hpa-attribute-value": [ + "<CPUINST>", + "<CPUINST>" + ], + "operator": [ + "ALL" + ], + "unit": "" + } ] } ] @@ -99,7 +139,7 @@ {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""} ] }, - { + { "hpa-feature" : "basicCapabilities", "mandatory" : "True", "architecture": "generic", @@ -122,18 +162,17 @@ ] }, { - "hpa-feature" : "pcie", + "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": ""}, - {"hpa-attribute-key": "functionType", "hpa-attribute-value": "<PCITYPEVALUE>","operator": "=", "unit": ""} + {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""} ] } - ] +] }, { "id": "vgmux_3", @@ -163,7 +202,7 @@ {"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", @@ -188,4 +227,5 @@ } ] } + } } diff --git a/test/policy-local-files/hpa_policy_vG_1.json b/test/policy-local-files/hpa_policy_vG_1.json index 5d2499f..59ba4b1 100644 --- a/test/policy-local-files/hpa_policy_vG_1.json +++ b/test/policy-local-files/hpa_policy_vG_1.json @@ -1,18 +1,27 @@ { - "service": "hpaPolicy", - "policyName": "OSDF_R2.hpa_policy_vG_1", - "description": "HPA policy for vG", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "3", - "riskType": "test", - "riskLevel": "2", - "guard": "False", - "content": { - "resources": "vG", - "identity": "hpaPolicy_vG", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "hpaPolicy", + "OSDF_FRANKFURT.hpa_policy_vG_1": { + "type": "onap.policies.optimization.resource.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", @@ -28,8 +37,8 @@ ] } ], - "flavorProperties":[ - { + "flavorProperties": [ + { "hpa-feature" : "cpuTopology", "mandatory" : "True", "architecture": "generic", @@ -43,33 +52,64 @@ {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""} ] }, - { - "hpa-feature" : "basicCapabilities", - "mandatory" : "True", + { + "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-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", + "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-attribute-key": "dataProcessingAccelerationLibrary", + "hpa-attribute-value": "ovsDpdk_version", + "operator": [ + "=" + ], + "unit": "" + } ] }, { - "hpa-feature" : "cpuInstructionSetExtensions", - "mandatory" : "True", + "hpa-feature": "cpuInstructionSetExtensions", + "mandatory": true, "architecture": "INTEL-64", "directives": [], "hpa-feature-attributes": [ - {"hpa-attribute-key":"instructionSetExtensions", "hpa-attribute-value":["<CPUINST>", "<CPUINST>"], "operator": "ALL", "unit":""} + { + "hpa-attribute-key": "instructionSetExtensions", + "hpa-attribute-value": [ + "<CPUINST>", + "<CPUINST>" + ], + "operator": [ + "ALL" + ], + "unit": "" + } ] } ] @@ -99,7 +139,7 @@ {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "<CPUPOLICY>","operator": "=", "unit":""} ] }, - { + { "hpa-feature" : "basicCapabilities", "mandatory" : "True", "architecture": "generic", @@ -132,7 +172,7 @@ {"hpa-attribute-key": "pciDeviceId", "hpa-attribute-value": "2", "operator": "=", "unit": ""} ] } - ] +] }, { "id": "vg_3", @@ -162,7 +202,7 @@ {"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", @@ -187,4 +227,5 @@ } ] } + } } diff --git a/test/policy-local-files/meta-valid-policies-old.txt b/test/policy-local-files/meta-valid-policies-old.txt new file mode 100644 index 0000000..99e3e88 --- /dev/null +++ b/test/policy-local-files/meta-valid-policies-old.txt @@ -0,0 +1,16 @@ +Affinity_vCPE_1.json +Capacity_vGMuxInfra.json +Capacity_vG_1.json +Distance_vGMuxInfra_1.json +Distance_vG_1.json +Placement_Optimization_1.json +QueryPolicy_vCPE.json +QueryPolicy_vCPE_2.json +hpa_policy_vGMuxInfra_1.json +hpa_policy_vG_1.json +vnfPolicy_vG.json +vnfPolicy_vGMuxInfra.json +QueryPolicy_vFW_TD.json +vnfPolicy_vFW_TD.json +vnfPolicy_vPGN_TD.json +affinity_vFW_TD.json
\ No newline at end of file diff --git a/test/policy-local-files/meta-valid-policies.txt b/test/policy-local-files/meta-valid-policies.txt index 772ec1a..5f969bf 100644 --- a/test/policy-local-files/meta-valid-policies.txt +++ b/test/policy-local-files/meta-valid-policies.txt @@ -10,3 +10,8 @@ hpa_policy_vGMuxInfra_1.json hpa_policy_vG_1.json vnfPolicy_vG.json vnfPolicy_vGMuxInfra.json +QueryPolicy_vFW_TD.json +vnfPolicy_vFW_TD.json +vnfPolicy_vPGN_TD.json +Affinity_vFW_TD.json +Attribute_vNS_1.json
\ No newline at end of file diff --git a/test/policy-local-files/nst-selection-files/attribute_policy_nst.json b/test/policy-local-files/nst-selection-files/attribute_policy_nst.json new file mode 100644 index 0000000..0989927 --- /dev/null +++ b/test/policy-local-files/nst-selection-files/attribute_policy_nst.json @@ -0,0 +1,42 @@ +{ + "Threshold_nst": { + "metadata": { + "policy-id": "Threshold_nst", + "policy-version": 1 + }, + "properties": { + "geography": [], + "identity": "nst_Threshold", + "resources": [ + "nst" + ], + "scope": [ + "OSDF_GUILIN" + ], + "services": [ + "nst" + ], + "thresholdProperties": [ + { + "attribute": "latency", + "operator": "lte", + "threshold": { + "get_param": "latency" + }, + "unit": "ms" + }, + { + "attribute": "reliability", + "operator": "gte", + "threshold": { + "get_param": "reliability" + }, + "unit": "" + } + ] + }, + "type": "onap.policies.optimization.resource.ThresholdPolicy", + "type_version": "1.0.0", + "version": "1.0.0" + } +}
\ No newline at end of file diff --git a/test/policy-local-files/nst-selection-files/optimization_policy_nst.json b/test/policy-local-files/nst-selection-files/optimization_policy_nst.json new file mode 100644 index 0000000..27c1f7c --- /dev/null +++ b/test/policy-local-files/nst-selection-files/optimization_policy_nst.json @@ -0,0 +1,37 @@ +{ + "nst_minimize_latency": { + "metadata": { + "policy-id": "nst_minimize_latency", + "policy-version": 1 + }, + "properties": { + "geography": [], + "identity": "optimization", + "goal": "minimize", + "operation_function": { + "operator": "sum", + "operands": [ + { + "function": "attribute", + "params": { + "attribute": "latency", + "demand": "nst" + } + } + ] + }, + "resources": [ + "nst" + ], + "scope": [ + "OSDF_GUILIN" + ], + "services": [ + "nst" + ] + }, + "type": "onap.policies.optimization.resource.OptimizationPolicy", + "type_version": "2.0.0", + "version": "1.0.0" + } +}
\ No newline at end of file diff --git a/test/policy-local-files/nst-selection-files/query_policy_nst.json b/test/policy-local-files/nst-selection-files/query_policy_nst.json new file mode 100644 index 0000000..1955e7b --- /dev/null +++ b/test/policy-local-files/nst-selection-files/query_policy_nst.json @@ -0,0 +1,31 @@ +{ + "queryPolicy_nst": { + "type": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "queryPolicy_nst", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_GUILIN" + ], + "services": [ + "nst" + ], + "geography": [], + "identity": "queryPolicy_nst", + "queryProperties": [ + { + "attribute": "latency", + "attribute_location": "latency" + }, + { + "attribute": "reliability", + "attribute_location": "reliability" + } + ] + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/nst-selection-files/vnf_policy_nst.json b/test/policy-local-files/nst-selection-files/vnf_policy_nst.json new file mode 100644 index 0000000..14906df --- /dev/null +++ b/test/policy-local-files/nst-selection-files/vnf_policy_nst.json @@ -0,0 +1,34 @@ +{ + "vnfPolicy_nst": { + "type": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "vnfPolicy_nst", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_GUILIN" + ], + "resources": [ + "nst" + ], + "services": [ + "nst" + ], + "identity": "vnf_nst", + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "inventoryType": "nst", + "unique": "true", + "attributes": { + "model-role": "nst" + } + } + ] + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/old-policies/Affinity_vCPE_1.json b/test/policy-local-files/old-policies/Affinity_vCPE_1.json new file mode 100644 index 0000000..2953589 --- /dev/null +++ b/test/policy-local-files/old-policies/Affinity_vCPE_1.json @@ -0,0 +1,21 @@ +{ + "service": "affinityPolicy", + "policyName": "OSDF_DUBLIN.Affinity_vCPE_1", + "description": "Zone policy for vCPE", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "identity": "affinity_vCPE", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], + "affinityProperty": { + "qualifier": "same", + "category": "complex" + }, + "policyType": "zone", + "resources": ["vGMuxInfra", "vG"] + } +} diff --git a/test/policy-local-files/old-policies/Attribute_vNS_1.json b/test/policy-local-files/old-policies/Attribute_vNS_1.json new file mode 100644 index 0000000..e4766db --- /dev/null +++ b/test/policy-local-files/old-policies/Attribute_vNS_1.json @@ -0,0 +1,49 @@ +{ + "service": "attributePolicy", + "policyName": "OSDF_FRANKFURT.AttributePolicy_vNS_1", + "description": "Attribute Policy for Network Slicing (NS)", + "templateVersion": "OpenSource.version.1", + "version": "OpenSource.version.1", + "priority": "1", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "attribute-vNS", + "policyScope": [ + "vNS", + "us", + "international", + "ip" + ], + "policyType": "attribute", + "resources": [ + "vNS", + "" + ], + "attributeProperties": { + "cloudRegion": { + "serviceRequests": [ + "", + "" + ], + "cloudRequests": [ + "", + "" + ] + }, + "networkRoles": { + "all": [ + "", + "" + ] + }, + "complex": { + "any": [ + "", + "" + ] + } + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/old-policies/Capacity_vFW_1.json b/test/policy-local-files/old-policies/Capacity_vFW_1.json new file mode 100644 index 0000000..d5e80ab --- /dev/null +++ b/test/policy-local-files/old-policies/Capacity_vFW_1.json @@ -0,0 +1,22 @@ +{ + "service": "vim_fit", + "policyName": "OSDF_DUBLIN.Capacity_vFW_1", + "description": "Capacity policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "5", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "identity": "capacity_vFW", + "policyScope": ["vFW", "US", "INTERNATIONAL", "ip", "vFW"], + "resources": ["vFW"], + "capacityProperty": { + "controller": "multicloud", + "request": "{\"vCPU\": 2, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}" + }, + "policyType": "vim_fit", + "applicableResources": "any" + } +} diff --git a/test/policy-local-files/old-policies/Capacity_vGMuxInfra.json b/test/policy-local-files/old-policies/Capacity_vGMuxInfra.json new file mode 100644 index 0000000..010cf3f --- /dev/null +++ b/test/policy-local-files/old-policies/Capacity_vGMuxInfra.json @@ -0,0 +1,22 @@ +{ + "service": "vim_fit", + "policyName": "OSDF_DUBLIN.Capacity_vGMuxInfra", + "description": "Capacity policy for vGMuxInfra", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "5", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "identity": "capacity_vGMuxInfra", + "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], + "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" + } +} diff --git a/test/policy-local-files/old-policies/Capacity_vG_1.json b/test/policy-local-files/old-policies/Capacity_vG_1.json new file mode 100644 index 0000000..fedcc4f --- /dev/null +++ b/test/policy-local-files/old-policies/Capacity_vG_1.json @@ -0,0 +1,22 @@ +{ + "service": "vim_fit", + "policyName": "OSDF_DUBLIN.Capacity_vG_1", + "description": "Capacity policy for vG", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "5", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "identity": "capacity_vG", + "policyScope": ["VCPE", "US", "INTERNATIONAL", "ip", "vG"], + "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" + } +} diff --git a/test/policy-local-files/old-policies/Distance_vFW_1.json b/test/policy-local-files/old-policies/Distance_vFW_1.json new file mode 100644 index 0000000..80e08d9 --- /dev/null +++ b/test/policy-local-files/old-policies/Distance_vFW_1.json @@ -0,0 +1,22 @@ +{ + "service": "distancePolicy", + "policyName": "OSDF_DUBLIN.Distance_vFW_1", + "description": "Distance Policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "distanceProperties": { + "locationInfo": "customer_loc", + "distance": { "value": "100", "operator": "<", "unit": "km" } + }, + "identity": "distance-vFW", + "resources": ["vFW"], + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "distance_to_location", + "applicableResources": "any" + } +} diff --git a/test/policy-local-files/old-policies/Distance_vGMuxInfra_1.json b/test/policy-local-files/old-policies/Distance_vGMuxInfra_1.json new file mode 100644 index 0000000..e3ba83c --- /dev/null +++ b/test/policy-local-files/old-policies/Distance_vGMuxInfra_1.json @@ -0,0 +1,22 @@ +{ + "service": "distancePolicy", + "policyName": "OSDF_DUBLIN.Distance_vGMuxInfra", + "description": "Distance Policy for vGMuxInfra", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "distanceProperties": { + "locationInfo": "customer_loc", + "distance": { "value": "500", "operator": "<", "unit": "km" } + }, + "identity": "distance-vGMuxInfra", + "resources": ["vGMuxInfra"], + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], + "policyType": "distance_to_location", + "applicableResources": "any" + } +} diff --git a/test/policy-local-files/old-policies/Distance_vG_1.json b/test/policy-local-files/old-policies/Distance_vG_1.json new file mode 100644 index 0000000..c498c7a --- /dev/null +++ b/test/policy-local-files/old-policies/Distance_vG_1.json @@ -0,0 +1,22 @@ +{ + "service": "distancePolicy", + "policyName": "OSDF_DUBLIN.Distance_vG_1", + "description": "Distance Policy for vG", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "distanceProperties": { + "locationInfo": "customer_loc", + "distance": { "value": "1500", "operator": "<", "unit": "km" } + }, + "identity": "distance-vG", + "resources": ["vG"], + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], + "policyType": "distance_to_location", + "applicableResources": "any" + } +} diff --git a/test/policy-local-files/old-policies/Placement_Optimization_1.json b/test/policy-local-files/old-policies/Placement_Optimization_1.json new file mode 100644 index 0000000..9b062b0 --- /dev/null +++ b/test/policy-local-files/old-policies/Placement_Optimization_1.json @@ -0,0 +1,55 @@ +{ + "service": "optimizationPolicy", + "policyName": "OSDF_DUBLIN.Placement_Optimization_1", + "description": "Placement Optimization Policy for vGMuxInfra", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "5", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "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" + }, + "identity": "optimization", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], + "policyType": "placement_optimization", + "objective": "minimize" + } +} diff --git a/test/policy-local-files/old-policies/QueryPolicy_vCPE.json b/test/policy-local-files/old-policies/QueryPolicy_vCPE.json new file mode 100644 index 0000000..5097964 --- /dev/null +++ b/test/policy-local-files/old-policies/QueryPolicy_vCPE.json @@ -0,0 +1,21 @@ +{ + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.QueryPolicy_vCPE", + "description": "Query policy for vCPE", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "queryProperties": [ + {"attribute":"customerLatitude", "attribute_location": "customerLatitude"}, + {"attribute":"customerLongitude", "attribute_location": "customerLongitude"} + ], + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], + "policyType": "request_param_query", + "serviceName": "vCPE", + "identity": "vCPE_Query_Policy" + } +} diff --git a/test/policy-local-files/old-policies/QueryPolicy_vCPE_2.json b/test/policy-local-files/old-policies/QueryPolicy_vCPE_2.json new file mode 100644 index 0000000..e398f39 --- /dev/null +++ b/test/policy-local-files/old-policies/QueryPolicy_vCPE_2.json @@ -0,0 +1,24 @@ +{ + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.queryPolicy_vCPE", + "description": "Query policy for vCPE", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "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": 1.1}, + {"attribute":"customerLongitude", "attribute_location": "customerLongitude", "value": 2.2} + ], + "serviceName": "vCPE", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], + "policyType": "request_param_query", + "identity": "vCPE_Query_Policy" + } +} diff --git a/test/policy-local-files/old-policies/QueryPolicy_vFW.json b/test/policy-local-files/old-policies/QueryPolicy_vFW.json new file mode 100644 index 0000000..932074b --- /dev/null +++ b/test/policy-local-files/old-policies/QueryPolicy_vFW.json @@ -0,0 +1,21 @@ +{ + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.QueryPolicy_vFW", + "description": "Query policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "queryProperties": [ + {"attribute":"customerLatitude", "attribute_location": "customerLatitude"}, + {"attribute":"customerLongitude", "attribute_location": "customerLongitude"} + ], + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "request_param_query", + "serviceName": "vFW", + "identity": "vFW_Query_Policy" + } +} diff --git a/test/policy-local-files/old-policies/QueryPolicy_vFW_TD.json b/test/policy-local-files/old-policies/QueryPolicy_vFW_TD.json new file mode 100644 index 0000000..8866635 --- /dev/null +++ b/test/policy-local-files/old-policies/QueryPolicy_vFW_TD.json @@ -0,0 +1,32 @@ +{ + "service": "queryPolicy", + "policyName": "OSDF_DUBLIN.QueryPolicy_vFW_TD", + "description": "Query policy for vFW TD", + "templateVersion": "OpenSource.version.1", + "version": "oofDublin", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "queryProperties": [ + {"attribute":"customerLatitude", "attribute_location": "customerLatitude", "value": 1.1}, + {"attribute":"customerLongitude", "attribute_location": "customerLongitude", "value": 2.2}, + {"attribute":"chosen_region", "attribute_location": "chosenRegion"}, + {"attribute":"chosen_customer_id", "attribute_location": "chosenCustomerId"} + ], + "policyScope": [ + "td", + "us", + "vFW-SINK", + "vPGN" + ], + "policyType": "request_param_query", + "serviceName": "vFW_TD", + "identity": "vFW_TD_Query_Policy", + "resources": [ + "vFW-SINK", + "vPGN" + ] + } +} diff --git a/test/policy-local-files/old-policies/affinity_vFW_TD.json b/test/policy-local-files/old-policies/affinity_vFW_TD.json new file mode 100644 index 0000000..2df2d50 --- /dev/null +++ b/test/policy-local-files/old-policies/affinity_vFW_TD.json @@ -0,0 +1,29 @@ +{ + "service": "affinityPolicy", + "policyName": "OSDF_DUBLIN.Affinity_vFW_TD", + "description": "Affinity policy for vPGN Anchor and vFW destination point", + "templateVersion": "OpenSource.version.1", + "version": "oofDublin", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "identity": "affinity_vFW_TD", + "policyScope": [ + "td", + "us", + "vFW-SINK", + "vPGN" + ], + "affinityProperty": { + "qualifier": "same", + "category": "region" + }, + "policyType": "zone", + "resources": [ + "vFW-SINK", + "vPGN" + ] + } +}
\ No newline at end of file diff --git a/test/policy-local-files/old-policies/hpa_policy_vFW_1.json b/test/policy-local-files/old-policies/hpa_policy_vFW_1.json new file mode 100644 index 0000000..a60ad47 --- /dev/null +++ b/test/policy-local-files/old-policies/hpa_policy_vFW_1.json @@ -0,0 +1,214 @@ +{ + "service": "hpaPolicy", + "policyName": "OSDF_DUBLIN.hpa_policy_vFW_1", + "description": "HPA policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "resources": ["vFW"], + "identity": "hpa-vFW", + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "hpa", + "flavorFeatures": [ + { + "flavorProperties": [ + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "", + "operator": ">=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numVirtualCpu" + }, + { + "unit": "MB", + "operator": ">=", + "hpa-attribute-value": "8", + "hpa-attribute-key": "virtualMemSize" + } + ], + "hpa-feature": "basicCapabilities", + "mandatory": "True" + }, + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaNodes" + }, + { + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaCpu-0" + }, + { + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numaCpu-1" + }, + { + "unit": "GB", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaMem-0" + }, + { + "unit": "GB", + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numaMem-1" + } + ], + "hpa-feature": "numa", + "mandatory": "True" + }, + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "MB", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "memoryPageSize" + }, + { + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numberOfPages" + } + ], + "hpa-feature": "hugePages", + "mandatory": "True" + }, + { + "architecture": "Intel64", + "hpa-feature": "sriovNICNetwork", + "hpa-version": "v1", + "directives": [ + { + "type": "sriovNICNetwork_directives", + "attributes": [ + { + "attribute_name": "oof_returned_vnic_type_for_firewall_protected", + "attribute_value": "direct" + } + ] + } + ], + "hpa-feature-attributes": [ + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "1", + "hpa-attribute-key": "pciCount" + }, + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "1234", + "hpa-attribute-key": "pciVendorId" + }, + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "7890", + "hpa-attribute-key": "pciDeviceId" + } + ], + "score": "100", + "mandatory": "False" + } + ], + "type": "vnfc", + "id": "vfw_1", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_1", + "attribute_value": "" + } + ] + } + ] + }, + { + "flavorProperties": [ + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "operator": ">=", + "hpa-attribute-value": "1", + "hpa-attribute-key": "numVirtualCpu" + }, + { + "unit": "GB", + "operator": ">=", + "hpa-attribute-value": "7", + "hpa-attribute-key": "virtualMemSize" + } + ], + "hpa-feature": "basicCapabilities", + "mandatory": "True" + } + ], + "type": "vnfc", + "id": "vfw_2", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_2", + "attribute_value": "" + } + ] + } + ] + }, + { + "id": "vfw_3", + "type": "vnfc", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_3", + "attribute_value": "" + } + ] + } + ], + "flavorProperties": [ + { + "hpa-feature": "basicCapabilities", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "True", + "directives": [], + "hpa-feature-attributes": [] + } + ] + } + ] + } +} diff --git a/test/policy-local-files/old-policies/hpa_policy_vGMuxInfra_1.json b/test/policy-local-files/old-policies/hpa_policy_vGMuxInfra_1.json new file mode 100644 index 0000000..690f5dc --- /dev/null +++ b/test/policy-local-files/old-policies/hpa_policy_vGMuxInfra_1.json @@ -0,0 +1,191 @@ +{ + "service": "hpaPolicy", + "policyName": "OSDF_DUBLIN.hpa_policy_vGMuxInfra_1", + "description": "HPA policy for vGMuxInfra", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "resources": ["vGMuxInfra"], + "identity": "hpa-vGMuxInfra", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], + "policyType": "hpa", + "flavorFeatures": [ + { + "id": "vgmux_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": "GB"} + ] + }, + { + "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": "vgmux_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" : "pcie", + "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": ""}, + {"hpa-attribute-key": "functionType", "hpa-attribute-value": "<PCITYPEVALUE>","operator": "=", "unit": ""} + ] + } + ] + }, + { + "id": "vgmux_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": ""} + ] + } + ] + } + ] + } +} diff --git a/test/policy-local-files/old-policies/hpa_policy_vG_1.json b/test/policy-local-files/old-policies/hpa_policy_vG_1.json new file mode 100644 index 0000000..b29c67d --- /dev/null +++ b/test/policy-local-files/old-policies/hpa_policy_vG_1.json @@ -0,0 +1,190 @@ +{ + "service": "hpaPolicy", + "policyName": "OSDF_DUBLIN.hpa_policy_vG_1", + "description": "HPA policy for vG", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "resources": ["vG"], + "identity": "hpa-vG", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], + "policyType": "hpa", + "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": "GB"} + ] + }, + { + "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": ""} + ] + } + ] + } + ] + } +} diff --git a/test/policy-local-files/subscriber_policy.json b/test/policy-local-files/old-policies/subscriber_policy_vCPE.json index f1b818c..9359c20 100644 --- a/test/policy-local-files/subscriber_policy.json +++ b/test/policy-local-files/old-policies/subscriber_policy_vCPE.json @@ -1,15 +1,15 @@ { - "service": "SubscriberPolicy", - "policyName": "oofBeijing.SubscriberPolicy_v1", - "description": "Subscriber Policy", - "templateVersion": "0.0.1", - "version": "oofBeijing", + "service": "subscriberPolicy", + "policyName": "OSDF_DUBLIN.SubscriberPolicy_v1", + "description": "Subscriber Policy for vCPE", + "templateVersion": "OpenSource.version.1", + "version": "test1", "priority": "1", "riskType": "test", "riskLevel": "3", "guard": "False", "content": { - "identity": "subscriber", + "identity": "subscriber_vCPE", "policyScope": ["vCPE", "subscriber_x", "subscriber_y", "subscriberPolicy"], "properties": { "subscriberName": ["subscriber_x", "subscriber_y"], @@ -19,4 +19,4 @@ "policyType": "subscriberPolicy", "serviceName": "vCPE" } -}
\ No newline at end of file +} diff --git a/test/policy-local-files/old-policies/subscriber_policy_vFW.json b/test/policy-local-files/old-policies/subscriber_policy_vFW.json new file mode 100644 index 0000000..299da04 --- /dev/null +++ b/test/policy-local-files/old-policies/subscriber_policy_vFW.json @@ -0,0 +1,22 @@ +{ + "service": "subscriberPolicy", + "policyName": "OSDF_DUBLIN.SubscriberPolicy_v1", + "description": "Subscriber Policy for VFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "1", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "subscriber_vFW", + "policyScope": ["vFW", "subscriber_x", "subscriber_y", "subscriberPolicy"], + "properties": { + "subscriberName": ["subscriber_x", "subscriber_y"], + "subscriberRole": ["PVT Homing"], + "provStatus": ["CAPPED"] + }, + "policyType": "subscriberPolicy", + "serviceName": "vFW" + } +} diff --git a/test/policy-local-files/old-policies/vnfPolicy_vFW.json b/test/policy-local-files/old-policies/vnfPolicy_vFW.json new file mode 100644 index 0000000..0b7d9a2 --- /dev/null +++ b/test/policy-local-files/old-policies/vnfPolicy_vFW.json @@ -0,0 +1,29 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_DUBLIN.vnfPolicy_vFW", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vFW", + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "vnfPolicy", + "resources": ["vFW"], + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "cloud", + "customerId": "", + "orchestrationStatus": "", + "equipmentRole": "" + + } + ] + } +} diff --git a/test/policy-local-files/old-policies/vnfPolicy_vFW_TD.json b/test/policy-local-files/old-policies/vnfPolicy_vFW_TD.json new file mode 100644 index 0000000..a471a77 --- /dev/null +++ b/test/policy-local-files/old-policies/vnfPolicy_vFW_TD.json @@ -0,0 +1,44 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_DUBLIN.vnfPolicy_vFW_TD", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "oofDublin", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vFW_TD", + "policyScope": [ + "td", + "us", + "vFW-SINK" + ], + "policyType": "vnfPolicy", + "resources": ["vFW-SINK"], + "applicableResources": "any", + "vnfProperties": [{ + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "vfmodule", + "customerId": { + "get_param": "chosen_customer_id" + }, + "equipmentRole": "", + "attributes": { + "orchestrationStatus": ["active"], + "provStatus": "ACTIVE", + "cloudRegionId": { + "get_param": "chosen_region" + }, + "service_instance_id": { + "get_param": "service_id" + } + }, + "passthroughAttributes": { + "td-role": "destination" + } + }] + } +} diff --git a/test/policy-local-files/old-policies/vnfPolicy_vG.json b/test/policy-local-files/old-policies/vnfPolicy_vG.json new file mode 100644 index 0000000..b047686 --- /dev/null +++ b/test/policy-local-files/old-policies/vnfPolicy_vG.json @@ -0,0 +1,29 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_DUBLIN.vnfPolicy_vG", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vG", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], + "policyType": "vnfPolicy", + "resources": ["vG"], + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "cloud", + "customerId": "", + "orchestrationStatus": "", + "equipmentRole": "" + + } + ] + } +} diff --git a/test/policy-local-files/old-policies/vnfPolicy_vGMuxInfra.json b/test/policy-local-files/old-policies/vnfPolicy_vGMuxInfra.json new file mode 100644 index 0000000..45d67f6 --- /dev/null +++ b/test/policy-local-files/old-policies/vnfPolicy_vGMuxInfra.json @@ -0,0 +1,28 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_DUBLIN.vnfPolicy_vGMuxInfra", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vGMuxInfra", + "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], + "policyType": "vnfPolicy", + "resources": ["vGMuxInfra"], + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "vGMuxInfra-xx", + "inventoryType": "service", + "customerId": "SDN-ETHERNET-INTERNET", + "orchestrationStatus": "", + "equipmentRole": "" + } + ] + } +} diff --git a/test/policy-local-files/old-policies/vnfPolicy_vPGN_TD.json b/test/policy-local-files/old-policies/vnfPolicy_vPGN_TD.json new file mode 100644 index 0000000..2e79f2f --- /dev/null +++ b/test/policy-local-files/old-policies/vnfPolicy_vPGN_TD.json @@ -0,0 +1,51 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_DUBLIN.vnfPolicy_vPGN_TD", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "oofDublin", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vPGN_TD", + "policyScope": [ + "td", + "us", + "vPGN" + ], + "policyType": "vnfPolicy", + "resources": [ + "vPGN" + ], + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "vfmodule", + "customerId": { + "get_param": "chosen_customer_id" + }, + "equipmentRole": "", + "unique": "False", + "attributes": { + "orchestrationStatus": [ + "active" + ], + "provStatus": "ACTIVE", + "cloudRegionId": { + "get_param": "chosen_region" + }, + "service_instance_id": { + "get_param": "service_id" + } + }, + "passthroughAttributes": { + "td-role": "anchor" + } + } + ] + } +}
\ No newline at end of file diff --git a/test/policy-local-files/pwt-it-policies/Distance_vFW_1.json b/test/policy-local-files/pwt-it-policies/Distance_vFW_1.json new file mode 100755 index 0000000..12c24da --- /dev/null +++ b/test/policy-local-files/pwt-it-policies/Distance_vFW_1.json @@ -0,0 +1,22 @@ +{ + "service": "distancePolicy", + "policyName": "OSDF_CASABLANCA.Distance_vFW_1", + "description": "Distance Policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "distanceProperties": { + "locationInfo": "customer_loc", + "distance": { "value": "100", "operator": "<", "unit": "km" } + }, + "identity": "distance-vFW", + "resources": ["vFW", "7400fd06C75f4a44A68f"], + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "distance_to_location", + "applicableResources": "any" + } +} diff --git a/test/policy-local-files/pwt-it-policies/Placement_Optimization_1.json b/test/policy-local-files/pwt-it-policies/Placement_Optimization_1.json new file mode 100755 index 0000000..8701497 --- /dev/null +++ b/test/policy-local-files/pwt-it-policies/Placement_Optimization_1.json @@ -0,0 +1,55 @@ +{ + "service": "optimizationPolicy", + "policyName": "OSDF_CASABLANCA.Placement_Optimization_1", + "description": "Placement Optimization Policy for vGMuxInfra", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "5", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "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", "7400fd06C75f4a44A68f"], + "customerLocationInfo": "customer_loc", + "parameter": "distance", + "weight": "100", + "operator": "product" + }, + { + "resources": ["vFW", "7400fd06C75f4a44A68f"], + "parameter": "hpa_score", + "weight": "200", + "operator": "product" + } + ], + "operator": "sum" + }, + "identity": "optimization", + "policyScope": ["vcpe", "us", "international", "ip", "vGMuxInfra", "vG", "vfw"], + "policyType": "placement_optimization", + "objective": "minimize" + } +} diff --git a/test/policy-local-files/pwt-it-policies/QueryPolicy_vFW.json b/test/policy-local-files/pwt-it-policies/QueryPolicy_vFW.json new file mode 100755 index 0000000..443a82a --- /dev/null +++ b/test/policy-local-files/pwt-it-policies/QueryPolicy_vFW.json @@ -0,0 +1,21 @@ +{ + "service": "queryPolicy", + "policyName": "OSDF_CASABLANCA.QueryPolicy_vFW", + "description": "Query policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "queryProperties": [ + {"attribute":"customerLatitude", "attribute_location": "customerLatitude"}, + {"attribute":"customerLongitude", "attribute_location": "customerLongitude"} + ], + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "request_param_query", + "serviceName": "vFW", + "identity": "vFW_Query_Policy" + } +} diff --git a/test/policy-local-files/pwt-it-policies/hpa_policy_vFW_1.json b/test/policy-local-files/pwt-it-policies/hpa_policy_vFW_1.json new file mode 100755 index 0000000..7d72485 --- /dev/null +++ b/test/policy-local-files/pwt-it-policies/hpa_policy_vFW_1.json @@ -0,0 +1,214 @@ +{ + "service": "hpaPolicy", + "policyName": "OSDF_CASABLANCA.hpa_policy_vFW_1", + "description": "HPA policy for vFW", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "3", + "riskType": "test", + "riskLevel": "2", + "guard": "False", + "content": { + "resources": ["vFW", "7400fd06C75f4a44A68f"], + "identity": "hpa-vFW", + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "hpa", + "flavorFeatures": [ + { + "flavorProperties": [ + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "", + "operator": ">=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numVirtualCpu" + }, + { + "unit": "MB", + "operator": ">=", + "hpa-attribute-value": "8", + "hpa-attribute-key": "virtualMemSize" + } + ], + "hpa-feature": "basicCapabilities", + "mandatory": "True" + }, + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaNodes" + }, + { + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaCpu-0" + }, + { + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numaCpu-1" + }, + { + "unit": "GB", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "numaMem-0" + }, + { + "unit": "GB", + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numaMem-1" + } + ], + "hpa-feature": "numa", + "mandatory": "True" + }, + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "unit": "MB", + "operator": "=", + "hpa-attribute-value": "2", + "hpa-attribute-key": "memoryPageSize" + }, + { + "operator": "=", + "hpa-attribute-value": "4", + "hpa-attribute-key": "numberOfPages" + } + ], + "hpa-feature": "hugePages", + "mandatory": "True" + }, + { + "architecture": "Intel64", + "hpa-feature": "sriovNICNetwork", + "hpa-version": "v1", + "directives": [ + { + "type": "sriovNICNetwork_directives", + "attributes": [ + { + "attribute_name": "oof_returned_vnic_type_for_firewall_protected", + "attribute_value": "direct" + } + ] + } + ], + "hpa-feature-attributes": [ + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "1", + "hpa-attribute-key": "pciCount" + }, + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "1234", + "hpa-attribute-key": "pciVendorId" + }, + { + "unit": "", + "operator": "=", + "hpa-attribute-value": "7890", + "hpa-attribute-key": "pciDeviceId" + } + ], + "score": "100", + "mandatory": "False" + } + ], + "type": "vnfc", + "id": "vfw_1", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_1", + "attribute_value": "" + } + ] + } + ] + }, + { + "flavorProperties": [ + { + "architecture": "generic", + "directives": [], + "hpa-version": "v1", + "hpa-feature-attributes": [ + { + "operator": ">=", + "hpa-attribute-value": "1", + "hpa-attribute-key": "numVirtualCpu" + }, + { + "unit": "GB", + "operator": ">=", + "hpa-attribute-value": "7", + "hpa-attribute-key": "virtualMemSize" + } + ], + "hpa-feature": "basicCapabilities", + "mandatory": "True" + } + ], + "type": "vnfc", + "id": "vfw_2", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_2", + "attribute_value": "" + } + ] + } + ] + }, + { + "id": "vfw_3", + "type": "vnfc", + "directives": [ + { + "type": "flavor_directives", + "attributes": [ + { + "attribute_name": "label_3", + "attribute_value": "" + } + ] + } + ], + "flavorProperties": [ + { + "hpa-feature": "basicCapabilities", + "hpa-version": "v1", + "architecture": "generic", + "mandatory": "True", + "directives": [], + "hpa-feature-attributes": [] + } + ] + } + ] + } +} diff --git a/test/policy-local-files/pwt-it-policies/vnfPolicy_vFW.json b/test/policy-local-files/pwt-it-policies/vnfPolicy_vFW.json new file mode 100755 index 0000000..7180345 --- /dev/null +++ b/test/policy-local-files/pwt-it-policies/vnfPolicy_vFW.json @@ -0,0 +1,29 @@ +{ + "service": "vnfPolicy", + "policyName": "OSDF_CASABLANCA.vnfPolicy_vFW", + "description": "vnfPolicy", + "templateVersion": "OpenSource.version.1", + "version": "test1", + "priority": "6", + "riskType": "test", + "riskLevel": "3", + "guard": "False", + "content": { + "identity": "vnf_vFW", + "policyScope": ["vfw", "us", "international", "ip"], + "policyType": "vnfPolicy", + "resources": ["vFW", "7400fd06C75f4a44A68f"], + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "cloud", + "customerId": "", + "orchestrationStatus": "", + "equipmentRole": "" + + } + ] + } +} diff --git a/test/policy-local-files/queryPolicy_URLLC_.json b/test/policy-local-files/queryPolicy_URLLC_.json new file mode 100644 index 0000000..3114234 --- /dev/null +++ b/test/policy-local-files/queryPolicy_URLLC_.json @@ -0,0 +1,29 @@ +{ + "OSDF_FRANKFURT.queryPolicy_URLLC_1": { + "type": "onap.policies.optimization.service.QueryPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.queryPolicy_URLLC_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "URLLC_1" + ], + "geography": [ + "US" + ], + "identity": "queryPolicy_URLLC_1", + "queryProperties": [ + { + "attribute": "latency", + "attribute_location": "latency" + } + ] + } + } +} diff --git a/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json b/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json new file mode 100644 index 0000000..fa02d4e --- /dev/null +++ b/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json @@ -0,0 +1,37 @@ +{ + "OSDF_FRANKFURT.minimizeCost_URLLC": { + "metadata": { + "policy-id": "OSDF_FRANKFURT.minimizeCost_URLLC", + "policy-version": 1 + }, + "properties": { + "geography": [], + "identity": "optimization", + "goal": "minimize", + "operation_function": { + "operator": "sum", + "operands": [ + { + "function": "attribute", + "params": { + "attribute": "creation_cost", + "demand": "embb-nst" + } + } + ] + }, + "resources": [ + "embb-nst" + ], + "scope": [ + "shared,reuse" + ], + "services": [ + "embb-nst" + ] + }, + "type": "onap.policies.optimization.resource.OptimizationPolicy", + "type_version": "2.0.0", + "version": "1.0.0" + } +} diff --git a/test/policy-local-files/slice-selection-files/opt_policy_nssi.json b/test/policy-local-files/slice-selection-files/opt_policy_nssi.json new file mode 100644 index 0000000..196add0 --- /dev/null +++ b/test/policy-local-files/slice-selection-files/opt_policy_nssi.json @@ -0,0 +1,37 @@ +{ + "OSDF_FRANKFURT.minimizeCost_URLLC": { + "metadata": { + "policy-id": "OSDF_FRANKFURT.minimizeCost_URLLC", + "policy-version": 1 + }, + "properties": { + "geography": [], + "identity": "optimization", + "goal": "minimize", + "operation_function": { + "operator": "sum", + "operands": [ + { + "function": "attribute", + "params": { + "attribute": "latency", + "demand": "embb-cn" + } + } + ] + }, + "resources": [ + "embb-cn" + ], + "scope": [ + "OSDF_GUILIN" + ], + "services": [ + "embb-cn" + ] + }, + "type": "onap.policies.optimization.resource.OptimizationPolicy", + "type_version": "2.0.0", + "version": "1.0.0" + } +} diff --git a/test/policy-local-files/slice-selection-files/query_policy_nsi.json b/test/policy-local-files/slice-selection-files/query_policy_nsi.json new file mode 100644 index 0000000..c370ccd --- /dev/null +++ b/test/policy-local-files/slice-selection-files/query_policy_nsi.json @@ -0,0 +1,54 @@ + + { + "OSDF_GUILIN.queryPolicy_URLLC":{ + "type":"onap.policies.optimization.service.QueryPolicy", + "version":"1.0.0", + "type_version":"1.0.0", + "metadata":{ + "policy-id":"OSDF_GUILIN.queryPolicy_URLLC", + "policy-version":1 + }, + "properties":{ + "scope":[ + "shared,reuse", + "shared,create_new", + "not-shared" + ], + "services":[ + "embb-nst" + ], + "geography":[], + "identity":"queryPolicy_URLLC", + "queryProperties":[ + { + "attribute":"latency", + "attribute_location":"latency" + }, + { + "attribute":"reliability", + "attribute_location":"reliability" + }, + { + "attribute":"an_latency", + "attribute_location":"an_latency" + }, + { + "attribute":"cn_latency", + "attribute_location":"cn_latency" + }, + { + "attribute":"tn_bh_latency", + "attribute_location":"tn_bh_latency" + }, + { + "attribute":"model_invariant_id", + "attribute_location":"invariantUUID" + }, + { + "attribute":"model_version_id", + "attribute_location":"UUID" + } + ] + } + } + } diff --git a/test/policy-local-files/slice-selection-files/query_policy_nssi.json b/test/policy-local-files/slice-selection-files/query_policy_nssi.json new file mode 100644 index 0000000..c1e941f --- /dev/null +++ b/test/policy-local-files/slice-selection-files/query_policy_nssi.json @@ -0,0 +1,40 @@ + + { + "OSDF_GUILIN.queryPolicy_URLLC":{ + "type":"onap.policies.optimization.service.QueryPolicy", + "version":"1.0.0", + "type_version":"1.0.0", + "metadata":{ + "policy-id":"OSDF_GUILIN.queryPolicy_URLLC", + "policy-version":1 + }, + "properties":{ + "scope":[ + "OSDF_GUILIN" + ], + "services":[ + "embb-cn" + ], + "geography":[], + "identity":"queryPolicy_URLLC", + "queryProperties":[ + { + "attribute":"latency", + "attribute_location":"latency" + }, + { + "attribute":"reliability", + "attribute_location":"reliability" + }, + { + "attribute":"model_invariant_id", + "attribute_location":"invariantUUID" + }, + { + "attribute":"model_version_id", + "attribute_location":"UUID" + } + ] + } + } + } diff --git a/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json b/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json new file mode 100644 index 0000000..8769641 --- /dev/null +++ b/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json @@ -0,0 +1,48 @@ + + { + "OSDF_GUILIN.Threshold_URLLC":{ + "metadata":{ + "policy-id":"OSDF_GUILIN.Threshold_URLLC", + "policy-version":1 + }, + "properties":{ + "geography":[ + + ], + "identity":"Threshold_URLLC", + "resources":[ + "embb-nst" + ], + "scope":[ + "shared,reuse", + "shared,create_new", + "not-shared" + ], + "services":[ + "embb-nst" + ], + "thresholdProperties":[ + { + "attribute":"latency", + "operator":"lte", + "threshold":{ + "get_param":"latency" + }, + "unit":"ms" + }, + { + "attribute":"reliability", + "operator":"gte", + "threshold":{ + "get_param":"reliability" + }, + "unit":"" + } + ] + }, + "type":"onap.policies.optimization.resource.ThresholdPolicy", + "type_version":"1.0.0", + "version":"1.0.0" + } + } + diff --git a/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json b/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json new file mode 100644 index 0000000..bf8690f --- /dev/null +++ b/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json @@ -0,0 +1,46 @@ + + { + "OSDF_GUILIN.Threshold_URLLC":{ + "metadata":{ + "policy-id":"OSDF_GUILIN.Threshold_URLLC", + "policy-version":1 + }, + "properties":{ + "geography":[ + + ], + "identity":"Threshold_URLLC", + "resources":[ + "embb-cn" + ], + "scope":[ + "OSDF_GUILIN" + ], + "services":[ + "embb-cn" + ], + "thresholdProperties":[ + { + "attribute":"latency", + "operator":"lte", + "threshold":{ + "get_param":"latency" + }, + "unit":"ms" + }, + { + "attribute":"reliability", + "operator":"gte", + "threshold":{ + "get_param":"reliability" + }, + "unit":"" + } + ] + }, + "type":"onap.policies.optimization.resource.ThresholdPolicy", + "type_version":"1.0.0", + "version":"1.0.0" + } + } + diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json new file mode 100644 index 0000000..09aba6e --- /dev/null +++ b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json @@ -0,0 +1,81 @@ + + { + "OSDF_GUILIN.vnfPolicy_URLLC":{ + "metadata":{ + "policy-id":"OSDF_GUILIN.vnfPolicy_URLLC", + "policy-version":1 + }, + "properties":{ + "identity":"vnf_URLLC", + "resources":["embb-nst"], + "scope":[ + "not-shared" + ], + "services":[ + "embb-nst" + ], + "geography":[], + "vnfProperties":[ + { + "attributes":{ + "service_profile": { + "latency": {"value": {"get_param": "latency"}, "operator": "lte"}, + "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"} + }, + "subnets": { + "core":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"cn_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.999 + ] + } + }, + "ran":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"an_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.9 + ] + } + }, + "transport":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"tn_bh_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.99 + ] + } + } + } + }, + "inventoryProvider":"generator", + "inventoryType":"slice_profiles", + "unique":"true", + "defaultAttributes":{ + "creation-cost" : 0.9 + } + } + ] + }, + "type":"onap.policies.optimization.resource.VnfPolicy", + "type_version":"1.0.0", + "version":"1.0.0" + } + } + diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json new file mode 100644 index 0000000..0446748 --- /dev/null +++ b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json @@ -0,0 +1,96 @@ + + { + "OSDF_GUILIN.vnfPolicy_URLLC":{ + "metadata":{ + "policy-id":"OSDF_GUILIN.vnfPolicy_URLLC", + "policy-version":1 + }, + "properties":{ + "identity":"vnf_URLLC", + "resources":["embb-nst"], + "scope":[ + "shared,reuse", + "shared,create_new" + ], + "services":[ + "embb-nst" + ], + "geography":[], + "vnfProperties":[ + { + "attributes":{ + "modelInvariantId":{"get_param":"model_invariant_id"}, + "modelVersionId":{"get_param":"model_version_id"}, + "environment-context":"shared", + "service-role":"nsi" + }, + "inventoryProvider":"aai", + "inventoryType":"nsi", + "unique":"true", + "defaultAttributes":{ + "creation-cost" : 0.1 + } + }, + { + "attributes":{ + "service_profile": { + "latency": {"value": {"get_param": "latency"}, "operator": "lte"}, + "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"} + }, + "subnets": { + "core":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"cn_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.999 + ] + } + }, + "ran":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"an_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.9 + ] + } + }, + "transport":{ + "latency":{ + "max":{"get_param":"latency"}, + "min":{"get_param":"tn_bh_latency"}, + "steps":1 + }, + "reliability":{ + "values":[ + 99.9, + 99.99 + ] + } + } + } + }, + "inventoryProvider":"generator", + "inventoryType":"slice_profiles", + "unique":"true", + "defaultAttributes":{ + "creation-cost" : 0.9 + } + } + ] + }, + "type":"onap.policies.optimization.resource.VnfPolicy", + "type_version":"1.0.0", + "version":"1.0.0" + } + } + diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json b/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json new file mode 100644 index 0000000..b5c81d1 --- /dev/null +++ b/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json @@ -0,0 +1,37 @@ + + { + "OSDF_GUILIN.vnfPolicy_URLLC":{ + "metadata":{ + "policy-id":"OSDF_GUILIN.vnfPolicy_URLLC", + "policy-version":1 + }, + "properties":{ + "identity":"vnf_URLLC", + "resources":["embb-cn"], + "scope":[ + "OSDF_GUILIN" + ], + "services":[ + "embb-cn" + ], + "geography":[], + "vnfProperties":[ + { + "attributes":{ + "modelInvariantId":{"get_param":"model_invariant_id"}, + "modelVersionId":{"get_param":"model_version_id"}, + "environment-context":"shared", + "service-role":"nssi" + }, + "inventoryProvider":"aai", + "inventoryType":"nssi", + "unique":"true" + } + ] + }, + "type":"onap.policies.optimization.resource.VnfPolicy", + "type_version":"1.0.0", + "version":"1.0.0" + } + } + diff --git a/test/policy-local-files/subscriber_policy_URLLC_1.json b/test/policy-local-files/subscriber_policy_URLLC_1.json new file mode 100644 index 0000000..d147273 --- /dev/null +++ b/test/policy-local-files/subscriber_policy_URLLC_1.json @@ -0,0 +1,26 @@ +{ + "OSDF_FRANKFURT.SubscriberPolicy_URLLC_1": { + "type": "onap.policies.optimization.service.SubscriberPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_URLLC_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT", + "URLLC_1" + ], + "services": [ + "URLLC_1" + ], + "identity": "subscriber_URLLC_1", + "properties": { + "subscriberName": [ + "URLLC_Core_1" + ] + } + } +} +} diff --git a/test/policy-local-files/subscriber_policy_vCPE.json b/test/policy-local-files/subscriber_policy_vCPE.json new file mode 100644 index 0000000..c02d8d6 --- /dev/null +++ b/test/policy-local-files/subscriber_policy_vCPE.json @@ -0,0 +1,32 @@ +{ + "OSDF_FRANKFURT.SubscriberPolicy_v1": { + "type": "onap.policies.optimization.service.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" + ] + } + } + } +} diff --git a/test/policy-local-files/thresholdPolicy_URLLC_Core_1.json b/test/policy-local-files/thresholdPolicy_URLLC_Core_1.json new file mode 100644 index 0000000..6c602ee --- /dev/null +++ b/test/policy-local-files/thresholdPolicy_URLLC_Core_1.json @@ -0,0 +1,41 @@ +{ + "OSDF_FRANKFURT.Threshold_URLLC_Core_1":{ + "type":"onap.policies.optimization.resource.ThresholdPolicy", + "version":"1.0.0", + "type_version":"1.0.0", + "metadata":{ + "policy-id":"OSDF_FRANKFURT.Threshold_URLLC_Core_1", + "policy-version":1 + }, + "properties":{ + "scope":[ + "OSDF_FRANKFURT", + "URLLC_1", + "URLLC_Core_1" + ], + "resources":[ + "URLLC_Core_1" + ], + "services":[ + "URLLC_1" + ], + "geography": [], + "identity":"Threshold_URLLC_Core_1", + "thresholdProperties":[ + { + "attribute":"latency", + "operator":"lte", + "threshold":5, + "unit":"ms" + }, + { + "attribute":"reliability", + "operator":"gte", + "threshold":99.999, + "unit":"" + } + + ] + } + } +}
\ No newline at end of file diff --git a/test/policy-local-files/vnfPolicy_URLLC_Core_1.json b/test/policy-local-files/vnfPolicy_URLLC_Core_1.json new file mode 100644 index 0000000..0fa69fa --- /dev/null +++ b/test/policy-local-files/vnfPolicy_URLLC_Core_1.json @@ -0,0 +1,39 @@ +{ + "OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1": { + "type": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.vnfPolicy_URLLC_Core_1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT", + "URLLC_1", + "URLLC_Core_1" + ], + "resources": [ + "URLLC_Core_1" + ], + "services": [ + "URLLC_1" + ], + "identity": "vnf_URLLC_Core_1", + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "inventoryType": "nssi", + "region": "RegionOne", + "attributes": { + "orchestrationStatus": "active", + "service-role": "nssi", + "modelInvariantId":"bfbg3636-e39c-iidd-0987-27c28f4oo3", + "modelVersionId":"bfbg3636-e39c-iidd-0987-27c28f4d33" + } + } + ] + } + } +} diff --git a/test/policy-local-files/vnfPolicy_vFW_TD.json b/test/policy-local-files/vnfPolicy_vFW_TD.json new file mode 100644 index 0000000..e63e2c2 --- /dev/null +++ b/test/policy-local-files/vnfPolicy_vFW_TD.json @@ -0,0 +1,47 @@ +{ + "OSDF_FRANKFURT.vnfPolicy_vFW_TD": { + "type": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.vnfPolicy_vFW_TD", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT", + "TD" + ], + "resources": [ + "vFW-SINK" + ], + "geography": [ + "US" + ], + "identity": "vnf_vFW_TD", + "applicableResources": "any", + "vnfProperties": [{ + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "vfmodule", + "customerId": { + "get_param": "chosen_customer_id" + }, + "equipmentRole": "", + "attributes": { + "orchestrationStatus": ["active"], + "provStatus": "ACTIVE", + "cloudRegionId": { + "get_param": "chosen_region" + }, + "service_instance_id": { + "get_param": "service_id" + } + }, + "passthroughAttributes": { + "td-role": "destination" + } + }] + } + } +} diff --git a/test/policy-local-files/vnfPolicy_vG.json b/test/policy-local-files/vnfPolicy_vG.json index d215078..2dea670 100644 --- a/test/policy-local-files/vnfPolicy_vG.json +++ b/test/policy-local-files/vnfPolicy_vG.json @@ -1,29 +1,38 @@ { - "service": "vnfPolicy", - "policyName": "OSDF_R2.vnfPolicy_vG", - "description": "vnfPolicy", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "6", - "riskType": "test", - "riskLevel": "3", - "guard": "False", - "content": { - "identity": "vnf_vG", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "vnfPolicy", - "resources": ["vG"], - "applicableResources": "any", - "vnfProperties": [ - { - "inventoryProvider": "aai", - "serviceType": "", - "inventoryType": "cloud", - "customerId": "", - "orchestrationStatus": "", - "equipmentRole": "" - - } - ] + "OSDF_FRANKFURT.vnfPolicy_vG": { + "type": "onap.policies.optimization.resource.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": "" + } + ] } + } } diff --git a/test/policy-local-files/vnfPolicy_vGMuxInfra.json b/test/policy-local-files/vnfPolicy_vGMuxInfra.json index 6849105..65475a9 100644 --- a/test/policy-local-files/vnfPolicy_vGMuxInfra.json +++ b/test/policy-local-files/vnfPolicy_vGMuxInfra.json @@ -1,28 +1,38 @@ { - "service": "vnfPolicy", - "policyName": "OSDF_R2.vnfPolicy_vGMuxInfra", - "description": "vnfPolicy", - "templateVersion": "OpenSource.version.1", - "version": "test1", - "priority": "6", - "riskType": "test", - "riskLevel": "3", - "guard": "False", - "content": { - "identity": "vnf_vGMuxInfra", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "vnfPolicy", - "resources": ["vGMuxInfra"], - "applicableResources": "any", - "vnfProperties": [ - { - "inventoryProvider": "aai", - "serviceType": "vGMuxInfra-xx", - "inventoryType": "service", - "customerId": "SDN-ETHERNET-INTERNET", - "orchestrationStatus": "", - "equipmentRole": "" - } - ] + "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": { + "type": "onap.policies.optimization.resource.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": "" + } + ] } + } } diff --git a/test/policy-local-files/vnfPolicy_vPGN_TD.json b/test/policy-local-files/vnfPolicy_vPGN_TD.json new file mode 100644 index 0000000..077901a --- /dev/null +++ b/test/policy-local-files/vnfPolicy_vPGN_TD.json @@ -0,0 +1,52 @@ +{ + "OSDF_FRANKFURT.vnfPolicy_vPGN_TD": { + "type": "onap.policies.optimization.resource.VnfPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.vnfPolicy_vPGN_TD", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT", + "TD" + ], + "resources": [ + "vPGN" + ], + "geography": [ + "US" + ], + "identity": "vnf_vPGN_TD", + "applicableResources": "any", + "vnfProperties": [ + { + "inventoryProvider": "aai", + "serviceType": "", + "inventoryType": "vfmodule", + "customerId": { + "get_param": "chosen_customer_id" + }, + "equipmentRole": "", + "unique": "False", + "attributes": { + "orchestrationStatus": [ + "active" + ], + "provStatus": "ACTIVE", + "cloudRegionId": { + "get_param": "chosen_region" + }, + "service_instance_id": { + "get_param": "service_id" + } + }, + "passthroughAttributes": { + "td-role": "anchor" + } + } + ] + } + } +} |