summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/test/resources/policies/vCPE.policies.optimization.input.tosca.yaml173
-rw-r--r--main/src/test/resources/policytypes/onap.policies.Optimization.yaml39
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml45
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml40
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml44
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml27
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.PciPolicy.yaml32
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml27
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml33
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.Vim_fit.yaml34
-rw-r--r--main/src/test/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml32
11 files changed, 239 insertions, 287 deletions
diff --git a/main/src/test/resources/policies/vCPE.policies.optimization.input.tosca.yaml b/main/src/test/resources/policies/vCPE.policies.optimization.input.tosca.yaml
new file mode 100644
index 00000000..17f20dfd
--- /dev/null
+++ b/main/src/test/resources/policies/vCPE.policies.optimization.input.tosca.yaml
@@ -0,0 +1,173 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+topology_template:
+ policies:
+ -
+ OSDF_CASABLANCA.Affinity_vCPE_1:
+ type: onap.policies.optimization.AffinityPolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ resources: [vGMuxInfra, vG]
+ geography: [US, INTERNATIONAL]
+ identity: affinity_vCPE
+ applicableResources: any
+ affinityProperties:
+ qualifier: same
+ category: complex
+ -
+ OSDF_CASABLANCA.Capacity_vG_1:
+ type: onap.policies.optimization.Vim_fit
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.Capacity_vG_1
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ resources: [vG]
+ geography: [US, INTERNATIONAL]
+ identity: capacity_vG
+ applicableResources: any
+ capacityProperty:
+ controller: multicloud
+ request: "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ -
+ OSDF_CASABLANCA.Distance_vG_1:
+ type: onap.policies.optimization.DistancePolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.Distance_vG_1
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ resources: [vG]
+ geography: [US, INTERNATIONAL]
+ identity: distance-vG
+ applicableResources: any
+ distanceProperties:
+ locationInfo: customer_loc
+ distance:
+ value: 1500
+ operator: "<"
+ unit: km
+ -
+ OSDF_CASABLANCA.hpa_policy_vG_1:
+ type: onap.policies.optimization.HpaPolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.hpa_policy_vG_1
+ policy-version: 1
+ properties:
+ scope: []
+ 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: 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: 4
+ operator: ['<=']
+ unit: ""
+ -
+ hpa-feature: ovsDpdk
+ mandatory: False
+ architecture: generic
+ directives: []
+ hpa-feature-attributes:
+ - hpa-attribute-key: dataProcessingAccelerationLibrary
+ hpa-attribute-value: ovsDpdk_version
+ operator: [=]
+ unit: ""
+ -
+ OSDF_CASABLANCA.queryPolicy_vCPE:
+ type: onap.policies.optimization.QueryPolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.queryPolicy_vCPE
+ policy-version: 1
+ properties:
+ scope: []
+ 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
+ -
+ OSDF_CASABLANCA.SubscriberPolicy_v1:
+ type: onap.policies.optimization.SubscriberPolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.SubscriberPolicy_v1
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ identity: subscriber_vCPE
+ properties:
+ subscriberName: [subscriber_x, subscriber_y]
+ subscriberRole: ["PVT Homing"]
+ provStatus: [CAPPED]
+ -
+ OSDF_CASABLANCA.vnfPolicy_vG:
+ type: onap.policies.optimization.VnfPolicy
+ version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.vnfPolicy_vG
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ resources: [vG]
+ geography: [US, INTERNATIONAL]
+ identity: vnf_vG
+ applicableResources: any
+ vnfProperties:
+ -
+ inventoryProvider: aai
+ serviceType: ""
+ inventoryType: cloudRegionId
+ customerId: ""
diff --git a/main/src/test/resources/policytypes/onap.policies.Optimization.yaml b/main/src/test/resources/policytypes/onap.policies.Optimization.yaml
new file mode 100644
index 00000000..62f2c6f2
--- /dev/null
+++ b/main/src/test/resources/policytypes/onap.policies.Optimization.yaml
@@ -0,0 +1,39 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+policy_types:
+ onap.policies.Optimization:
+ derived_from: tosca.policies.Root
+ version: 1.0.0
+ description: The base policy type for all policies that govern optimization
+ properties:
+ scope:
+ description: Scope for the policy - could be for a specific release.
+ type: string
+ matchable: true
+ required: true
+ services:
+ description: One or more services that the policy applies to.
+ type: list
+ matchable: true
+ required: true
+ entry_schema:
+ type: string
+ resources:
+ description: One or more VNF resources that the policy applies to.
+ type: list
+ matchable: true
+ required: true
+ entry_schema:
+ type: string
+ geography:
+ description: One or more geographic regions
+ type: list
+ matchable: true
+ required: true
+ entry_schema:
+ type: string
+ constraints:
+ - valid_values: ["US", "International"]
+ identity:
+ description: Used internally for identification
+ type: string
+ required: true
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml
index 415e05e2..f0d47ed6 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.AffinityPolicy.yaml
@@ -1,32 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.AffinityPolicy:
+ onap.policies.optimization.AffinityPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - zone
- identity:
- type: string
- required: true
applicableResources:
type: list
required: true
@@ -39,25 +15,16 @@ policy_types:
affinityProperties:
type: policy.data.affinityProperties_properties
required: true
- resources:
- type: list
- required: true
- entry_schema:
- type: string
data_types:
- -
policy.data.affinityProperties_properties:
derived_from: tosca.nodes.Root
properties:
qualifier:
- type: list
- required: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - same
- - different
+ type: string
+ constraints:
+ - valid_values:
+ - same
+ - different
category:
type: string
required: true
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml
index a0571bc1..9bcdd7a6 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.DistancePolicy.yaml
@@ -1,37 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.DistancePolicy:
+ onap.policies.optimization.DistancePolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - distance_to_location
- identity:
- type: string
- required: true
- resources:
- type: list
- required: true
- entry_schema:
- type: string
applicableResources:
type: list
required: true
@@ -45,7 +16,6 @@ policy_types:
type: policy.data.distanceProperties_properties
required: true
data_types:
- -
policy.data.distanceProperties_properties:
derived_from: tosca.nodes.Root
properties:
@@ -55,6 +25,8 @@ data_types:
distance:
type: policy.data.distance_properties
required: true
+ entry_schema:
+ type: policy.data.distance_properties
policy.data.distance_properties:
derived_from: tosca.nodes.Root
properties:
@@ -70,9 +42,9 @@ data_types:
- valid_values:
- <
- <=
- - '>'
- - '>='
- - '='
+ - >
+ - >=
+ - =
unit:
type: list
required: true
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml
index e9e5436f..21a2e722 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.HpaPolicy.yaml
@@ -1,44 +1,14 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.HpaPolicy:
+ onap.policies.optimization.HpaPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - hpa
- resources:
- type: list
- required: true
- entry_schema:
- type: string
- identity:
- type: string
- required: true
flavorFeatures:
type: list
required: true
entry_schema:
type: policy.data.flavorFeatures_properties
data_types:
- -
policy.data.flavorFeatures_properties:
derived_from: tosca.nodes.Root
properties:
@@ -58,7 +28,6 @@ data_types:
required: true
entry_schema:
type: policy.data.flavorProperties_properties
- -
policy.data.directives_properties:
derived_from: tosca.nodes.Root
properties:
@@ -68,7 +37,6 @@ data_types:
type: list
entry_schema:
type: policy.data.directives_attributes_properties
- -
policy.data.directives_attributes_properties:
derived_from: tosca.nodes.Root
properties:
@@ -76,7 +44,6 @@ data_types:
type: string
attribute_value:
type: string
- -
policy.data.flavorProperties_properties:
derived_from: tosca.nodes.Root
properties:
@@ -105,7 +72,6 @@ data_types:
required: true
entry_schema:
type: policy.data.hpa-feature-attributes_properties
- -
policy.data.hpa-feature-attributes_properties:
derived_from: tosca.nodes.Root
properties:
@@ -124,10 +90,10 @@ data_types:
- valid_values:
- <
- <=
- - '>'
- - '>='
- - '='
- - '!='
+ - >
+ - >=
+ - =
+ - !=
- any
- all
- subset
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml
index cccd0b50..76bc550d 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.OptimizationPolicy.yaml
@@ -1,32 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.OptimizationPolicy:
+ onap.policies.optimization.OptimizationPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - placement_optimization
- identity:
- type: string
- required: true
objective:
type: list
required: true
@@ -40,7 +16,6 @@ policy_types:
type: policy.data.objectiveParameter_properties
required: true
data_types:
- -
policy.data.objectiveParameter_properties:
derived_from: tosca.nodes.Root
properties:
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.PciPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.PciPolicy.yaml
index 2cc6d418..81187964 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.PciPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.PciPolicy.yaml
@@ -1,44 +1,14 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.PciPolicy:
+ onap.policies.optimization.PciPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - pciPolicy
- identity:
- type: string
- required: true
- resources:
- type: list
- required: true
- entry_schema:
- type: string
pciProperties:
type: list
required: false
entry_schema:
type: policy.data.pciProperties_properties
data_types:
- -
policy.data.pciProperties_properties:
derived_from: tosca.nodes.Root
properties:
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml
index 7c54a8d0..7f85c777 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.QueryPolicy.yaml
@@ -1,39 +1,14 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.QueryPolicy:
+ onap.policies.optimization.QueryPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - request_param_query
- identity:
- type: string
- required: true
queryProperties:
type: list
required: true
entry_schema:
type: policy.data.queryProperties_properties
data_types:
- -
policy.data.queryProperties_properties:
derived_from: tosca.nodes.Root
properties:
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml
index 294dcdf4..6b24fbc9 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.SubscriberPolicy.yaml
@@ -1,38 +1,13 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.SubscriberPolicy:
+ onap.policies.optimization.SubscriberPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - subscriberPolicy
- identity:
- type: string
- required: true
- properties:
- type: policy.data.properties_properties
+ subscriberProperties:
+ type: policy.data.subscriberProperties_properties
required: true
data_types:
- -
- policy.data.properties_properties:
+ policy.data.subscriberProperties_properties:
derived_from: tosca.nodes.Root
properties:
subscriberName:
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.Vim_fit.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.Vim_fit.yaml
index e4dc5009..2d35741a 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.Vim_fit.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.Vim_fit.yaml
@@ -1,32 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.Vim_fit:
+ onap.policies.optimization.Vim_fit:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - vim_fit
- identity:
- type: string
- required: true
applicableResources:
type: list
required: true
@@ -36,16 +12,10 @@ policy_types:
- valid_values:
- any
- all
- resources:
- type: list
- required: true
- entry_schema:
- type: string
- capacityProperties:
+ capacityProperties:
type: policy.data.capacityProperties_properties
required: true
data_types:
- -
policy.data.capacityProperties_properties:
derived_from: tosca.nodes.Root
properties:
diff --git a/main/src/test/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml b/main/src/test/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml
index 009df412..3ee62483 100644
--- a/main/src/test/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml
+++ b/main/src/test/resources/policytypes/onap.policies.optimization.VnfPolicy.yaml
@@ -1,37 +1,8 @@
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
- - onap.policies.Optimization:
- derived_from: tosca.policies.Root
- version: 1.0.0
- description: a base policy type for all policies that govern optimization
- - onap.policies.optimization.VnfPolicy:
+ onap.policies.optimization.VnfPolicy:
derived_from: onap.policies.Optimization
properties:
- policyScope:
- type: list
- description: scope where the policy is applicable
- required: true
- matchable: true
- entry_schema:
- type: string
- policyType:
- type: list
- description: type of a policy
- required: true
- matchable: true
- entry_schema:
- type: string
- constraints:
- - valid_values:
- - vnfPolicy
- identity:
- type: string
- required: true
- resources:
- type: list
- required: true
- entry_schema:
- type: string
applicableResources:
type: list
required: true
@@ -47,7 +18,6 @@ policy_types:
entry_schema:
type: policy.data.vnfProperties_properties
data_types:
- -
policy.data.vnfProperties_properties:
derived_from: tosca.nodes.Root
properties: