From 26790fb6bfe54c4767acbfc92b64629f9ca05f22 Mon Sep 17 00:00:00 2001 From: thmsdt Date: Fri, 5 Jan 2024 14:11:20 +0100 Subject: fix docs config files Issue-ID: DOC-821 Change-Id: I7f9332993119ded3806f39de527cf029bc477cb5 Signed-off-by: thmsdt --- .gitreview | 2 +- docs/conf.py | 6 +- .../pdp-has-vcpe-good/Affinity_vCPE_1.json | 48 ++++++---- .../pdp-has-vcpe-good/Capacity_vGMuxInfra.json | 48 ++++++---- .../pdp-has-vcpe-good/Capacity_vG_1.json | 48 ++++++---- .../pdp-has-vcpe-good/Distance_vGMuxInfra_1.json | 50 ++++++---- .../pdp-has-vcpe-good/Distance_vG_1.json | 50 ++++++---- .../Placement_Optimization_1.json | 44 +++++---- .../pdp-has-vcpe-good/QueryPolicy_vCPE.json | 53 +++++++---- .../pdp-has-vcpe-good/QueryPolicy_vCPE_2.json | 73 ++++++++++---- .../pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json | 106 ++++++++++++++------- .../pdp-has-vcpe-good/hpa_policy_vG_1.json | 101 ++++++++++++++------ .../pdp-has-vcpe-good/vnfPolicy_vG.json | 61 +++++++----- .../pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json | 60 +++++++----- tox.ini | 4 +- 15 files changed, 487 insertions(+), 267 deletions(-) diff --git a/.gitreview b/.gitreview index 3b0dd55..685d231 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=gerrit.onap.org port=29418 project=optf/osdf.git -defaultbranch=master +defaultbranch=montreal diff --git a/docs/conf.py b/docs/conf.py index 172975d..b2cf223 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ project = "onap" -release = "master" -version = "master" +release = "montreal" +version = "montreal" author = "Open Network Automation Platform" # yamllint disable-line rule:line-length @@ -31,7 +31,7 @@ extensions = [ # Change to {releasename} after you have created the new 'doc' branch. # -branch = 'latest' +branch = 'montreal' intersphinx_mapping = {} doc_url = 'https://docs.onap.org/projects' diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json index 2953589..5364d5d 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Affinity_vCPE_1.json @@ -1,21 +1,33 @@ { - "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"] + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json index 010cf3f..7ce02bf 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vGMuxInfra.json @@ -1,22 +1,32 @@ { - "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" + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json index fedcc4f..c897a87 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Capacity_vG_1.json @@ -1,22 +1,32 @@ { - "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" + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json index e3ba83c..163d0df 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vGMuxInfra_1.json @@ -1,22 +1,36 @@ { - "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" } + "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": "distance_to_location", - "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json index c498c7a..aa6badc 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Distance_vG_1.json @@ -1,22 +1,36 @@ { - "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" } + "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": "distance_to_location", - "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json index 9b062b0..62b024c 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/Placement_Optimization_1.json @@ -1,15 +1,30 @@ { - "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": { + "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"], @@ -46,10 +61,7 @@ } ], "operator": "sum" - }, - "identity": "optimization", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra", "vG"], - "policyType": "placement_optimization", - "objective": "minimize" + } } + } } diff --git a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json index 5097964..3bcc67e 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE.json @@ -1,21 +1,38 @@ { - "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" + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json index e398f39..3d9f4ca 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/QueryPolicy_vCPE_2.json @@ -1,24 +1,55 @@ { - "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" + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json index 690f5dc..b6317f8 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vGMuxInfra_1.json @@ -1,18 +1,27 @@ { - "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"], + "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", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vGMuxInfra"], - "policyType": "hpa", "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":["", ""], "operator": "ALL", "unit":""} + { + "hpa-attribute-key": "instructionSetExtensions", + "hpa-attribute-value": [ + "", + "" + ], + "operator": [ + "ALL" + ], + "unit": "" + } ] } ] @@ -99,7 +139,7 @@ {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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": "","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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json index b29c67d..59ba4b1 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/hpa_policy_vG_1.json @@ -1,18 +1,27 @@ { - "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"], + "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", - "policyScope": ["vCPE", "US", "INTERNATIONAL", "ip", "vG"], - "policyType": "hpa", "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":["", ""], "operator": "ALL", "unit":""} + { + "hpa-attribute-key": "instructionSetExtensions", + "hpa-attribute-value": [ + "", + "" + ], + "operator": [ + "ALL" + ], + "unit": "" + } ] } ] @@ -99,7 +139,7 @@ {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json index b047686..2dea670 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vG.json @@ -1,29 +1,38 @@ { - "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": "" - - } - ] + "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/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json index 45d67f6..65475a9 100644 --- a/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json +++ b/test/functest/simulators/policy/response-payloads/pdp-has-vcpe-good/vnfPolicy_vGMuxInfra.json @@ -1,28 +1,38 @@ { - "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": "" - } - ] + "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/tox.ini b/tox.ini index 8dc20c9..6a5719f 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ deps = -r{toxinidir}/requirements.txt source=./apps/,./osdf/,osdfapp.py,./runtime/,solverapp.py [testenv:pylint] -whitelist_externals=bash +allowlist_externals=bash commands = bash -c "pylint --reports=y osdf apps runtime| tee pylint.out" [testenv:py3] @@ -34,7 +34,7 @@ basepython=python3 [testenv:flake8diff] basepython=python3 -whitelist_externals=bash +allowlist_externals=bash deps = hacking>=2.0.0 commands = bash -c "files=$(git diff HEAD^ HEAD --diff-filter=d --name-only | grep -E '(^apps\/|osdf\/|runtime\/)'| grep -E '*\.py$'); if [[ -z $files ]]; then exit 0; else flake8 $files; fi" -- cgit 1.2.3-korg