aboutsummaryrefslogtreecommitdiffstats
path: root/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-11-03 17:42:09 -0500
committerPamela Dragosh <pdragosh@research.att.com>2019-11-04 08:45:32 -0500
commit1bedb591cc68c10c7db916fda8a3f02d67c2314d (patch)
tree42984cf2c3668f95cf84b721e80d0ed91d79a7e7 /applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml
parent3c1ae81a9c05ee9bfbb76bb23a2d2d75013d37ae (diff)
More examples of optimization policies and cleanup
Fixed a couple of sonar issues - log exception and do not nest more 3 if-else-try. Cleaned up the JUnit test to make debugging a bit easier. Added more examples for testing optimization tests. Moved the target back into the Policy and kept the Condition on the Rule. Works exactly the same, just a bit cleaner and one less rule to deal with. Issue-ID: POLICY-2066 Change-Id: Ife28dc2ce959dcf1fb8ca72061ebc5dca862a7f4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml')
-rw-r--r--applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml94
1 files changed, 89 insertions, 5 deletions
diff --git a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml b/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml
index 919a2f8b..093156c6 100644
--- a/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml
+++ b/applications/optimization/src/test/resources/vCPE.policies.optimization.input.tosca.yaml
@@ -38,12 +38,12 @@ topology_template:
qualifier: same
category: complex
-
- OSDF_CASABLANCA.Affinity_Default_vCPE_0:
+ OSDF_CASABLANCA.Affinity_Default_vCPE_US_0:
type: onap.policies.optimization.AffinityPolicy
version: 1.0.0
type_version: 1.0.0
metadata:
- policy-id: OSDF_CASABLANCA.Affinity_Default_vCPE_0
+ policy-id: OSDF_CASABLANCA.Affinity_Default_vCPE_US_0
policy-version: 1
properties:
scope: []
@@ -56,7 +56,7 @@ topology_template:
qualifier: different
category: complex
-
- OSDF_CASABLANCA.Affinity_vCPE_1:
+ OSDF_CASABLANCA.Affinity_vCPE_US_Gold_1:
type: onap.policies.optimization.AffinityPolicy
version: 1.0.0
type_version: 1.0.0
@@ -64,7 +64,7 @@ topology_template:
policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
policy-version: 1
properties:
- scope: [gold, platinum]
+ scope: [gold]
services: [vCPE]
resources: [vGMuxInfra, vG]
geography: [US, INTERNATIONAL]
@@ -74,6 +74,24 @@ topology_template:
qualifier: same
category: availabilityZone
-
+ OSDF_CASABLANCA.Affinity_vCPE_US_Platinum_1:
+ type: onap.policies.optimization.AffinityPolicy
+ version: 1.0.0
+ type_version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.Affinity_vCPE_1
+ policy-version: 1
+ properties:
+ scope: [platinum]
+ services: [vCPE]
+ resources: [vGMuxInfra, vG]
+ geography: [US, INTERNATIONAL]
+ identity: affinity_vCPE
+ applicableResources: any
+ affinityProperties:
+ qualifier: different
+ category: availabilityZone
+ -
OSDF_CASABLANCA.Capacity_vG_1:
type: onap.policies.optimization.Vim_fit
version: 1.0.0
@@ -92,6 +110,24 @@ topology_template:
controller: multicloud
request: "{\"vCPU\": 10, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"GB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
-
+ OSDF_CASABLANCA.Capacity_vG_2:
+ type: onap.policies.optimization.Vim_fit
+ version: 1.0.0
+ type_version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.Capacity_vG_2
+ policy-version: 1
+ properties:
+ scope: []
+ services: [vCPE]
+ resources: [vG]
+ geography: [US, INTERNATIONAL]
+ identity: capacity_vG
+ applicableResources: any
+ capacityProperty:
+ controller: multicloud
+ request: "{\"vCPU\": 15, \"Memory\": {\"quantity\": {\"get_param\": \"REQUIRED_MEM\"}, \"unit\": \"MB\"}, \"Storage\": {\"quantity\": {\"get_param\": \"REQUIRED_DISK\"}, \"unit\": \"GB\"}}"
+ -
OSDF_CASABLANCA.Distance_vG_1:
type: onap.policies.optimization.DistancePolicy
version: 1.0.0
@@ -113,6 +149,54 @@ topology_template:
operator: "<"
unit: km
-
+ OSDF_CASABLANCA.hpa_policy_Default:
+ type: onap.policies.optimization.HpaPolicy
+ version: 1.0.0
+ type_version: 1.0.0
+ metadata:
+ policy-id: OSDF_CASABLANCA.hpa_policy_Default
+ policy-version: 1
+ properties:
+ scope: []
+ services: []
+ resources: []
+ geography: []
+ 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: 8
+ operator: ['>=']
+ unit: ""
+ - hpa-attribute-key: virtualMemSize
+ hpa-attribute-value: 6
+ 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.hpa_policy_vG_1:
type: onap.policies.optimization.HpaPolicy
version: 1.0.0
@@ -122,7 +206,7 @@ topology_template:
policy-version: 1
properties:
scope: []
- services: [vCPE]
+ services: [vCPE, vOtherService]
resources: [vG]
geography: []
identity: hpa-vG