From fa538d59b8982a48fd58f024a30a59616d43cf81 Mon Sep 17 00:00:00 2001 From: "Chayal, Avteet (ac229e)" Date: Fri, 20 Mar 2020 00:32:42 -0400 Subject: Improvements to the OSDF changes for new PEF APIs Improvements to the OSDF changes for new PEF APIs Issue-ID: OPTFRA-723 Change-Id: Ie425bb302361489f4b5a47fbc7225fdc8060e9c3 Signed-off-by: Chayal, Avteet (ac229e) --- test/policy-local-files/Affinity_vCPE_1.json | 48 +++-- test/policy-local-files/Affinity_vFW_TD.json | 31 +++ test/policy-local-files/Attribute_vNS_1.json | 90 ++++---- test/policy-local-files/Capacity_vFW_1.json | 22 -- test/policy-local-files/Capacity_vGMuxInfra.json | 48 +++-- test/policy-local-files/Capacity_vG_1.json | 48 +++-- test/policy-local-files/Distance_vFW_1.json | 22 -- test/policy-local-files/Distance_vGMuxInfra_1.json | 50 +++-- test/policy-local-files/Distance_vG_1.json | 50 +++-- .../Placement_Optimization_1.json | 44 ++-- test/policy-local-files/QueryPolicy_vCPE.json | 53 +++-- test/policy-local-files/QueryPolicy_vCPE_2.json | 73 +++++-- test/policy-local-files/QueryPolicy_vFW.json | 21 -- test/policy-local-files/QueryPolicy_vFW_TD.json | 73 ++++--- test/policy-local-files/affinity_vFW_TD.json | 29 --- test/policy-local-files/hpa_policy_vFW_1.json | 214 ------------------- .../hpa_policy_vGMuxInfra_1.json | 106 +++++++--- test/policy-local-files/hpa_policy_vG_1.json | 101 ++++++--- .../policy-local-files/meta-valid-policies-old.txt | 16 ++ .../policy-local-files/meta-valid-policies-org.txt | 16 -- test/policy-local-files/meta-valid-policies.txt | 4 + .../new_policies/Affinity_vCPE_1.json | 33 --- .../new_policies/Affinity_vFW_TD.json | 31 --- .../new_policies/Attribute_vNS_1.json | 51 ----- .../new_policies/Capacity_vGMuxInfra.json | 32 --- .../new_policies/Capacity_vG_1.json | 32 --- .../new_policies/Distance_vGMuxInfra_1.json | 36 ---- .../new_policies/Distance_vG_1.json | 36 ---- .../new_policies/Placement_Optimization_1.json | 67 ------ .../new_policies/QueryPolicy_vCPE.json | 38 ---- .../new_policies/QueryPolicy_vCPE_2.json | 55 ----- .../new_policies/QueryPolicy_vFW_TD.json | 47 ----- .../new_policies/hpa_policy_vGMuxInfra_1.json | 231 --------------------- .../new_policies/hpa_policy_vG_1.json | 231 --------------------- .../new_policies/meta-valid-policies.txt | 17 -- .../new_policies/subscriber_policy_vCPE.json | 32 --- .../new_policies/vnfPolicy_vFW_TD.json | 47 ----- .../new_policies/vnfPolicy_vG.json | 38 ---- .../new_policies/vnfPolicy_vGMuxInfra.json | 38 ---- .../new_policies/vnfPolicy_vPGN_TD.json | 52 ----- .../old-policies/Affinity_vCPE_1.json | 21 ++ .../old-policies/Attribute_vNS_1.json | 49 +++++ .../old-policies/Capacity_vFW_1.json | 22 ++ .../old-policies/Capacity_vGMuxInfra.json | 22 ++ .../old-policies/Capacity_vG_1.json | 22 ++ .../old-policies/Distance_vFW_1.json | 22 ++ .../old-policies/Distance_vGMuxInfra_1.json | 22 ++ .../old-policies/Distance_vG_1.json | 22 ++ .../old-policies/Placement_Optimization_1.json | 55 +++++ .../old-policies/QueryPolicy_vCPE.json | 21 ++ .../old-policies/QueryPolicy_vCPE_2.json | 24 +++ .../old-policies/QueryPolicy_vFW.json | 21 ++ .../old-policies/QueryPolicy_vFW_TD.json | 32 +++ .../old-policies/affinity_vFW_TD.json | 29 +++ .../old-policies/hpa_policy_vFW_1.json | 214 +++++++++++++++++++ .../old-policies/hpa_policy_vGMuxInfra_1.json | 191 +++++++++++++++++ .../old-policies/hpa_policy_vG_1.json | 190 +++++++++++++++++ .../old-policies/subscriber_policy_vCPE.json | 22 ++ .../old-policies/subscriber_policy_vFW.json | 22 ++ .../old-policies/vnfPolicy_vFW.json | 29 +++ .../old-policies/vnfPolicy_vFW_TD.json | 44 ++++ .../old-policies/vnfPolicy_vG.json | 29 +++ .../old-policies/vnfPolicy_vGMuxInfra.json | 28 +++ .../old-policies/vnfPolicy_vPGN_TD.json | 51 +++++ .../policy-local-files/subscriber_policy_vCPE.json | 48 +++-- test/policy-local-files/subscriber_policy_vFW.json | 22 -- test/policy-local-files/vnfPolicy_vFW.json | 29 --- test/policy-local-files/vnfPolicy_vFW_TD.json | 85 ++++---- test/policy-local-files/vnfPolicy_vG.json | 61 +++--- test/policy-local-files/vnfPolicy_vGMuxInfra.json | 60 +++--- test/policy-local-files/vnfPolicy_vPGN_TD.json | 93 +++++---- 71 files changed, 1946 insertions(+), 1959 deletions(-) create mode 100644 test/policy-local-files/Affinity_vFW_TD.json delete mode 100644 test/policy-local-files/Capacity_vFW_1.json delete mode 100644 test/policy-local-files/Distance_vFW_1.json delete mode 100644 test/policy-local-files/QueryPolicy_vFW.json delete mode 100644 test/policy-local-files/affinity_vFW_TD.json delete mode 100644 test/policy-local-files/hpa_policy_vFW_1.json create mode 100644 test/policy-local-files/meta-valid-policies-old.txt delete mode 100644 test/policy-local-files/meta-valid-policies-org.txt delete mode 100644 test/policy-local-files/new_policies/Affinity_vCPE_1.json delete mode 100644 test/policy-local-files/new_policies/Affinity_vFW_TD.json delete mode 100644 test/policy-local-files/new_policies/Attribute_vNS_1.json delete mode 100644 test/policy-local-files/new_policies/Capacity_vGMuxInfra.json delete mode 100644 test/policy-local-files/new_policies/Capacity_vG_1.json delete mode 100644 test/policy-local-files/new_policies/Distance_vGMuxInfra_1.json delete mode 100644 test/policy-local-files/new_policies/Distance_vG_1.json delete mode 100644 test/policy-local-files/new_policies/Placement_Optimization_1.json delete mode 100644 test/policy-local-files/new_policies/QueryPolicy_vCPE.json delete mode 100644 test/policy-local-files/new_policies/QueryPolicy_vCPE_2.json delete mode 100644 test/policy-local-files/new_policies/QueryPolicy_vFW_TD.json delete mode 100644 test/policy-local-files/new_policies/hpa_policy_vGMuxInfra_1.json delete mode 100644 test/policy-local-files/new_policies/hpa_policy_vG_1.json delete mode 100644 test/policy-local-files/new_policies/meta-valid-policies.txt delete mode 100644 test/policy-local-files/new_policies/subscriber_policy_vCPE.json delete mode 100644 test/policy-local-files/new_policies/vnfPolicy_vFW_TD.json delete mode 100644 test/policy-local-files/new_policies/vnfPolicy_vG.json delete mode 100644 test/policy-local-files/new_policies/vnfPolicy_vGMuxInfra.json delete mode 100644 test/policy-local-files/new_policies/vnfPolicy_vPGN_TD.json create mode 100644 test/policy-local-files/old-policies/Affinity_vCPE_1.json create mode 100644 test/policy-local-files/old-policies/Attribute_vNS_1.json create mode 100644 test/policy-local-files/old-policies/Capacity_vFW_1.json create mode 100644 test/policy-local-files/old-policies/Capacity_vGMuxInfra.json create mode 100644 test/policy-local-files/old-policies/Capacity_vG_1.json create mode 100644 test/policy-local-files/old-policies/Distance_vFW_1.json create mode 100644 test/policy-local-files/old-policies/Distance_vGMuxInfra_1.json create mode 100644 test/policy-local-files/old-policies/Distance_vG_1.json create mode 100644 test/policy-local-files/old-policies/Placement_Optimization_1.json create mode 100644 test/policy-local-files/old-policies/QueryPolicy_vCPE.json create mode 100644 test/policy-local-files/old-policies/QueryPolicy_vCPE_2.json create mode 100644 test/policy-local-files/old-policies/QueryPolicy_vFW.json create mode 100644 test/policy-local-files/old-policies/QueryPolicy_vFW_TD.json create mode 100644 test/policy-local-files/old-policies/affinity_vFW_TD.json create mode 100644 test/policy-local-files/old-policies/hpa_policy_vFW_1.json create mode 100644 test/policy-local-files/old-policies/hpa_policy_vGMuxInfra_1.json create mode 100644 test/policy-local-files/old-policies/hpa_policy_vG_1.json create mode 100644 test/policy-local-files/old-policies/subscriber_policy_vCPE.json create mode 100644 test/policy-local-files/old-policies/subscriber_policy_vFW.json create mode 100644 test/policy-local-files/old-policies/vnfPolicy_vFW.json create mode 100644 test/policy-local-files/old-policies/vnfPolicy_vFW_TD.json create mode 100644 test/policy-local-files/old-policies/vnfPolicy_vG.json create mode 100644 test/policy-local-files/old-policies/vnfPolicy_vGMuxInfra.json create mode 100644 test/policy-local-files/old-policies/vnfPolicy_vPGN_TD.json delete mode 100644 test/policy-local-files/subscriber_policy_vFW.json delete mode 100644 test/policy-local-files/vnfPolicy_vFW.json (limited to 'test/policy-local-files') diff --git a/test/policy-local-files/Affinity_vCPE_1.json b/test/policy-local-files/Affinity_vCPE_1.json index 2953589..4f111eb 100644 --- a/test/policy-local-files/Affinity_vCPE_1.json +++ b/test/policy-local-files/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.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..53bb31b --- /dev/null +++ b/test/policy-local-files/Affinity_vFW_TD.json @@ -0,0 +1,31 @@ +{ + "OSDF_FRANKFURT.Affinity_vFW_TD": { + "type": "onap.policies.optimization.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 index e4766db..35b3c74 100644 --- a/test/policy-local-files/Attribute_vNS_1.json +++ b/test/policy-local-files/Attribute_vNS_1.json @@ -1,48 +1,50 @@ { - "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": [ - "", - "" - ] + "OSDF_FRANKFURT.Attribute_vNS_1": { + "type": "onap.policies.optimization.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": [ + "", + "" + ] + } } } } diff --git a/test/policy-local-files/Capacity_vFW_1.json b/test/policy-local-files/Capacity_vFW_1.json deleted file mode 100644 index d5e80ab..0000000 --- a/test/policy-local-files/Capacity_vFW_1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/Capacity_vGMuxInfra.json b/test/policy-local-files/Capacity_vGMuxInfra.json index 010cf3f..1d6d26d 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_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.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 fedcc4f..f07e7bc 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_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.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_vFW_1.json b/test/policy-local-files/Distance_vFW_1.json deleted file mode 100644 index 80e08d9..0000000 --- a/test/policy-local-files/Distance_vFW_1.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/Distance_vGMuxInfra_1.json b/test/policy-local-files/Distance_vGMuxInfra_1.json index e3ba83c..7de102e 100644 --- a/test/policy-local-files/Distance_vGMuxInfra_1.json +++ b/test/policy-local-files/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.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/policy-local-files/Distance_vG_1.json b/test/policy-local-files/Distance_vG_1.json index c498c7a..dcb45b2 100644 --- a/test/policy-local-files/Distance_vG_1.json +++ b/test/policy-local-files/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.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/policy-local-files/Placement_Optimization_1.json b/test/policy-local-files/Placement_Optimization_1.json index 9b062b0..b3efa64 100644 --- a/test/policy-local-files/Placement_Optimization_1.json +++ b/test/policy-local-files/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.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/policy-local-files/QueryPolicy_vCPE.json b/test/policy-local-files/QueryPolicy_vCPE.json index 5097964..1a8d205 100644 --- a/test/policy-local-files/QueryPolicy_vCPE.json +++ b/test/policy-local-files/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.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 e398f39..7a4d227 100644 --- a/test/policy-local-files/QueryPolicy_vCPE_2.json +++ b/test/policy-local-files/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.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.json b/test/policy-local-files/QueryPolicy_vFW.json deleted file mode 100644 index 932074b..0000000 --- a/test/policy-local-files/QueryPolicy_vFW.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "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/QueryPolicy_vFW_TD.json b/test/policy-local-files/QueryPolicy_vFW_TD.json index 8866635..1a6eb21 100644 --- a/test/policy-local-files/QueryPolicy_vFW_TD.json +++ b/test/policy-local-files/QueryPolicy_vFW_TD.json @@ -1,32 +1,47 @@ { - "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" - ] + "OSDF_FRANKFURT.queryPolicy_vFW_TD": { + "type": "onap.policies.optimization.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/affinity_vFW_TD.json b/test/policy-local-files/affinity_vFW_TD.json deleted file mode 100644 index 2df2d50..0000000 --- a/test/policy-local-files/affinity_vFW_TD.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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/hpa_policy_vFW_1.json b/test/policy-local-files/hpa_policy_vFW_1.json deleted file mode 100644 index a60ad47..0000000 --- a/test/policy-local-files/hpa_policy_vFW_1.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "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/hpa_policy_vGMuxInfra_1.json b/test/policy-local-files/hpa_policy_vGMuxInfra_1.json index 690f5dc..c233c5f 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_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.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/policy-local-files/hpa_policy_vG_1.json b/test/policy-local-files/hpa_policy_vG_1.json index b29c67d..4f9a7b4 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_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.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/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-org.txt b/test/policy-local-files/meta-valid-policies-org.txt deleted file mode 100644 index 99e3e88..0000000 --- a/test/policy-local-files/meta-valid-policies-org.txt +++ /dev/null @@ -1,16 +0,0 @@ -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 53f113f..5f969bf 100644 --- a/test/policy-local-files/meta-valid-policies.txt +++ b/test/policy-local-files/meta-valid-policies.txt @@ -11,3 +11,7 @@ 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/new_policies/Affinity_vCPE_1.json b/test/policy-local-files/new_policies/Affinity_vCPE_1.json deleted file mode 100644 index 4f111eb..0000000 --- a/test/policy-local-files/new_policies/Affinity_vCPE_1.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "OSDF_FRANKFURT.Affinity_vCPE_1": { - "type": "onap.policies.optimization.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/new_policies/Affinity_vFW_TD.json b/test/policy-local-files/new_policies/Affinity_vFW_TD.json deleted file mode 100644 index 53bb31b..0000000 --- a/test/policy-local-files/new_policies/Affinity_vFW_TD.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "OSDF_FRANKFURT.Affinity_vFW_TD": { - "type": "onap.policies.optimization.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/new_policies/Attribute_vNS_1.json b/test/policy-local-files/new_policies/Attribute_vNS_1.json deleted file mode 100644 index 35b3c74..0000000 --- a/test/policy-local-files/new_policies/Attribute_vNS_1.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "OSDF_FRANKFURT.Attribute_vNS_1": { - "type": "onap.policies.optimization.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/new_policies/Capacity_vGMuxInfra.json b/test/policy-local-files/new_policies/Capacity_vGMuxInfra.json deleted file mode 100644 index 1d6d26d..0000000 --- a/test/policy-local-files/new_policies/Capacity_vGMuxInfra.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "OSDF_FRANKFURT.Capacity_vGMuxInfra": { - "type": "onap.policies.optimization.Vim_fit", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.Capacity_vGMuxInfra", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vGMuxInfra" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "capacity_vGMuxInfra", - "applicableResources": "any", - "capacityProperty": { - "controller": "multicloud", - "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}" - } - } - } -} diff --git a/test/policy-local-files/new_policies/Capacity_vG_1.json b/test/policy-local-files/new_policies/Capacity_vG_1.json deleted file mode 100644 index f07e7bc..0000000 --- a/test/policy-local-files/new_policies/Capacity_vG_1.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "OSDF_FRANKFURT.Capacity_vG_1": { - "type": "onap.policies.optimization.Vim_fit", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.Capacity_vG_1", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "capacity_vG", - "applicableResources": "any", - "capacityProperty": { - "controller": "multicloud", - "request": "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}" - } - } - } -} diff --git a/test/policy-local-files/new_policies/Distance_vGMuxInfra_1.json b/test/policy-local-files/new_policies/Distance_vGMuxInfra_1.json deleted file mode 100644 index 7de102e..0000000 --- a/test/policy-local-files/new_policies/Distance_vGMuxInfra_1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "OSDF_FRANKFURT.Distance_vGMuxInfra": { - "type": "onap.policies.optimization.DistancePolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.Distance_vGMuxInfra", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vGMuxInfra" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "distance-vGMuxInfra", - "applicableResources": "any", - "distanceProperties": { - "locationInfo": "customer_loc", - "distance": { - "value": "500", - "operator": "<", - "unit": "km" - } - } - } - } -} diff --git a/test/policy-local-files/new_policies/Distance_vG_1.json b/test/policy-local-files/new_policies/Distance_vG_1.json deleted file mode 100644 index dcb45b2..0000000 --- a/test/policy-local-files/new_policies/Distance_vG_1.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "OSDF_FRANKFURT.Distance_vG_1": { - "type": "onap.policies.optimization.DistancePolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.Distance_vG_1", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "distance-vG", - "applicableResources": "any", - "distanceProperties": { - "locationInfo": "customer_loc", - "distance": { - "value": "1500", - "operator": "<", - "unit": "km" - } - } - } - } -} diff --git a/test/policy-local-files/new_policies/Placement_Optimization_1.json b/test/policy-local-files/new_policies/Placement_Optimization_1.json deleted file mode 100644 index b3efa64..0000000 --- a/test/policy-local-files/new_policies/Placement_Optimization_1.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "OSDF_FRANKFURT.Placement_optimization_1": { - "type": "onap.policies.optimization.OptimizationPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.Placement_optimization_1", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vG", - "vGMuxInfra" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "optimization", - "objective": "minimize", - "objectiveParameter": { - "parameterAttributes": [ - { - "resources": ["vGMuxInfra"], - "customerLocationInfo": "customer_loc", - "parameter": "distance", - "weight": "1", - "operator": "product" - }, - { - "resources": ["vG"], - "customerLocationInfo": "customer_loc", - "parameter": "distance", - "weight": "1", - "operator": "product" - }, - { - "resources": ["vG"], - "parameter": "hpa_score", - "weight": "200", - "operator": "product" - }, - { - "resources": ["vFW"], - "customerLocationInfo": "customer_loc", - "parameter": "distance", - "weight": "100", - "operator": "product" - }, - { - "resources": ["vFW"], - "parameter": "hpa_score", - "weight": "200", - "operator": "product" - } - ], - "operator": "sum" - } - } - } -} diff --git a/test/policy-local-files/new_policies/QueryPolicy_vCPE.json b/test/policy-local-files/new_policies/QueryPolicy_vCPE.json deleted file mode 100644 index 1a8d205..0000000 --- a/test/policy-local-files/new_policies/QueryPolicy_vCPE.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "OSDF_FRANKFURT.queryPolicy_vCPE": { - "type": "onap.policies.optimization.QueryPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vGMuxInfra", - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "vCPE_Query_Policy", - "queryProperties": [ - { - "attribute": "customerLatitude", - "attribute_location": "customerLatitude" - }, - { - "attribute": "customerLongitude", - "attribute_location": "customerLongitude" - } - ] - } - } -} diff --git a/test/policy-local-files/new_policies/QueryPolicy_vCPE_2.json b/test/policy-local-files/new_policies/QueryPolicy_vCPE_2.json deleted file mode 100644 index 7a4d227..0000000 --- a/test/policy-local-files/new_policies/QueryPolicy_vCPE_2.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "OSDF_FRANKFURT.queryPolicy_vCPE": { - "type": "onap.policies.optimization.QueryPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.queryPolicy_vCPE", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vGMuxInfra", - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "vCPE_Query_Policy", - "queryProperties": [ - { - "attribute": "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/new_policies/QueryPolicy_vFW_TD.json b/test/policy-local-files/new_policies/QueryPolicy_vFW_TD.json deleted file mode 100644 index 1a6eb21..0000000 --- a/test/policy-local-files/new_policies/QueryPolicy_vFW_TD.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "OSDF_FRANKFURT.queryPolicy_vFW_TD": { - "type": "onap.policies.optimization.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/new_policies/hpa_policy_vGMuxInfra_1.json b/test/policy-local-files/new_policies/hpa_policy_vGMuxInfra_1.json deleted file mode 100644 index c233c5f..0000000 --- a/test/policy-local-files/new_policies/hpa_policy_vGMuxInfra_1.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "OSDF_FRANKFURT.hpa_policy_vGMuxInfra_1": { - "type": "onap.policies.optimization.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", - "type": "vnfc", - "directives": [ - { - "type": "flavor_directives", - "attributes": [ - { - "attribute_name": "flavor_label_vm_01", - "attribute_value": "" - } - ] - } - ], - "flavorProperties": [ - { - "hpa-feature" : "cpuTopology", - "mandatory" : "True", - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "2","operator": ">=", "unit": ""}, - {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""}, - {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "2", "operator":">=", "unit": ""}, - {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""}, - {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "4", "operator":">=", "unit": ""}, - {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""} - ] - }, - { - "hpa-feature": "basicCapabilities", - "mandatory": true, - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "numVirtualCpu", - "hpa-attribute-value": 6, - "operator": [ - "=" - ], - "unit": "" - }, - { - "hpa-attribute-key": "virtualMemSize", - "hpa-attribute-value": 6, - "operator": [ - "=" - ], - "unit": "" - } - ] - }, - { - "hpa-feature": "ovsDpdk", - "mandatory": false, - "score": 3, - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "dataProcessingAccelerationLibrary", - "hpa-attribute-value": "ovsDpdk_version", - "operator": [ - "=" - ], - "unit": "" - } - ] - }, - { - "hpa-feature": "cpuInstructionSetExtensions", - "mandatory": true, - "architecture": "INTEL-64", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "instructionSetExtensions", - "hpa-attribute-value": [ - "", - "" - ], - "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":"", "operator": "=", "unit":""}, - {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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": "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": "", "operator": "=", "unit": ""} - ] - } - ] - } - ] - } - } -} diff --git a/test/policy-local-files/new_policies/hpa_policy_vG_1.json b/test/policy-local-files/new_policies/hpa_policy_vG_1.json deleted file mode 100644 index 4f9a7b4..0000000 --- a/test/policy-local-files/new_policies/hpa_policy_vG_1.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "OSDF_FRANKFURT.hpa_policy_vG_1": { - "type": "onap.policies.optimization.HpaPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.hpa_policy_vG_1", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "hpa-vG", - "flavorFeatures": [ - { - "id": "vg_1", - "type": "vnfc", - "directives": [ - { - "type": "flavor_directives", - "attributes": [ - { - "attribute_name": "flavor_label_vm_01", - "attribute_value": "" - } - ] - } - ], - "flavorProperties": [ - { - "hpa-feature" : "cpuTopology", - "mandatory" : "True", - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "2","operator": ">=", "unit": ""}, - {"hpa-attribute-key":"numCpuSockets", "hpa-attribute-value": "4","operator": "<=", "unit": ""}, - {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "2", "operator":">=", "unit": ""}, - {"hpa-attribute-key":"numCpuCores", "hpa-attribute-value": "4", "operator":"<=", "unit": ""}, - {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "4", "operator":">=", "unit": ""}, - {"hpa-attribute-key":"numCpuThreads", "hpa-attribute-value": "8", "operator":"<=", "unit": ""} - ] - }, - { - "hpa-feature": "basicCapabilities", - "mandatory": true, - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "numVirtualCpu", - "hpa-attribute-value": 6, - "operator": [ - "=" - ], - "unit": "" - }, - { - "hpa-attribute-key": "virtualMemSize", - "hpa-attribute-value": 6, - "operator": [ - "=" - ], - "unit": "" - } - ] - }, - { - "hpa-feature": "ovsDpdk", - "mandatory": false, - "score": 3, - "architecture": "generic", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "dataProcessingAccelerationLibrary", - "hpa-attribute-value": "ovsDpdk_version", - "operator": [ - "=" - ], - "unit": "" - } - ] - }, - { - "hpa-feature": "cpuInstructionSetExtensions", - "mandatory": true, - "architecture": "INTEL-64", - "directives": [], - "hpa-feature-attributes": [ - { - "hpa-attribute-key": "instructionSetExtensions", - "hpa-attribute-value": [ - "", - "" - ], - "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":"", "operator": "=", "unit":""}, - {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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": "", "operator": "=", "unit": ""} - ] - } - ] - } - ] - } - } -} diff --git a/test/policy-local-files/new_policies/meta-valid-policies.txt b/test/policy-local-files/new_policies/meta-valid-policies.txt deleted file mode 100644 index 5f969bf..0000000 --- a/test/policy-local-files/new_policies/meta-valid-policies.txt +++ /dev/null @@ -1,17 +0,0 @@ -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 -Attribute_vNS_1.json \ No newline at end of file diff --git a/test/policy-local-files/new_policies/subscriber_policy_vCPE.json b/test/policy-local-files/new_policies/subscriber_policy_vCPE.json deleted file mode 100644 index 305ce58..0000000 --- a/test/policy-local-files/new_policies/subscriber_policy_vCPE.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "OSDF_FRANKFURT.SubscriberPolicy_v1": { - "type": "onap.policies.optimization.SubscriberPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_v1", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "identity": "subscriber_vCPE", - "properties": { - "subscriberName": [ - "subscriber_x", - "subscriber_y" - ], - "subscriberRole": [ - "PVT Homing" - ], - "provStatus": [ - "CAPPED" - ] - } - } - } -} diff --git a/test/policy-local-files/new_policies/vnfPolicy_vFW_TD.json b/test/policy-local-files/new_policies/vnfPolicy_vFW_TD.json deleted file mode 100644 index 387ed56..0000000 --- a/test/policy-local-files/new_policies/vnfPolicy_vFW_TD.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "OSDF_FRANKFURT.vnfPolicy_vFW_TD": { - "type": "onap.policies.optimization.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/new_policies/vnfPolicy_vG.json b/test/policy-local-files/new_policies/vnfPolicy_vG.json deleted file mode 100644 index 786ffc2..0000000 --- a/test/policy-local-files/new_policies/vnfPolicy_vG.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "OSDF_FRANKFURT.vnfPolicy_vG": { - "type": "onap.policies.optimization.VnfPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.vnfPolicy_vG", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vG" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "vnf_vG", - "applicableResources": "any", - "vnfProperties": [ - { - "inventoryProvider": "aai", - "serviceType": "", - "inventoryType": "cloud", - "customerId": "", - "orchestrationStatus": "", - "equipmentRole": "" - } - ] - } - } -} diff --git a/test/policy-local-files/new_policies/vnfPolicy_vGMuxInfra.json b/test/policy-local-files/new_policies/vnfPolicy_vGMuxInfra.json deleted file mode 100644 index deb34fd..0000000 --- a/test/policy-local-files/new_policies/vnfPolicy_vGMuxInfra.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra": { - "type": "onap.policies.optimization.VnfPolicy", - "version": "1.0.0", - "type_version": "1.0.0", - "metadata": { - "policy-id": "OSDF_FRANKFURT.vnfPolicy_vGMuxInfra", - "policy-version": 1 - }, - "properties": { - "scope": [ - "OSDF_FRANKFURT" - ], - "services": [ - "vCPE" - ], - "resources": [ - "vGMuxInfra" - ], - "geography": [ - "US", - "INTERNATIONAL" - ], - "identity": "vnf_vGMuxInfra", - "applicableResources": "any", - "vnfProperties": [ - { - "inventoryProvider": "aai", - "serviceType": "vGMuxInfra-xx", - "inventoryType": "service", - "customerId": "SDN-ETHERNET-INTERNET", - "orchestrationStatus": "", - "equipmentRole": "" - } - ] - } - } -} diff --git a/test/policy-local-files/new_policies/vnfPolicy_vPGN_TD.json b/test/policy-local-files/new_policies/vnfPolicy_vPGN_TD.json deleted file mode 100644 index c441156..0000000 --- a/test/policy-local-files/new_policies/vnfPolicy_vPGN_TD.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "OSDF_FRANKFURT.vnfPolicy_vPGN_TD": { - "type": "onap.policies.optimization.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" - } - } - ] - } - } -} 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":["", ""], "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":"", "operator": "=", "unit":""}, + {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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": "","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": "", "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":["", ""], "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":"", "operator": "=", "unit":""}, + {"hpa-attribute-key":"logicalCpuPinningPolicy", "hpa-attribute-value": "","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": "", "operator": "=", "unit": ""} + ] + } + ] + } + ] + } +} diff --git a/test/policy-local-files/old-policies/subscriber_policy_vCPE.json b/test/policy-local-files/old-policies/subscriber_policy_vCPE.json new file mode 100644 index 0000000..9359c20 --- /dev/null +++ b/test/policy-local-files/old-policies/subscriber_policy_vCPE.json @@ -0,0 +1,22 @@ +{ + "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_vCPE", + "policyScope": ["vCPE", "subscriber_x", "subscriber_y", "subscriberPolicy"], + "properties": { + "subscriberName": ["subscriber_x", "subscriber_y"], + "subscriberRole": ["PVT Homing"], + "provStatus": ["CAPPED"] + }, + "policyType": "subscriberPolicy", + "serviceName": "vCPE" + } +} 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/subscriber_policy_vCPE.json b/test/policy-local-files/subscriber_policy_vCPE.json index 9359c20..305ce58 100644 --- a/test/policy-local-files/subscriber_policy_vCPE.json +++ b/test/policy-local-files/subscriber_policy_vCPE.json @@ -1,22 +1,32 @@ { - "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_vCPE", - "policyScope": ["vCPE", "subscriber_x", "subscriber_y", "subscriberPolicy"], - "properties": { - "subscriberName": ["subscriber_x", "subscriber_y"], - "subscriberRole": ["PVT Homing"], - "provStatus": ["CAPPED"] - }, - "policyType": "subscriberPolicy", - "serviceName": "vCPE" + "OSDF_FRANKFURT.SubscriberPolicy_v1": { + "type": "onap.policies.optimization.SubscriberPolicy", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "OSDF_FRANKFURT.SubscriberPolicy_v1", + "policy-version": 1 + }, + "properties": { + "scope": [ + "OSDF_FRANKFURT" + ], + "services": [ + "vCPE" + ], + "identity": "subscriber_vCPE", + "properties": { + "subscriberName": [ + "subscriber_x", + "subscriber_y" + ], + "subscriberRole": [ + "PVT Homing" + ], + "provStatus": [ + "CAPPED" + ] + } } + } } diff --git a/test/policy-local-files/subscriber_policy_vFW.json b/test/policy-local-files/subscriber_policy_vFW.json deleted file mode 100644 index 299da04..0000000 --- a/test/policy-local-files/subscriber_policy_vFW.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/vnfPolicy_vFW.json b/test/policy-local-files/vnfPolicy_vFW.json deleted file mode 100644 index 0b7d9a2..0000000 --- a/test/policy-local-files/vnfPolicy_vFW.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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/vnfPolicy_vFW_TD.json b/test/policy-local-files/vnfPolicy_vFW_TD.json index a471a77..387ed56 100644 --- a/test/policy-local-files/vnfPolicy_vFW_TD.json +++ b/test/policy-local-files/vnfPolicy_vFW_TD.json @@ -1,44 +1,47 @@ { - "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" - } - }] + "OSDF_FRANKFURT.vnfPolicy_vFW_TD": { + "type": "onap.policies.optimization.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 b047686..786ffc2 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_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.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 45d67f6..deb34fd 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_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.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 index 2e79f2f..c441156 100644 --- a/test/policy-local-files/vnfPolicy_vPGN_TD.json +++ b/test/policy-local-files/vnfPolicy_vPGN_TD.json @@ -1,51 +1,52 @@ { - "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" + "OSDF_FRANKFURT.vnfPolicy_vPGN_TD": { + "type": "onap.policies.optimization.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" }, - "service_instance_id": { - "get_param": "service_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" } - }, - "passthroughAttributes": { - "td-role": "anchor" } - } - ] + ] + } } -} \ No newline at end of file +} -- cgit 1.2.3-korg