Versions Compared

Key

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

...

Code Block
languagejs
titleMapping of existing Operational policy to TOSCA Policy Type
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
    type: onap.policies.controlloop.operational.Simple
.Common:
        derived_from: tosca.policies.Root
        version: 12.0.0
        description: Operational Policy for Control Loop execution
        properties:
            controlLoopNameid:
                type: String
                description: The unique control loop id
                required: true
            timeout:
                type: Integer
                description: Overall timeout for executing all the operations.
 in  the policy.
            required: true
            abatement:
                type: Boolean
                description: Whether an abatement will be expected for the control loop.
                required: true
            default: false
   default: false
    triggerOperationId:
         operation:
   type: String
            description: Id of theInitial operation to beexecute triggered whenupon receiving an Onset event
 for the Control Loop.
        required: true
       required: operations:true
            type: list
   entry_schema:
         description: List of operations executed upon receiving an Onset event for the Control Loop.type: onap.datatype.controlloop.operation.Directive

    onap.policies.controlloop.operational.Apex:
        requiredderived_from: trueonap.policies.controlloop.operational.Common
            entry_schema:version: 1.0.0
        description: Operational policies for     type: onap.datatype.controlloop.operation.directiveApex PDP
                
data_types:properties:

    onap.datatypepolicies.controlloop.operational.targettypeDrools:
        derived_from: tosca.datatypes.Rootonap.policies.controlloop.operational.Common
        version: 1.0.0
        description: DefinitionOperational of the target type policies for operations during control loopsDrools PDP
        properties:
            targetcontroller:
                typedescription: Drools controller Stringproperties
                descriptionrequired: The type target the operation is performed against.
true
                entry_schema:
    required: true
               type: constraints:onap.datatype:controlloop.controller.Drools
                    valid_values: [VNF, VM, VNFC, VFMODULE, PNF]
       
data_types:
     resourcesonap.datatype:controlloop.controller.Drools:
        derived_from: tosca.datatypes.Root
       type version: String1.0.0
        description: Definition of the target type for operations during description:control |loops
        properties:
        
    The resource in which the operation is be performed against. By default,
onap.datatype.controlloop.TargetType:
        derived_from: tosca.datatypes.Root
        version: 1.0.0
        description: Definition of the target antype onsetfor eventoperations willduring containcontrol resourceloops
 identification which should be used
   properties:
            target:
     for    the operation (if applicable) if this field istype: missing.String
                description: The type target 
the operation is performed onap.datatype.controlloop.operation:against.
        derived_from: tosca.datatypes.Root
        versionrequired: 1.0.0
true
          description: An operation supported by an actorconstraints:
        properties:
            idvalid_values:
 [VNF, VM, VNFC, VFMODULE, PNF]
            typeresources: String
                descriptiontype: Unique identifier for the operationString
                requireddescription: true|
             targettype:
       The resource in which the operation is be performed description:against. TheBy targetdefault,
 type supported by the operation
               an required:onset true
event will contain resource identification which should be used
        entry_schema:
            for the operation (if applicable) if this field type: onap.datatype.controlloop.targettypeis missing.
            parameters:
        
        type: Map
onap.datatype.controlloop.Operation:
        derived_from: tosca.datatypes.Root
        description: Optional parameters required by the operation
        version: 1.0.0
        description: An operation supported by an actor
        requiredproperties: false
            payloadid:
                type: MapString
                description: OptionalUnique payloadidentifier thatfor isthe passedoperation
 from the policy to the actor for operation execution.
    
    onap.datatype.controlloop.actor:required: true
        derived_from: tosca.datatypes.Root
        version: 1.0.0targettype:
        description: Actor involved in executing operations in a control loop
        properties:
            id: description: The target type supported by the operation
                typerequired: Stringtrue
                description: Unique identifier for the actor
entry_schema:
                    requiredtype: trueonap.datatype.controlloop.TargetType
            descriptionparameters:
                type: StringMap
                description: Optional parameters descriptionrequired ofby the actoroperation
                required: false
            operationspayload:
                type: ListMap
                description: List of operations available forOptional payload that is passed from the policy to the actor for operation execution.
    
    onap.datatype.controlloop.operation.Directive:
        requiredderived_from: truetosca.datatypes.Root
        version: 1.0.0
        entry_schemadescription:
 Policy definitions for taking actions during a Control Loop event
          type: onap.datatype.controlloop.operationproperties:
            id:
            
    type: String
        
    
    onap.datatype.controlloop.operation.directive:description: Unique ID for the operation
        derived_from: tosca.datatypes.Root
        versionrequired: 1.0.0
true
            description: Policy definitions for taking actions during a Control Loop event

                type: String
         properties:
       description: A user-friendly description of id:the directive
                typerequired: Stringfalse
            actor:
    description: ID for the policy. Used by triggerPolicy and final_* events to indicate next policy to enforce.    description: The actor that will perform the operation
                required: true
                entry_schema:
              description:
      type: onap.nodetype.controlloop.Actor
            operation:
                description: The   type: String
                description: A user-friendly description of the policyoperation the actor should perform on the target
                required: true
                entry_schema:
                    type: onap.datatype.controlloop.operation
            target:
                description: The target this operation is performed against
                required: true
                entry_schema:
                    type: onap.datatype.controlloop.targettype
            timeout:
                type: Integer
                description: The amount of time for the actor to perform the operation.
                required: true
            retries:
                type: Integer
                description: The number of retries the actor should attempt to perform the operation.
                required: true
                default: 0
            success: 
                description: Points to the operation to invoke on success.
                required: false
                default: final_success
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive
            failure:
                description: Points to the operation to invoke on Actor operation failure.
                required: false
                default: final_failure
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive
            failure_timeout:
                description: Points to the operation to invoke when the time out for the operation occurs.
                required: false
                default: final_failure_timeout
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive
            failure_retries:
                description: Points to the operation to invoke when the current operation has exceeded its max retries.
                required: false
                default: final_failure_retries
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive
            failure_exception: 
                description: Points to the operation to invoke when the current operation causes an exception.
                required: false
                default: final_failure_exception
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive
            failure_guard: 
                description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
                required: false
                default: final_failure_guard     
                entry_schema:
                    type: onap.datatype.controlloop.operation.directive

node_types:
    onap.nodetype.controlloop.Actor:
        derived_from: tosca.nodes.Root
        version: 1.0.0
        description: Actor involved in executing operations in a control loop
        properties:
            id:
    required: false
           type: actor:String
                description: TheUnique actoridentifier thatfor will perform the operationactor
                required: true
        capabilities:
        entry_schema:
    operation:
                type: onap.datatypecontrolloop.controlloopcapability.actorOperation
            operationcapabilities:
                description: The operation the actor should perform on the targettype: List
                description: List of operations available for the actor
                required: true
                entry_schema:
                    type: onap.datatype.controlloop.operationOperation
capability_types:
    onap.controlloop.capability.appc.ModifyConfig:
        target:derived_from: tosca.nodes.Capabilities
        properties:

topology_template:
    node_templates:
        description: The target this operation is performed against
    onap.nodetype.controlloop.actor.Appc:
            type: onap.nodetype.controlloop.Actor
            requiredid: trueAPPC
                entry_schemadescription:
 APPC control loop actor
             capabilities:
   type: onap.datatype.controlloop.targettype
            timeoutModifyConfig:
                type: Integer
   type: onap.controlloop.capability.appc.ModifyConfig
        onap.nodetype.controlloop.actor.AppcLcm:
    description: The amount of time for the actor to perform the operation.type: onap.nodetype.controlloop.Actor
                requiredid: trueAPPCLCM
            retriesdescription:
 APPC LCM control loop actor
            typecapabilities: Integer
                descriptionRestart:
 The number of retries the actor should attempt to perform the operation.
          type: onap.controlloop.capability.appclcm.Restart
      required: true
         Rebuild:
       default: 0
            successtype: onap.controlloop.capability.appclcm.Rebuild
                descriptionMigrate:
 Points to the operation to invoke on success.
            type: onap.controlloop.capability.appclcm.Migrate
   required: false
            ConfigModify:
    default: final_success
                entry_schema:type: onap.controlloop.capability.appclcm.ConfigModify
        onap.nodetype.controlloop.actor.Cds:
            type: onap.datatypenodetype.controlloop.operation.directiveActor
            failureid: CDS
            description: CDS control loop actor
  description: Points to the operation to invoke on Actor operation failure.capabilities:
                requiredModifyConfig: false
                default: final_failure
   type: onap.controlloop.capability.cds.ModifyConfig
        onap.nodetype.controlloop.actor.Sdnc:
    entry_schema:
        type: onap.nodetype.controlloop.Actor
            typeid: onap.datatype.controlloop.operation.directiveSDNC
            failure_timeoutdescription:
 SDNC control loop actor
            descriptioncapabilities:
   Points to the operation to invoke when the time out for the operation occurs.
reroute:
                    requiredtype: falseonap.controlloop.capability.sdnc.reroute
                defaultBandwidthOnDemand: final_failure_timeout

                     entry_schema:type: onap.controlloop.capability.sdnc.BandwidthOnDemand
        onap.nodetype.controlloop.actor.Sdnr:
            type: onap.datatypenodetype.controlloop.operation.directiveActor
            failure_retriesid: SDNR
                description: SDNR Pointscontrol toloop theactor
 operation to invoke when the current operation has exceeded its max retries.capabilities:
                requiredModifyConfig: false
                default: final_failure_retries
   type: onap.controlloop.capability.sdnr.ModifyConfig
            entry_schema:
        onap.nodetype.controlloop.actor.So:
            type: onap.datatypenodetype.controlloop.operation.directiveActor
            failure_exceptionid: SO
            description: SO control  description: Points to the operation to invoke when the current operation causes an exception.loop actor
            capabilities:
                requiredVFModuleCreate:
   false
                 defaulttype: final_failure_exceptiononap.controlloop.capability.so.VFModuleCreate
                entry_schemaVFModuleDelete:
                    type: onap.datatype.controlloop.capability.so.VFModuleDelete
        onap.nodetype.controlloop.operationactor.directiveVfc:
            failure_guardtype: onap.nodetype.controlloop.Actor
                descriptionid: PointsVFC
 to the operation to invoke when the current operation is blocked duedescription: toVFC guardcontrol policyloop enforcement.actor
                required: falsecapabilities:
                defaultRestart:
 final_failure_guard     
                entry_schema:type: onap.controlloop.capability.vfc.Restart
                    type: onap.datatype.controlloop.operation.directive





Code Block
languageyml
titleExample Policy - one-2-one mapping of the El Alto YAML operation definition
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

...