Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titleBase Policy type definition for onap.policies.controlloop.Guard
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
  onap.policies.controlloop.Guard:
    derived_from: tosca.policies.Root
    version: 1.0.0
    description: Base definition of guard Policies for Control Loop Operational Policies
    properties:
        actor:
          type: string
          description: Specifies the Actor
          required: true
        recipeoperation:
          type: string
          description: Specified the Recipe
          required: true
        controlLoopName:
          type: string
          description: An optional specific control loop to apply this guard policy.
          required: false
        target:
          type: string
          description: An optional specific VNF to apply this guard to.
          required: false
        time_range:
          type: tosca.datatypes.TimeInterval
          description: An optional range of time during the day the Min/Max limit is valid for.
          required: false

...

Code Block
languageyml
titleExample Policy
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
   policies:
      -
        operational.scaleout:
           type: onap.policies.controlloop.Operational
           version: 1.0.0
           metadata:
             policy-id: operational.scaleout
           properties:
             controlLoopName: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
             triggerOperation: unique-policy-id-1-scale-up
             timeout: 1200
             abatement: false
             operations:
               - id: unique-policy-id-1-scale-up
                 name: Create a new VF Module
                 description:
                 actor: SO
                 operation: VF Module Create
                 target:
                   target: VNF
                 payload:
                   requestParameters: '{"usePreload":true,"userParams":[]}'
                   configurationParameters: '[{"ip-addr":"$.vf-module-topology.vf-module-parameters.param[9]","oam-ip-addr":"$.vf-module-topology.vf-module-parameters.param[16]","enabled":"$.vf-module-topology.vf-module-parameters.param[23]"}]'
                 retry: 0
                 timeout: 1200
                 success: final_success
                 failure: final_failure
                 failure_timeout: final_failure_timeout
                 failure_retries: final_failure_retries
                 failure_exception: final_failure_exception
                 failure_guard: final_failure_guard

2.2 Mapping using TOSCA Triggers

Code Block




 

Issue: The "policies" property can be confusing with the TOSCA Topology Template value "policies".

  • Pamela Dragosh  - use "operations" instead since it really is a set of operations that are really being enforced.

Issue: How to ensure that CLAMP does not have to hard-code the meaning of properties. Specifically, success, failure, failure_timeout etc. - need to point to other actor/recipe's to be triggered/executed.

...

https://gerrit.onap.org/r/gitweb?p=clamp.git;a=blob;f=src/main/resources/clds/json-schema/operational_policies/operational_policy.json;h=93738c80923be027781b9c2bf0fe72cfa82d7fec;hb=HEAD

 

Issue: TOSCA Constraints would be nice to have something with suggested values, so the policy isn't locked into a set of values. Example is "actors" - ONAP has a set of actors, but it would be nice to be able to extend to other internal actors companies support.

Code Block
# REST of policy ommitted for brevity

    onap.datatype.controlloop.operationalpolicies:
        derived_from: tosca.datatypes.Root
        version: 1.0.0
        description: Policy definitions for taking actions during a Control Loop event
        properties:
            # other properties ommitted for brevity
            actor:
                type: String
                description: The actor that will perform the operation
                required: true
				constraints:
					possible_values: [SO, SDNC, APPC, VFC, SNDR, CDS]

Issue: TOSCA does NOT have a way to relate properties together. For example, if the actor property is selected as APPC, then the contraints (eg possible values) for the operation property SHOULD be "restart", "reboot", "modifyConfig". How can that be specified?

Issue: Can/Should we consolidate onap.policies.Operational into a common policy type and then allow Drools and Apex (or be extendable to companies ingesting ONAP) to be derived_from that policy.