...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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 Use of NodeTypes and CapabilityTypes to support Actor/Operation definition - Nested approach (Agreed not to use - will retain flat structure)
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
tosca_definitions_version: tosca_simple_yaml_1_0_0 policy_types: onap.policies.controlloop.operational.Common: derived_from: tosca.policies.Root version: 2.0.0 description: Operational Policy for Control Loop execution properties: id: type: String description: The unique control loop id required: true timeout: type: Integer description: Overall timeout for executing all the operations. required: true abatementonset: typedescription: The datatype Booleanof the expected ONSET Control Loop Event description: Whether an abatement will be expectedrequired: fortrue the control loop. entry_schema: required: true defaulttype: falseonap.datatype.controlloop.Event operationabatement: description: Initial operation to execute upon receiving an Onset eventtype: Boolean description: Whether an abatement will be expected for the Controlcontrol Looploop. required: true entry_schema:default: false operation: type: onap.datatype.controlloop.operation.Directive onap.policies.controlloop.operationaldescription: Initial operation to execute upon receiving an Onset event for the Control Loop. required: true entry_schema: type: onap.datatype.controlloop.operation.Directive onap.policies.controlloop.operational.common.Apex: derived_from: onap.policies.controlloop.operational.Common version: 1.0.0 description: Operational policies for Apex PDP properties: onap.policies.controlloop.operational.common.Drools: derived_from: onap.policies.controlloop.operational.Common version: 1.0.0 description: Operational policies for Drools PDP properties: controller: description: Drools controller properties required: true entry_schema: type: onap.datatype:controlloop.controller.Drools data_types: onap.datatype:.controlloop.controller.DroolsEvent: derived_from: tosca.datatypes.Root version: 1.0.0 description: Definition of the target type for operations during control loops properties: onap.datatype.controlloop.TargetType: event_type: derived_from: tosca.datatypes.Root versiontype: 1.0.0String description: Definition of the target type for operations duringrequired: controltrue loops properties: default: "Legacy" target: constraints: type: String - descriptionvalid_values: The type target the operation is performed against.["Legacy", "VES"] event_version: required: true type: String constraints: required: true valid_values: [VNF, VM, VNFC, VFMODULE, PNF]default: "1.0.0" onap.datatype:controlloop.controller.Drools: resources: derived_from: tosca.datatypes.Root typeversion: String1.0.0 description: Definition of the target type for operations description:during |control loops properties: The resource in# whichTBD the operation is be performed against. By default, onap.datatype.controlloop.TargetType: derived_from: tosca.datatypes.Root an onset event will contain resource identification which should be usedversion: 1.0.0 description: Definition of the target type for operations during control loops for the operationproperties: (if applicable) if this field is missing. target: type: String onap.datatype.controlloop.Operation: derived_from: tosca.datatypes.Root description: The type target the version: 1.0.0 operation is performed against. description: An operation supported by an actor required: true properties: idconstraints: type: String valid_values: [VNF, VM, VNFC, VFMODULE, PNF] description: Unique identifier for the operationresources: requiredtype: trueString targettype: description: | description: The target type supported by the operation The resource in which the operation is be performed against. By default, required: true an entry_schema:onset event will contain resource identification which should be used for the operation (if type: onap.datatype.controlloop.TargetType applicable) if this field is missing. parameters: typeonap.datatype.controlloop.Operation: Map 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: Unique Optionalidentifier payloadfor thatthe isoperation passed from the policy to the actor for operation execution. required: true onap.datatype.controlloop.operation.Directive: derived_from: tosca.datatypes.Root targettype: version: 1.0.0 description: PolicyThe definitionstarget fortype takingsupported actionsby duringthe aoperation Control Loop event properties: idrequired: true type: String description: Unique ID for the operation entry_schema: requiredtype: trueonap.datatype.controlloop.TargetType descriptionparameters: type: StringMap description: AOptional user-friendlyparameters descriptionrequired ofby the directiveoperation required: false actorpayload: descriptiontype: TheMap actor that will perform the operation description: Optional payload that is passed required:from truethe policy to the actor for operation execution. entry_schemaonap.datatype.controlloop.operation.Directive: derived_from: tosca.datatypes.Root typeversion: onap1.nodetype0.controlloop.Actor0 description: Policy definitions for operation:taking actions during a Control Loop event properties: description: The operation the actor should perform on the targetid: requiredtype: trueString entry_schemadescription: Unique ID for the operation typerequired: onap.datatype.controlloop.operationtrue targetdescription: descriptiontype: TheString target this operation is performed against description: A user-friendly description of the required:directive true entry_schema:required: false actor: type: onap.datatype.controlloop.targettype timeoutdescription: The actor that will perform the operation type: Integer required: true description: The amount of time for the actorentry_schema: to perform the operation. requiredtype: trueonap.nodetype.controlloop.Actor retriesoperation: typedescription: IntegerThe operation the actor should perform on the target description: The number of retries the actor should attemptrequired: totrue perform the operation. entry_schema: required: true defaulttype: 0onap.datatype.controlloop.operation successtarget: description: PointsThe totarget thethis operation tois invoke on success.performed against required: falsetrue defaultentry_schema: final_success entry_schema: type: onap.datatype.controlloop.targettype timeout: type: onap.datatype.controlloop.operation.directive type: failure:Integer description: Points to The amount of time for the operationactor to invokeperform onthe Actor operation failure. required: true false retries: default: final_failure type: Integer entry_schema: description: The number of retries the actor should attempt to perform type: onap.datatype.controlloop.operation.directivethe operation. failure_timeoutrequired: true descriptiondefault: Points0 to the operation to invoke when the time out for success: description: Points to the operation occursto invoke on success. required: false default: final_failure_timeoutsuccess entry_schema: type: onap.datatype.controlloop.operation.directive failure_retries: description: Points to the operation to invoke whenon the currentActor operation has exceeded its max retriesfailure. required: false default: final_failure_retries entry_schema: type: onap.datatype.controlloop.operation.directive failure_exceptiontimeout: description: Points to the operation to invoke when the time currentout operationfor causesthe anoperation exceptionoccurs. required: false default: final_failure_exceptiontimeout entry_schema: type: onap.datatype.controlloop.operation.directive failure_guardretries: description: Points to the operation to invoke when the current operation ishas blockedexceeded dueits to guard policy enforcementmax retries. required: false default: final_failure_guard retries entry_schema: type: onap.datatype.controlloop.operation.directive node_types: onap.nodetype.controlloop.Actorfailure_exception: derived_from: tosca.nodes.Root description: Points version: 1.0.0 description: Actor involved in executing operations in a control loopto the operation to invoke when the current operation causes an exception. propertiesrequired: false id: default: final_failure_exception type: String entry_schema: description: Unique identifier for the actor type: onap.datatype.controlloop.operation.directive requiredfailure_guard: true capabilities: description: Points to the operation: to invoke when the current operation is blocked due to guard policy enforcement. type: onap.controlloop.capability.Operation required: capabilities:false type: List description: List of operations available for the actordefault: final_failure_guard required: true entry_schema: type: onap.datatype.controlloop.operation.Operationdirective capabilitynode_types: onap.nodetype.controlloop.capability.appc.ModifyConfigActor: derived_from: tosca.nodes.CapabilitiesRoot propertiesversion: topology_template:1.0.0 node_templates: description: Actor involved in executing onap.nodetype.controlloop.actor.Appc: operations in a control loop typeproperties: onap.nodetype.controlloop.Actor id: APPC description: APPC control loop actortype: String capabilitiesdescription: Unique identifier for the actor ModifyConfig: required: true capabilities: type: onap.controlloop.capability.appc.ModifyConfig operation: onap.nodetype.controlloop.actor.AppcLcm: type: onap.nodetypecontrolloop.controlloopcapability.ActorOperation idcapabilities: APPCLCM description: APPC LCM control loop actortype: List capabilities: description: List of operations available for the actor Restart: type: onap.controlloop.capability.appclcm.Restartrequired: true Rebuildentry_schema: type: onap.datatype.controlloop.capability.appclcm.RebuildOperation capability_types: onap.controlloop.capability.appc.ModifyConfig: Migrate: type: onap.controlloop.capability.appclcm.Migratederived_from: tosca.nodes.Capabilities properties: ConfigModifytopology_template: type: onap.controlloop.capability.appclcm.ConfigModifynode_templates: onap.nodetype.controlloop.actor.CdsAppc: type: onap.nodetype.controlloop.Actor id: CDSAPPC description: CDSAPPC control loop actor capabilities: ModifyConfig: type: onap.controlloop.capability.cdsappc.ModifyConfig onap.nodetype.controlloop.actor.SdncAppcLcm: type: onap.nodetype.controlloop.Actor id: SDNCAPPCLCM description: APPC SDNCLCM control loop actor capabilities: rerouteRestart: type: onap.controlloop.capability.sdncappclcm.rerouteRestart BandwidthOnDemandRebuild: type: onap.controlloop.capability.sdnc.BandwidthOnDemandappclcm.Rebuild onap.nodetype.controlloop.actor.Sdnr: Migrate: type: onap.nodetype.controlloop.Actor id: SDNR type: onap.controlloop.capability.appclcm.Migrate description: SDNR control loop actor capabilities: ConfigModify: ModifyConfig: type: onap.controlloop.capability.sdnrappclcm.ModifyConfigConfigModify onap.nodetype.controlloop.actor.SoCds: type: onap.nodetype.controlloop.Actor id: SOCDS description: SOCDS control loop actor capabilities: VFModuleCreateModifyConfig: type: onap.controlloop.capability.socds.VFModuleCreateModifyConfig onap.nodetype.controlloop.actor.Sdnc: VFModuleDelete: type: onap.nodetype.controlloop.Actor id: SDNC type: onap.controlloop.capability.so.VFModuleDelete onap.nodetype.controlloop.actor.Vfcdescription: SDNC control loop actor type: onap.nodetype.controlloop.Actor capabilities: id: VFC reroute: description: VFC control loop actor type: onap.controlloop.capability.sdnc.reroute capabilities: RestartBandwidthOnDemand: type: onap.controlloop.capability.vfcsdnc.RestartBandwidthOnDemand onap.nodetype.controlloop.actor.Sdnr: |
2.2 Mapping using TOSCA Triggers
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tosca_definitions_version: tosca_simple_yaml_1_0_0 policy_types: onap.policies.controlloop.operational.TriggerStylePolicyType:type: onap.nodetype.controlloop.Actor derived_fromid: tosca.policies.RootSDNR version: 1.0.0 description: SDNR control loop actor description: Operational Policy for Control Loop execution using Triggers capabilities: metadata: propertiesModifyConfig: controlLoopName: type: onap.controlloop.capability.sdnr.ModifyConfig type: stringonap.nodetype.controlloop.actor.So: type: onap.nodetype.controlloop.Actor description: The unique control loop id: SO description: SO control required:loop trueactor timeoutcapabilities: typeVFModuleCreate: integer description: Overall timeout for executing all the operations in the policy.type: onap.controlloop.capability.so.VFModuleCreate VFModuleDelete: required: true targets: [] # optional must be Node Types or Group Types applied totype: onap.controlloop.capability.so.VFModuleDelete triggersonap.nodetype.controlloop.actor.Vfc: # ? type: onap.nodetype.controlloop.Actor topology_template: policiesid: VFC - firewall_restartdescription: VFC control loop actor type: onap.policies.controlloop.operational.TriggerStylePolicyType descriptioncapabilities: vFirewall use case - APPC restart metadataRestart: properties: type: onap.controlloop.capability.vfc.Restart controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a |
2.2 Mapping using TOSCA Triggers - WIP unable to replicate requirements that were met by previous YAML structure
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tosca_definitions_version: timeouttosca_simple_yaml_1_0_0 policy_types: 1200s onap.policies.controlloop.operational.TriggerStylePolicyType: targetsderived_from: [] # optional must be Node Templates or Groups applied totosca.policies.Root version: 1.0.0 description: Operational Policy for triggers:Control Loop execution using Triggers metadata: - properties: on_onset: controlLoopName: descriptiontype: Whenstring the ONSET event is received description: The unique control loop id event_type: ControlLoopEvent required: true schedule: timeout: type: integer start_time: T06:00:00Z description: Overall timeout for executing all the operations in end_time: T23:59:59Zthe policy. required: true target_filter: targets: [] # optional must be Node Types or Group Types applied to node: triggers: # ? requirement: topology_template: policies: - capabilityfirewall_restart: type: onap.policies.controlloop.operational.TriggerStylePolicyType condition: description: vFirewall use case - APPC restart action: # scripts? metadata: properties: primary: # The optional implementation artifact (i.e., the primary script file within a TOSCA CSAR file). controlLoopName: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a timeout: 1200s targets: [] dependencies: # The optional orderedmust listbe ofNode oneTemplates or moreGroups dependentapplied orto secondary implementation artifacts which are referenced by the primary implementation artifact triggers: - timeout: # timeout in seconds on_onset: operation_host: # nodedescription: executedWhen onthe ONSET event is received constraint: # seems the same as condition aboveevent_type: ControlLoopEvent schedule: period: 300s evaluations: 3 # is this retries? The optional number of evaluations that must be performed over the period to assert the condition exists.start_time: T06:00:00Z end_time: T23:59:59Z method: # optional statistical method name to use to perform evaluation of condition |
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.
Issue: How to ensure that CLAMP does not have to hard-code where CSAR details need to be populated in the policy. Eg. Target Type
- Need to use defaults, descriptions, constraints, required fields
- Pam and Liam will work on Operational policies to look like Seb's JSON schema so Seb can test it out. Then identify next problem to solve.
Seb's JSON schema from El Alto:
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:target_filter: node: requirement: capability: condition: action: # scripts? primary: # The optional implementation artifact (i.e., the primary script file within a TOSCA CSAR file). dependencies: # The optional ordered list of one or more dependent or secondary implementation artifacts which are referenced by the primary implementation artifact derived_from: tosca.datatypes.Root versiontimeout: 1.0.0# timeout in seconds description: Policy definitions for taking actions during a Control Loop event operation_host: # node executed on properties: # other properties ommitted for brevity constraint: # seems the same as condition above actor: typeperiod: 300s String description: The actor that will perform the operation evaluations: 3 # is this retries? The optional number of evaluations that must be performed over the period to assert the condition exists. required: true constraints: possible_values: [SO, SDNC, APPC, VFC, SNDR, CDS]method: |
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.
Question: Should the actor be a capability? If its a datatype, then you cannot pre-define them. A capability type would allow us to predefine actors as well as allow companies that ingest ONAP to create their own.
Question: How does CLAMP call CDS API for blueprint information? to be filled in
TODO: Pam add examples.
Question: If CSAR is prepopulated with datatypes and policytypes, how would one design a PNF control loop? Do we need a PNF service distributed to it to "kick off"?
...
- Jorge Hernandez will investigate re-usable operations
...
- Jorge Hernandez will investigate flat policies (old way)
- Pamela Dragosh will investigate nested policies
...
- Current ControlLoopEvent structure
- Future possible VES Events
- Possible that status of a policy execution may need to be an event for reusable operations
...
- Rashmi Pujar will investigate
...
...
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
...
# optional statistical method name to use to perform evaluation of condition
|
2.3 Flat Structure - v1
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.operational.Common:
derived_from: tosca.policies.Root
version: 2.0.0
description: Operational Policy for Control Loop execution
properties:
id:
type: String
description: The unique control loop id
required: true
timeout:
type: Integer
description: Overall timeout for executing all the operations.
required: true
abatement:
type: Boolean
description: Whether an abatement event message will be expected for the control loop.
required: true
default: false
operation:
description: List of operations to be performed when Control Loop is triggered.
required: true
entry_schema:
type: onap.datatype.controlloop.Operation
trigger:
type: String
description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
required: true
onap.policies.controlloop.operational.Apex:
derived_from: onap.policies.controlloop.operational.Common
version: 1.0.0
description: Operational policies for Apex PDP
properties:
onap.policies.controlloop.operational.Drools:
derived_from: onap.policies.controlloop.operational.Common
version: 1.0.0
description: Operational policies for Drools PDP
properties:
controller:
description: Drools controller properties
required: true
entry_schema:
type: onap.datatype:controlloop.controller.Drools
data_types:
onap.datatype.controlloop.controller.Drools:
derived_from: tosca.datatypes.Root
version: 1.0.0
description: Definition of the target type for operations during control loops
properties:
onap.datatype.controlloop.Operation:
derived_from: tosca.datatypes.Root
version: 1.0.0
description: An operation supported by an actor
properties:
id:
type: String
description: Unique identifier for the operation
required: true
description:
type: String
description: A user-friendly description of the intent for the operation
required: false
actor:
type: String
description: The actor that will perform the operation
required: true
operation:
type: String
description: The operation the actor should perform on the target
required: true
target:
type: String
description: The target the operation is to be performed on.
required: true
payload:
type: Map
description: Optional payload that is passed from the policy to the actor for operation execution.
required: false
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:
type: String
description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
required: false
default: final_success
failure:
type: String
description: Points to the operation to invoke on Actor operation failure.
required: false
default: final_failure
failure_timeout:
description: Points to the operation to invoke when the time out for the operation occurs.
required: false
default: final_failure_timeout
failure_retries:
description: Points to the operation to invoke when the current operation has exceeded its max retries.
required: false
default: final_failure_retries
failure_exception:
description: Points to the operation to invoke when the current operation causes an exception.
required: false
default: final_failure_exception
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
|
2.3 Flat Structure - v2
Flat Structure vs - use of metadata and actor as a datatype
Code Block | ||||
---|---|---|---|---|
| ||||
tosca_definitions_version: tosca_simple_yaml_1_0_0
policy_types:
onap.policies.controlloop.operational.Common:
derived_from: tosca.policies.Root
version: 1.0.0
description: Operational Policy for Control Loop execution
properties:
id:
type: String
description: The unique control loop id.
required: true
timeout:
type: Integer
description: |
Overall timeout for executing all the operations. This timeout should equal or exceed the total
timeout for each operation listed.
required: true
abatement:
type: Boolean
description: Whether an abatement event message will be expected for the control loop from DCAE.
required: true
default: false
trigger:
type: String
description: Initial operation to execute upon receiving an Onset event message for the Control Loop.
required: true
operations:
description: List of operations to be performed when Control Loop is triggered.
required: true
entry_schema:
type: onap.datatype.controlloop.Operation
onap.policies.controlloop.operational.common.Apex:
derived_from: onap.policies.controlloop.operational.Common
type_version: 1.0.0
version: 1.0.0
description: Operational policies for Apex PDP
properties:
onap.policies.controlloop.operational.common.Drools:
derived_from: onap.policies.controlloop.operational.Common
type_version: 1.0.0
version: 1.0.0
description: Operational policies for Drools PDP
properties:
controller:
description: Drools controller properties
required: true
entry_schema:
type: onap.datatype.controlloop.controller.Drools
data_types:
onap.datatype.controlloop.controller.Drools:
derived_from: tosca.datatypes.Root
description: Definition of the target type for operations during control loops
properties:
controllerName:
type: String
description: The id of the Drools controller the policy should be loaded in.
required: false
onap.datatype.controlloop.operation.Failure:
derived_from: tosca.datatypes.Root
description: Captures information of an operational failure performed for control loop
properties:
messages:
type: String
description: error message
required: true
category:
type: String
description: |
The category the error occurred in. Whether this is a general error from the actor, or the operation
timed out, retries were exhausted in trying to execute the operation, a guard policy prevented the
operation from occuring, or an exception in the system caused the failure.
constraints:
- valid_values: [error, timeout, retries, guard, exception]
onap.datatype.controlloop.Target:
derived_from: tosca.datatypes.Root
description: Definition for a entity in A&AI to perform a control loop operation on
properties:
targetType:
type: String
description: Category for the target type
required: true
constraints:
- valid_values: [VNF, VM, VFMODULE, PNF]
entityIds:
type: Map
description: |
Map of values that identify the resource. If none are provided, it is assumed that the
entity that generated the ONSET event will be the target.
required: false
onap.datatype.controlloop.Actor:
derived_from: tosca.datatypes.Root
description: An actor/operation/target definition
properties:
actor:
type: String
description: The actor performing the operation.
required: true
operation:
type: String
description: The operation the actor is performing.
required: true
target:
type: String
description: The resource the operation should be performed on.
required: true
metadata:
clamp_csar_lookup: csar_plugin
payload:
type: Map
description: Name/value pairs of payload information passed by Policy to the actor
required: false
onap.datatype.controlloop.Operation:
derived_from: tosca.datatypes.Root
description: An operation supported by an actor
properties:
id:
type: String
description: Unique identifier for the operation
required: true
description:
type: String
description: A user-friendly description of the intent for the operation
required: false
operation:
description: The definition of the operation to be performed.
required: true
metadata:
clamp_catalog: get_operations
entry_schema:
type: onap.datatype.controlloop.Actor
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:
type: String
description: Points to the operation to invoke on success. A value of "final_success" indicates and end to the operation.
required: false
default: final_success
failure:
type: String
description: Points to the operation to invoke on Actor operation failure.
required: false
default: final_failure
failure_timeout:
description: Points to the operation to invoke when the time out for the operation occurs.
required: false
default: final_failure_timeout
failure_retries:
description: Points to the operation to invoke when the current operation has exceeded its max retries.
required: false
default: final_failure_retries
failure_exception:
description: Points to the operation to invoke when the current operation causes an exception.
required: false
default: final_failure_exception
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
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
tosca_definitions_version: tosca_simple_yaml_1_0_0
topology_template:
policies:
- operational.modifyconfig:
type: onap.policies.controlloop.operational.common.Drools
type_version: 1.0.0
version: 1.0.0
metadata:
policy-id: operational.modifyconfig
properties:
id: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
timeout: 1200
abatement: false
trigger: unique-policy-id-1-modifyConfig
operations:
- id: unique-policy-id-1-modifyConfig
description: Modify the packet generator
operation:
actor: APPC
operation: ModifyConfig
target:
targetType: VNF
entityId:
resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
timeout: 300
retries: 0
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
controllerName: usecases
- operational.restart:
type: onap.policies.controlloop.operational.common.Drools
type_version: 1.0.0
version: 1.0.0
metadata:
policy-id: operational.restart
properties:
id: ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e
timeout: 3600
abatement: true
trigger: unique-policy-id-1-restart
operations:
- id: unique-policy-id-1-restart
description: Restart the VM
operation:
actor: APPC
recipe: Restart
target:
type: VNF
timeout: 1200
retries: 3
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
controllerName: usecases
- operational.scaleout:
type: onap.policies.controlloop.operational.common.Drools
type_version: 1.0.0
version: 1.0.0
metadata:
policy-id: operational.scaleout
properties:
id: ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3
timeout: 1200
abatement: false
trigger: unique-policy-id-1-scale-up
operations:
- id: unique-policy-id-1-scale-up
description: Create a new VF Module
operation:
actor: SO
operation: VF Module Create
target:
type: VFMODULE
entityIds:
modelInvariantId: e6130d03-56f1-4b0a-9a1d-e1b2ebc30e0e
modelVersionId: 94b18b1d-cc91-4f43-911a-e6348665f292
modelName: VfwclVfwsnkBbefb8ce2bde..base_vfw..module-0
modelVersion: 1
modelCustomizationId: 47958575-138f-452a-8c8d-d89b595f8164
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]"}]'
timeout: 1200
retries: 0
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
controllerName: usecases
- operational.modifyconfig.cds:
type: onap.policies.controlloop.operational.common.Drools
type_version: 1.0.0
version: 1.0.0
metadata:
policy-id: operational.modifyconfig.cds
properties:
id: ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a
timeout: 1200
abatement: false
trigger: unique-policy-id-1-modifyConfig
operations:
- id: unique-policy-id-1-modifyConfig
description: Modify the packet generator
operation:
actor: APPC
operation: ModifyConfig
target:
targetType: VNF
entityId:
resourceID: bbb3cefd-01c8-413c-9bdd-2b92f9ca3d38
payload:
artifact_name: vfw-cds
artifact_version: 1.0.0
mode: async
data: '{"mapInfo":{"key":"val"},"arrayInfo":["one","two"],"paramInfo":"val"}'
timeout: 300
retries: 0
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
controllerName: usecases |
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.
Issue: How to ensure that CLAMP does not have to hard-code where CSAR details need to be populated in the policy. Eg. Target Type
- Need to use defaults, descriptions, constraints, required fields
- Pam and Liam will work on Operational policies to look like Seb's JSON schema so Seb can test it out. Then identify next problem to solve.
Seb's JSON schema from El Alto:
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.
Question: Should the actor be a capability? If its a datatype, then you cannot pre-define them. A capability type would allow us to predefine actors as well as allow companies that ingest ONAP to create their own.
Question: How does CLAMP call CDS API for blueprint information? to be filled in
TODO: Pam add examples.
Question: If CSAR is prepopulated with datatypes and policytypes, how would one design a PNF control loop? Do we need a PNF service distributed to it to "kick off"?
- Possible to have re-usable Operations?
- Jorge Hernandez will investigate re-usable operations
- Issue: Flat structure vs Nested structure
- Jorge Hernandez will investigate flat policies (old way)
- Pamela Dragosh will investigate nested policies
- Issue: We should define the incoming event that triggers the Control Loop Pamela Dragosh will add this definition
- Current ControlLoopEvent structure
- Future possible VES Events
- Possible that status of a policy execution may need to be an event for reusable operations
- Issue: Should it be capability_type or relationship for the Actor operations??
- Rashmi Pujar will investigate
- Liam Fallon and Ram Krishna Verma will look into Apex Operational Policy.
- Issue: Can we specify the guard policies into the operational policies? Do we make guard optional in policy operational directive executive? How to make it available to all PDP engines?
- Issue: Other policies needed such as is-closed-loop-disable=true and prov_status=in-maint:
Jira Legacy server System Jira serverId 4733707d-2057-3a0f-ae5e-4fd8aff50176 key POLICY-1071 - Issue: A&AI how to specify which VNF to take directive on. What about PNF?
- Could switch to where a selection of the operation constrains the actor.
- Instead of specify BOTH actor and operation, select an operation and then the actor supported by the operation.
Issue: Policies and Reusable Operations Action Item Follow up - Jorge Hernandez
A nested policy approach has the following issues:
- Number of hierarchical layers, which must be bounded. The CLAMP GUI driven by an open ended "recursive" schema would have to be bounded. One could argue that after N hierarchical layers, the information would be hard to be tracked by a human operator.
- Associated with the number of hierarchical layers, and the most important issue is the duplication of operations, as duplicated operations would be repeated at multiple levels, and branches.
- Associated with (2), there are issues of conciseness and human readability of policies.
- A smaller issue relates to the storage space in the policy repository as it would likely require more space due to dups operations across levels.
- A smaller issue relates to come up with canonical representation of policies and operations, policies will have to be flattened out and put in a canonical representation to support static analysis on the policy repo, for example for conflict detection.
The main benefits for nested operations over a flat structure are:
- Clearly drive the GUI display and the user input (may be more intuitive), and
- if the operations are fairly simple (policies mono-operational) which is the high runner case at this time (minimum duplication).
- Recommendation is to stay with the flat structure previously used vs nested. Not ideal but use description field as a way of instructing the user on what values to put in the fields.
- Determined that we need a catalog for actors/operations and what target they work on
Actor Catalog needs to capture this information:
Code Block |
---|
catalog:
appc:
ModifyConfig: [VNF]
appclcm:
ModifyConfig: [VNF]
Restart: [VNF]
Rebuild: [VNF]
Migrate: [VNF]
so:
VF Module Create: [VFModule]
VF Module Delete: [VFModule]
cds:
ModifyConfig: [VNF, PNF]
sdnc:
reroute: [VNF]
BandwidthOnDemand: [VNF]
sdnr:
ModifyConfig: [PNF]
vfc:
Restart: [VNF]
|
Proposal is to use "metadata" field in order to instruct CLAMP on where to lookup actor information and how to apply logic around looking up information in the CSAR for actor/operation.