Merge "Add optional controllerName in Op. Legacy Policies"
authorJorge Hernandez <jorge.hernandez-herrero@att.com>
Mon, 9 Mar 2020 22:25:16 +0000 (22:25 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 9 Mar 2020 22:25:16 +0000 (22:25 +0000)
models-examples/src/main/resources/policies/vDNS.policy.guard.blacklist.input.tosca.yaml [new file with mode: 0644]
models-examples/src/main/resources/policies/vDNS.policy.guard.minmaxvnfs.input.tosca.yaml
models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.Blacklist.yaml
models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.FrequencyLimiter.yaml
models-examples/src/main/resources/policytypes/onap.policies.controlloop.guard.common.MinMax.yaml

diff --git a/models-examples/src/main/resources/policies/vDNS.policy.guard.blacklist.input.tosca.yaml b/models-examples/src/main/resources/policies/vDNS.policy.guard.blacklist.input.tosca.yaml
new file mode 100644 (file)
index 0000000..78a2de6
--- /dev/null
@@ -0,0 +1,15 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+    policies:
+    -   guard.blacklist.scaleout:
+            type: onap.policies.controlloop.guard.common.Blacklist
+            type_version: 1.0.0
+            version: 1.0.0
+            metadata:
+                policy-id: guard.blacklist.scaleout
+            properties:
+                actor: SO
+                operation: VF Module Create
+                id: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+                blacklist:
+                - the-vfmodule-where-root-is-true
\ No newline at end of file
index dafc524..4c3afb7 100644 (file)
@@ -1,16 +1,16 @@
 tosca_definitions_version: tosca_simple_yaml_1_1_0
 topology_template:
-  policies:
-    -
-      guard.minmax.scaleout:
-        type: onap.policies.controlloop.guard.common.MinMax
-        type_version: 1.0.0
-        version: 1.0.0
-        metadata:
-          policy-id : guard.minmax.scaleout
-        properties:
-          actor: SO
-          operation: VF Module Create
-          id: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
-          min: 1
-          max: 2
\ No newline at end of file
+    policies:
+    -   guard.minmax.scaleout:
+            type: onap.policies.controlloop.guard.common.MinMax
+            type_version: 1.0.0
+            version: 1.0.0
+            metadata:
+                policy-id: guard.minmax.scaleout
+            properties:
+                actor: SO
+                operation: VF Module Create
+                id: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
+                target: e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e
+                min: 1
+                max: 2
\ No newline at end of file
index 058066c..0456f43 100644 (file)
@@ -8,7 +8,7 @@ policy_types:
         properties:
             blacklist:
                 type: list
-                description: List of entity id's
+                description: List of entity id's not allowed to have control loop operations on.
                 required: true
                 entry_schema:
                     type: string
\ No newline at end of file
index af8efe8..bda3e4c 100644 (file)
@@ -13,6 +13,7 @@ policy_types:
             timeUnits:
                 type: string
                 description: The units of time the window is counting.
+                required: true
                 constraints:
                 - valid_values: ["second", "minute", "hour", "day", "week", "month", "year"]
             limit:
index 2575151..fb376d4 100644 (file)
@@ -4,11 +4,17 @@ policy_types:
         derived_from: onap.policies.controlloop.guard.Common
         type_version: 1.0.0
         version: 1.0.0
-        description: Supports Min/Max number of entity for scaling operations
+        description: |
+            Supports Min/Max number of entity for scaling operations. Although min and max fields are marked as not
+            required, you need to have at least one or the other.
         properties:
+            target:
+                type: string
+                required: true
+                description: The target entity that has scaling restricted
             min:
                 type: integer
-                required: true
+                required: false
                 description: The minimum instances of this entity
             max:
                 type: integer