diff options
author | 2019-07-11 09:58:27 -0400 | |
---|---|---|
committer | 2019-08-30 07:16:46 -0400 | |
commit | 736fee18e6df968ed3fde55c94099302477b5b0e (patch) | |
tree | dec9135d578edd956bcc6753c89095f54a820b16 /main/src/test/resources/policytypes | |
parent | ce8774ca895526d27f9aa0ba347901fdf9c9637f (diff) |
Update optimization policy type
Per work with Optimization team, identifying common attributes for matchable
optimization policies.
Fixed TOSCA syntax errors - use map instead of list.
Removed identity from PciPolicy, QueryPolicy and OptimizationPolicy.
Added example of how vCPE policies now look.
Updated the example for HPA Policy based on Ruoyo input. Fixed syntax
errors due to JSON conversion. Trailing spaces.
Added back in list for applicableResources and required scope attribute
for example policies.
Issue-ID: POLICY-1899
Change-Id: Ic8ae6db0575fb21fca6103ab2ed015c8524def80
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'main/src/test/resources/policytypes')
10 files changed, 66 insertions, 287 deletions
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: |