Versions Compared

Key

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

...

Press the Change button under Change State OrderOrder State. Then, press the Select Order State drop-down menu, and select PASSIVE. Finally, press the Save button to change the control loop to PASSIVE state.

...

Code Block
languageyml
titlecommission.yaml
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_1_0
data_types:
  onap.datatypes.ToscaConceptIdentifier:
    derived_from: tosca.datatypes.Root
    properties:
      name:
        type: string
        required: true
      version:
        type: string
        required: true
  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
        metadata:
          clamp_possible_values: ClampExecution:CSAR_RESOURCES
        entry_schema:
          type: string
  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
        metadata:
          clamp_possible_values: Dictionary:DefaultActors,ClampExecution:CDS/actor
      operation:
        type: string
        description: The operation the actor is performing.
        metadata:
          clamp_possible_values: Dictionary:DefaultOperations,ClampExecution:CDS/operation
        required: true
      target:
        type: onap.datatype.controlloop.Target
        description: The resource the operation should be performed on.
        required: true
      payload:
        type: map
        description: Name/value pairs of payload information passed by Policy to the actor
        required: false
        metadata:
          clamp_possible_values: ClampExecution:CDS/payload
        entry_schema:
          type: string
  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:
        type: onap.datatype.controlloop.Actor
        description: The definition of the operation to be performed.
        required: true
      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:
        type: string
        description: Points to the operation to invoke when the time out for the operation occurs.
        required: false
        default: final_failure_timeout
      failure_retries:
        type: string
        description: Points to the operation to invoke when the current operation has exceeded its max retries.
        required: false
        default: final_failure_retries
      failure_exception:
        type: string
        description: Points to the operation to invoke when the current operation causes an exception.
        required: false
        default: final_failure_exception
      failure_guard:
        type: string
        description: Points to the operation to invoke when the current operation is blocked due to guard policy enforcement.
        required: false
        default: final_failure_guard
policy_types:
  onap.policies.controlloop.operational.Common:
    derived_from: tosca.policies.Root
    version: 1.0.0
    name: onap.policies.controlloop.operational.Common
    description: |
      Operational Policy for Control Loop execution. Originated in Frankfurt to support TOSCA Compliant
      Policy Types. This does NOT support the legacy Policy YAML policy type.
    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:
        type: list
        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
    name: onap.policies.controlloop.operational.common.Apex
    description: Operational policies for Apex PDP
    properties:
      engineServiceParameters:
        type: string
        description: The engine parameters like name, instanceCount, policy implementation, parameters etc.
        required: true
      eventInputParameters:
        type: string
        description: The event input parameters.
        required: true
      eventOutputParameters:
        type: string
        description: The event output parameters.
        required: true
      javaProperties:
        type: string
        description: Name/value pairs of properties to be set for APEX if needed.
        required: false
node_types:
  org.onap.policy.clamp.controlloop.Participant:
    version: 1.0.1
    derived_from: tosca.nodetypes.Root
    properties:
      provider:
        type: string
        requred: false
  org.onap.policy.clamp.controlloop.ControlLoopElement:
    version: 1.0.1
    derived_from: tosca.nodetypes.Root
    properties:
      provider:
        type: string
        required: false
        metadata:
          common: true
        description: Specifies the organization that provides the control loop element
      participant_id:
        type: onap.datatypes.ToscaConceptIdentifier
        requred: true
        metadata:
          common: true
      participantType:
        type: onap.datatypes.ToscaConceptIdentifier
        required: true
        metadata:
          common: true
        description: The identity of the participant type that hosts this type of Control Loop Element
      startPhase:
        type: integer
        required: false
        constraints:
          - greater_or_equal: 0
        metadata:
          common: true
        description: A value indicating the start phase in which this control loop element will be started, the
          first start phase is zero. Control Loop Elements are started in their start_phase order and stopped
          in reverse start phase order. Control Loop Elements with the same start phase are started and
          stopped simultaneously
      uninitializedToPassiveTimeout:
        type: integer
        required: false
        constraints:
          - greater_or_equal: 0
        default: 60
        metadata:
          common: true
        description: The maximum time in seconds to wait for a state chage from uninitialized to passive
      passiveToRunningTimeout:
        type: integer
        required: false
        constraints:
          - greater_or_equal: 0
        default: 60
        metadata:
          common: true
        description: The maximum time in seconds to wait for a state chage from passive to running
      runningToPassiveTimeout:
        type: integer
        required: false
        constraints:
          - greater_or_equal: 0
        default: 60
        metadata:
          common: true
        description: The maximum time in seconds to wait for a state chage from running to passive
      passiveToUninitializedTimeout:
        type: integer
        required: false
        constraints:
          - greater_or_equal: 0
        default: 60
        metadata:
          common: true
        description: The maximum time in seconds to wait for a state chage from passive to uninitialized
  org.onap.policy.clamp.controlloop.ControlLoop:
    version: 1.0.1
    derived_from: tosca.nodetypes.Root
    properties:
      provider:
        type: string
        required: false
        metadata:
          common: true
        description: Specifies the organization that provides the control loop element
      elements:
        type: list
        required: true
        metadata:
          common: true
        entry_schema:
          type: onap.datatypes.ToscaConceptIdentifier
        description: Specifies a list of control loop element definitions that make up this control loop definition
  org.onap.policy.clamp.controlloop.PolicyControlLoopElement:
    version: 1.0.1
    derived_from: org.onap.policy.clamp.controlloop.ControlLoopElement
    properties:
      policy_type_id:
        type: onap.datatypes.ToscaConceptIdentifier
        requred: true
      policy_id:
        type: onap.datatypes.ToscaConceptIdentifier
        requred: false
topology_template:
  node_templates:
    org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.PolicyControlLoopElement
      type_version: 1.0.1
      description: Control loop element for the Link Monitor
      properties:
        provider: Ericsson
        participant_id:
          name: org.onap.PM_Policy
          version: 1.0.0
        participantType:
          name: org.onap.policy.controlloop.PolicyControlLoopParticipant
          version: 2.3.1
        policy_type_id:
          name: onap.policies.controlloop.operational.common.Apex
          version: 1.0.0
        policy_id:
          name: operational.apex.linkmonitor
          version: 1.0.0 
        pdpGroup: defaultGroup
    org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition0:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.ControlLoop
      type_version: 1.0.0
      description: Control loop for Link Monitor
      properties:
        provider: Ericsson
        elements:
        - name: org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement
          version: 1.2.3
    org.onap.policy.controlloop.PolicyControlLoopParticipant:
      version: 2.3.1
      type: org.onap.policy.clamp.controlloop.Participant
      type_version: 1.0.1
      description: Participant for policy framework
      properties:
        provider: ONAP
  policies:
  - operational.apex.linkmonitor:
      type: onap.policies.controlloop.operational.common.Apex
      type_version: 1.0.0
      version: 1.0.0
      metadata:
        policy-id: operational.apex.linkmonitor
        policy-version: 1.0.0
      properties:
        engineServiceParameters:
          name: LinkMonitorApexEngine
          version: 0.0.1
          id: 101
          instanceCount: 1
          deploymentPort: 12345
          engineParameters:
            executorParameters:
              JAVASCRIPT:
                parameterClassName: org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters
            contextParameters:
              parameterClassName: org.onap.policy.apex.context.parameters.ContextParameters
              schemaParameters:
                Avro:
                  parameterClassName: org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters
            taskParameters:
            - key: ORU-ODU-Map
              value: |-
                {
                   "ERICSSON-O-RU-11220": "HCL-O-DU-1122",
                     "ERICSSON-O-RU-11221": "O-DU-1122",
                          "ERICSSON-O-RU-1122111222": "HCL-O-DU-1122",
                     "ERICSSON-O-RU-11223": "O-DU-1122",
                          "ERICSSON-O-RU-1122211224": "HCL-O-DU-11221123",
                          "ERICSSON-O-RU-11225": "O-DU-1123",
                     "ERICSSON-O-RU-1122311226": "HCL-O-DU-11221123",
                        "ERICSSON-O-RU-11227": "O-DU-1124",
                       "ERICSSON-O-RU-1122411228": "HCL-O-DU-11231125",
                   "ERICSSON-O-RU-11229": "O-DU-1125"
                }
           "ERICSSON-O-RU-11225": "HCL-O-DU-1123",policy_type_impl:
            apexPolicyModel:
              key:
                     "ERICSSON-O-RU-11226": "HCL-O-DU-1123",name: LinkMonitorModel
                version: 0.0.1
              keyInformation:
                "ERICSSON-O-RU-11227": "HCL-O-DU-1124",
key:
                  name: LinkMonitorModel_KeyInfo
                  version: 0.0.1
                "ERICSSON-O-RU-11228": "HCL-O-DU-1125",
keyInfoMap:
                  entry:
                  - key:
                      "ERICSSON-O-RU-11229": "HCL-O-DU-1125"}name: ApexMessageOutputEvent
          policy_type_impl:
            apexPolicyModel:
version: 0.0.1
                    keyvalue:
                      namekey:
  LinkMonitorModel
                version: 0.0.1
     name: ApexMessageOutputEvent
        keyInformation:
                key:
version: 0.0.1
                      nameUUID: LinkMonitorModel_KeyInfocca47d74-7754-4a61-b163-ca31f66b157b
                  version: 0.0.1
    description: Generated description for concept referred to by
       keyInfoMap:
                 key entry:"ApexMessageOutputEvent:0.0.1"
                  - key:
                      name: ApexMessageOutputEventCreateLinkClearedOutfieldsEvent
                      version: 0.0.1
                    value:
                      key:
                        name: ApexMessageOutputEventCreateLinkClearedOutfieldsEvent
                        version: 0.0.1
                      UUID: cca47d74a295d6a3-77541b73-4a61387e-b163abba-ca31f66b157bb41e9b608802
                      description: Generated description for concept referred to by
                        key "ApexMessageOutputEventCreateLinkClearedOutfieldsEvent:0.0.1"
                  - key:
                      name: CreateLinkClearedOutfieldsEventCreateLinkClearedOutfieldsTask
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkClearedOutfieldsEventCreateLinkClearedOutfieldsTask
                        version: 0.0.1
                      UUID: a295d6a3fd594e88-1b73411d-387e4a94-abbab2be-b41e9b608802697b3a0d7adf
                      description: GeneratedThis descriptiontask for concept referred to bycreates the output fields when link failure
                        key "CreateLinkClearedOutfieldsEvent:0.0.1"is cleared.
                  - key:
                      name: CreateLinkClearedOutfieldsTaskCreateLinkFailureOutfieldsEvent
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkClearedOutfieldsTaskCreateLinkFailureOutfieldsEvent
                        version: 0.0.1
                      UUID: fd594e8802be2b5d-411d45b7-4a943c54-b2beae54-697b3a0d7adf97f2b5c30125
                      description: ThisGenerated taskdescription createsfor theconcept outputreferred fields when link failureto by
                        is cleared.key "CreateLinkFailureOutfieldsEvent:0.0.1"
                  - key:
                      name: CreateLinkFailureOutfieldsEventCreateLinkFailureOutfieldsTask
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkFailureOutfieldsEventCreateLinkFailureOutfieldsTask
                        version: 0.0.1
                      UUID: 02be2b5dac3d9842-45b780af-3c544a98-ae54951c-97f2b5c30125bd79a431c613
                      description: This task Generatedthe descriptionoutput forfields conceptwhen referredlink tofailure byis
                        key "CreateLinkFailureOutfieldsEvent:0.0.1"detected.
                  - key:
                      name: CreateLinkFailureOutfieldsTaskLinkClearedTask
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkFailureOutfieldsTaskLinkClearedTask
                        version: 0.0.1
                      UUID: ac3d9842eecfde90-80af896c-4a984343-951c8f9c-bd79a431c6132603ced94e2d
                      description: This task sends a message to the output fields when link
 failure is
                      failure is detectedcleared.
                  - key:
                      name: LinkClearedTaskLinkFailureInputEvent
                      version: 0.0.1
                    value:
                      key:
                        name: LinkClearedTaskLinkFailureInputEvent
                        version: 0.0.1
                      UUID: eecfde90c4500941-896c3f98-43434080-8f9ca9cc-2603ced94e2d5b9753ed050b
                      description: ThisGenerated taskdescription sendsfor aconcept messagereferred to the output when linkby
                        failure is cleared.key "LinkFailureInputEvent:0.0.1"
                  - key:
                      name: LinkFailureInputEventLinkFailureInputSchema
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureInputEventLinkFailureInputSchema
                        version: 0.0.1
                      UUID: c45009413b3974fc-3f983012-40803b02-a9cc9f33-5b9753ed050bc9d8eefe4dc1
                      description: Generated description for concept referred to by
                        key "LinkFailureInputEventLinkFailureInputSchema:0.0.1"
                  - key:
                      name: LinkFailureInputSchemaLinkFailureOutputEvent
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureInputSchemaLinkFailureOutputEvent
                        version: 0.0.1
                      UUID: 3b3974fc4f04aa98-3012e917-3b024f4a-9f33882a-c9d8eefe4dc1c75ba5a99374
                      description: Generated description for concept referred to by
                        key "LinkFailureInputSchemaLinkFailureOutputEvent:0.0.1"
                  - key:
                      name: LinkFailureOutputEventLinkFailureOutputSchema
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureOutputEventLinkFailureOutputSchema
                        version: 0.0.1
                      UUID: 4f04aa982d1a7f6e-e917eb9a-4f4a3984-882abe1f-c75ba5a99374283d98111b84
                      description: Generated description for concept referred to by
                        key "LinkFailureOutputEventLinkFailureOutputSchema:0.0.1"
                  - key:
                      name: LinkFailureOutputSchemaLinkFailureTask
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureOutputSchemaLinkFailureTask
                        version: 0.0.1
                      UUID: 2d1a7f6e3351b0f4-eb9acf06-39844fa2-be1f8823-283d98111b84edf67bd30223
                      description: Generated description This task updates the config for conceptO-RU referredwhen tolink
 by
                       failure key "LinkFailureOutputSchema:0.0.1"is detected.
                  - key:
                      name: LinkFailureTaskLinkMonitorModel
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureTaskLinkMonitorModel
                        version: 0.0.1
                      UUID: 3351b0f4540226fb-cf0655ee-4fa24f0e-8823a444-edf67bd30223983a0494818e
                      description: This task updatesis the configApex forPolicy O-RUModel whenfor link
                        failure is detected monitoring.
                  - key:
                      name: LinkMonitorModel_Events
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_Events
                        version: 0.0.1
                      UUID: 540226fb27ad3e7e-55eefe3b-4f0e3bd6-a4449081-983a0494818e718705c2bcea
                      description: This is the Apex Policy Model for link monitoring. Generated description for concept referred to by
                        key "LinkMonitorModel_Events:0.0.1"
                  - key:
                      name: LinkMonitorModel_EventsKeyInfo
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_EventsKeyInfo
                        version: 0.0.1
                      UUID: 27ad3e7eea0b5f58-fe3beefd-3bd6358a-90819660-718705c2bcea840c640bf981
                      description: Generated description for concept referred to by
                        key "LinkMonitorModel_EventsKeyInfo:0.0.1"
                  - key:
                      name: LinkMonitorModel_KeyInfoPolicies
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_KeyInfoPolicies
                        version: 0.0.1
                      UUID: ea0b5f58ee9e0b0f-eefd2b7d-358a3ab7-96609a98-840c640bf981c5ec05ed823d
                      description: Generated description for concept referred to by
                        key "LinkMonitorModel_KeyInfoPolicies:0.0.1"
                  - key:
                      name: LinkMonitorModel_PoliciesSchemas
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_PoliciesSchemas
                        version: 0.0.1
                      UUID: ee9e0b0ffa5f9b8f-2b7d796c-3ab73c70-9a9884e9-c5ec05ed823d5140c958c4bb
                      description: Generated description for concept referred to by
                        key "LinkMonitorModel_PoliciesSchemas:0.0.1"
                  - key:
                      name: LinkMonitorModel_SchemasTasks
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_SchemasTasks
                        version: 0.0.1
                      UUID: fa5f9b8feec592f7-796c69d5-3c7039a9-84e9981a-5140c958c4bbe552f787ed01
                      description: Generated description for concept referred to by
                        key "LinkMonitorModel_SchemasTasks:0.0.1"
                  - key:
                      name: LinkMonitorModel_TasksLinkMonitorPolicy
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorModel_TasksLinkMonitorPolicy
                        version: 0.0.1
                      UUID: eec592f76c5e410f-69d5489a-39a946ff-981a964e-e552f787ed01982ce6e8b6d0
                      description: Generated description for concept referred to by
                        key "LinkMonitorModel_TasksLinkMonitorPolicy:0.0.1"
                  - key:
                      name: LinkMonitorPolicyMessageSchema
                      version: 0.0.1
                    value:
                      key:
                        name: LinkMonitorPolicyMessageSchema
                        version: 0.0.1
                      UUID: 6c5e410fac4b34ac-489a39d6-46ff3393-964ea267-982ce6e8b6d08d5b84854018
                      description: GeneratedA descriptionschema for conceptmessages referred to by
                        key "LinkMonitorPolicy:0.0.1"from apex
                  - key:
                      name: MessageSchemaNoPolicyDefinedTask
                      version: 0.0.1
                    value:
                      key:
                        name: MessageSchemaNoPolicyDefinedTask
                        version: 0.0.1
                      UUID: ac4b34acd48b619e-39d6d00d-33934008-a267b884-8d5b8485401802d76ea4350b
                      description: A schema for messages from apex This task sends a message to the output when an
                        event is received for which no policy has been defined.
                  - key:
                      name: NoPolicyDefinedTaskOduIdSchema
                      version: 0.0.1
                    value:
                      key:
                        name: NoPolicyDefinedTaskOduIdSchema
                        version: 0.0.1
                      UUID: d48b619e50662174-d00da88b-40083cbd-b88491bd-02d76ea4350b8e91b40b2660
                      description: This task sends a message to the output when an
                        event is received for which no policy has been defined.A schema for O-DU-ID
                  - key:
                      name: OduIdSchemaOruIdSchema
                      version: 0.0.1
                    value:
                      key:
                        name: OduIdSchemaOruIdSchema
                        version: 0.0.1
                      UUID: 5066217454daf32b-a88b015f-3cbd39cd-91bd8530-8e91b40b2660a1175c5553e9
                      description: A schema for O-DURU-ID
              policies:
    - key:
           key:
           name: OruIdSchema
       name: LinkMonitorModel_Policies
                  version: 0.0.1
                policyMap:
      value:
            entry:
                  - key:
                        name: OruIdSchemaLinkMonitorPolicy
                        version: 0.0.1
                      UUID: 54daf32b-015f-39cd-8530-a1175c5553e9value:
                      descriptionpolicyKey:
 A  schema for O-RU-ID
              policies:
     name: LinkMonitorPolicy
          key:
              version: 0.0.1
   name: LinkMonitorModel_Policies
                  versiontemplate: 0.0.1Freestyle
                policyMap:
      state:
            entry:
            entry:
      - key:
                 - key: LinkClearedState
   name: LinkMonitorPolicy
                      version: 0.0.1value:
                    value:
        stateKey:
              policyKey:
                parentKeyName: LinkMonitorPolicy
       name: LinkMonitorPolicy
                        versionparentKeyVersion: 0.0.1
                      template: Freestyle
        parentLocalName: 'NULL'
             state:
                 localName: LinkClearedState
      entry:
                      trigger:
  - key: LinkClearedState
                          valuename: CreateLinkClearedOutfieldsEvent
                            stateKey:  version: 0.0.1
                              parentKeyNamestateOutputs: LinkMonitorPolicy
                              parentKeyVersion: 0.0.1entry:
                              parentLocalName- key: 'NULL'
LinkClearedLogic_Output_Direct
                                localNamevalue: LinkClearedState

                                  triggerkey:
                                  name  parentKeyName: CreateLinkClearedOutfieldsEventLinkMonitorPolicy
                              version:       parentKeyVersion: 0.0.1
                            stateOutputs:
        parentLocalName: LinkClearedState
                     entry:
                              - keylocalName: LinkClearedLogic_Output_Direct
                                  valueoutgoingEvent:
                                    keyname: ApexMessageOutputEvent
                                    parentKeyNameversion: LinkMonitorPolicy0.0.1
                                    parentKeyVersion: 0.0.1nextState:
                                    parentLocalNameparentKeyName: LinkClearedState'NULL'
                                    localNameparentKeyVersion: LinkClearedLogic_Output_Direct
0.0.0
                                    outgoingEventparentLocalName: 'NULL'
                                    namelocalName: ApexMessageOutputEvent'NULL'
                                    version: 0.0.1contextAlbumReference: []
                                  nextStatetaskSelectionLogic:
                                    parentKeyNamekey: 'NULL'
                                    parentKeyVersionlogicFlavour: 0.0.0UNDEFINED
                                    parentLocalNamelogic: 'NULL'
                                    localName: 'NULL'
stateFinalizerLogicMap:
                              contextAlbumReferenceentry: []
                            taskSelectionLogicdefaultTask:
                              keyname: 'NULL'LinkClearedTask
                              logicFlavourversion: UNDEFINED0.0.1
                             taskReferences:
 logic: ''
                            stateFinalizerLogicMapentry:
                              - entrykey: []
                            defaultTask:
      name: LinkClearedTask
                       name: LinkClearedTask
          version: 0.0.1
                   version: 0.0.1
            value:
                taskReferences:
                  key:
            entry:
                              - key:
                                  name: LinkClearedTask
                                  version: 0.0.1
                                value:
                                  key:
                                    parentKeyName: parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkClearedState
                                    localName: LinkClearedTask
                                  outputType: DIRECT
                                  output:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkClearedState
                                    localName: LinkClearedLogic_Output_Direct
                        - key: LinkFailureOrClearedState
                          value:
                            stateKey:
                              parentKeyName: LinkMonitorPolicy
                              parentKeyVersion: 0.0.1
                              parentLocalName: 'NULL'
                              localName: LinkFailureOrClearedState
                            trigger:
                              name: LinkFailureInputEvent
                              version: 0.0.1
                            stateOutputs:
                              entry:
                              - key: CreateLinkClearedOutfieldsLogic_Output_Direct
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkClearedOutfieldsLogic_Output_Direct
                                  outgoingEvent:
                                    name: CreateLinkClearedOutfieldsEvent
                                    version: 0.0.1
                                  nextState:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: 'NULL'
                                    localName: LinkClearedState
                              - key: CreateLinkFailureOutfieldsLogic_Output_Direct
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkFailureOutfieldsLogic_Output_Direct
                                  outgoingEvent:
                                    name: CreateLinkFailureOutfieldsEvent
                                    version: 0.0.1
                                  nextState:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: 'NULL'
                                    localName: LinkFailureState
                              - key: NoPolicyDefinedLogic_Output_Direct
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: NoPolicyDefinedLogic_Output_Direct
                                  outgoingEvent:
                                    name: ApexMessageOutputEvent
                                    version: 0.0.1
                                  nextState:
                                    parentKeyName: 'NULL'
                                    parentKeyVersion: 0.0.0
                                    parentLocalName: 'NULL'
                                    localName: 'NULL'
                            contextAlbumReference: []
                            taskSelectionLogic:
                              key: TaskSelectionLogic
                              logicFlavour: JAVASCRIPT
                              logic: |-
                                /*
                                 * ============LICENSE_START=======================================================
                                 * Copyright (C) 2021 Nordix Foundation.
                                 * ================================================================================
                                 * Licensed under the Apache License, Version 2.0 (the "License");
                                 * you may not use this file except in compliance with the License.
                                 * You may obtain a copy of the License at
                                 *
                                 *      http://www.apache.org/licenses/LICENSE-2.0
                                 *
                                 * Unless required by applicable law or agreed to in writing, software
                                 * distributed under the License is distributed on an "AS IS" BASIS,
                                 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                                 * See the License for the specific language governing permissions and
                                 * limitations under the License.
                                 *
                                 * SPDX-License-Identifier: Apache-2.0
                                 * ============LICENSE_END=========================================================
                                 */
 
                                executor.logger.info("Task Selection Execution: '"+executor.subject.id+
                                    "'. InputFields: '"+executor.inFields+"'");
 
                                var linkFailureInput = executor.inFields.get("LinkFailureInput");
                                var commonEventHeader = linkFailureInput.get("event").get("commonEventHeader");
                                var domain = commonEventHeader.get("domain");
 
                                taskFailure = executor.subject.getTaskKey("CreateLinkFailureOutfieldsTask");
                                taskCleared = executor.subject.getTaskKey("CreateLinkClearedOutfieldsTask");
                                taskDefault = executor.subject.getDefaultTaskKey();
 
                                if (domain == "fault") {
                                    var faultFields = linkFailureInput.get("event").get("faultFields");
                                    var alarmCondition = faultFields.get("alarmCondition");
                                    var eventSeverity = faultFields.get("eventSeverity");
                                    if (alarmCondition == "28" && eventSeverity != "NORMAL") {
                                        taskFailure.copyTo(executor.selectedTask);
                                    } else if (alarmCondition == "28" && eventSeverity == "NORMAL") {
                                        taskCleared.copyTo(executor.selectedTask);
                                    } else {
                                        taskDefault.copyTo(executor.selectedTask);
                                    }
                                } else {
                                    taskDefault.copyTo(executor.selectedTask);
                                }
 
                                true;
                            stateFinalizerLogicMap:
                              entry: []
                            defaultTask:
                              name: NoPolicyDefinedTask
                              version: 0.0.1
                            taskReferences:
                              entry:
                              - key:
                                  name: CreateLinkClearedOutfieldsTask
                                  version: 0.0.1
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkClearedOutfieldsTask
                                  outputType: DIRECT
                                  output:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkClearedOutfieldsLogic_Output_Direct
                              - key:
                                  name: CreateLinkFailureOutfieldsTask
                                  version: 0.0.1
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkFailureOutfieldsTask
                                  outputType: DIRECT
                                  output:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: CreateLinkFailureOutfieldsLogic_Output_Direct
                              - key:
                                  name: NoPolicyDefinedTask
                                  version: 0.0.1
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: NoPolicyDefinedTask
                                  outputType: DIRECT
                                  output:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureOrClearedState
                                    localName: NoPolicyDefinedLogic_Output_Direct
                        - key: LinkFailureState
                          value:
                            stateKey:
                              parentKeyName: LinkMonitorPolicy
                              parentKeyVersion: 0.0.1
                              parentLocalName: 'NULL'
                              localName: LinkFailureState
                            trigger:
                              name: CreateLinkFailureOutfieldsEvent
                              version: 0.0.1
                            stateOutputs:
                              entry:
                              - key: LinkFailureLogic_Output_Direct
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureState
                                    localName: LinkFailureLogic_Output_Direct
                                  outgoingEvent:
                                    name: LinkFailureOutputEvent
                                    version: 0.0.1
                                  nextState:
                                    parentKeyName: 'NULL'
                                    parentKeyVersion: 0.0.0
                                    parentLocalName: 'NULL'
                                    localName: 'NULL'
                            contextAlbumReference: []
                            taskSelectionLogic:
                              key: 'NULL'
                              logicFlavour: UNDEFINED
                              logic: ''
                            stateFinalizerLogicMap:
                              entry: []
                            defaultTask:
                              name: LinkFailureTask
                              version: 0.0.1
                            taskReferences:
                              entry:
                              - key:
                                  name: LinkFailureTask
                                  version: 0.0.1
                                value:
                                  key:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureState
                                    localName: LinkFailureTask
                                  outputType: DIRECT
                                  output:
                                    parentKeyName: LinkMonitorPolicy
                                    parentKeyVersion: 0.0.1
                                    parentLocalName: LinkFailureState
                                    localName: LinkFailureLogic_Output_Direct
                      firstState: LinkFailureOrClearedState
              tasks:
                key:
                  name: LinkMonitorModel_Tasks
                  version: 0.0.1
                taskMap:
                  entry:
                  - key:
                      name: CreateLinkClearedOutfieldsTask
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkClearedOutfieldsTask
                        version: 0.0.1
                      inputFields:
                        entry:
                        - key: LinkFailureInput
                          value:
                            key: LinkFailureInput
                            fieldSchemaKey:
                              name: LinkFailureInputSchema
                              version: 0.0.1
                            optional: false
                      outputFields:
                        entry:
                        - key: OruId
                          value:
                            key: OruId
                            fieldSchemaKey:
                              name: OruIdSchema
                              version: 0.0.1
                            optional: false
                      taskParameters:
                        entry: []
                      contextAlbumReference: []
                      taskLogic:
                        key: TaskLogic
                        logicFlavour: JAVASCRIPT
                        logic: |-
                          /*
                           * ============LICENSE_START=======================================================
                           * Copyright (C) 2021 Nordix Foundation.
                           * ================================================================================
                           * Licensed under the Apache License, Version 2.0 (the "License");
                           * you may not use this file except in compliance with the License.
                           * You may obtain a copy of the License at
                           *
                           *      http://www.apache.org/licenses/LICENSE-2.0
                           *
                           * Unless required by applicable law or agreed to in writing, software
                           * distributed under the License is distributed on an "AS IS" BASIS,
                           * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                           * See the License for the specific language governing permissions and
                           * limitations under the License.
                           *
                           * SPDX-License-Identifier: Apache-2.0
                           * ============LICENSE_END=========================================================
                           */
 
                          executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
 
                          var linkFailureInput = executor.inFields.get("LinkFailureInput");
                          var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
 
                          executor.outFields.put("OruId", oruId);
 
                          executor.logger.info(executor.outFields);
 
                          true;
                  - key:
                      name: CreateLinkFailureOutfieldsTask
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkFailureOutfieldsTask
                        version: 0.0.1
                      inputFields:
                        entry:
                        - key: LinkFailureInput
                          value:
                            key: LinkFailureInput
                            fieldSchemaKey:
                              name: LinkFailureInputSchema
                              version: 0.0.1
                            optional: false
                      outputFields:
                        entry:
                        - key: OduId
                          value:
                            key: OduId
                            fieldSchemaKey:
                              name: OduIdSchema
                              version: 0.0.1
                            optional: false
                        - key: OruId
                          value:
                            key: OruId
                            fieldSchemaKey:
                              name: OruIdSchema
                              version: 0.0.1
                            optional: false
                      taskParameters:
                        entry: []
                      contextAlbumReference: []
                      taskLogic:
                        key: TaskLogic
                        logicFlavour: JAVASCRIPT
                        logic: |-
                          /*
                           * ============LICENSE_START=======================================================
                           * Copyright (C) 2021 Nordix Foundation.
                           * ================================================================================
                           * Licensed under the Apache License, Version 2.0 (the "License");
                           * you may not use this file except in compliance with the License.
                           * You may obtain a copy of the License at
                           *
                           *      http://www.apache.org/licenses/LICENSE-2.0
                           *
                           * Unless required by applicable law or agreed to in writing, software
                           * distributed under the License is distributed on an "AS IS" BASIS,
                           * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                           * See the License for the specific language governing permissions and
                           * limitations under the License.
                           *
                           * SPDX-License-Identifier: Apache-2.0
                           * ============LICENSE_END=========================================================
                           */
 
                          executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
 
                          var returnValue = true;
                          var linkFailureInput = executor.inFields.get("LinkFailureInput");
                          var oruId = linkFailureInput.get("event").get("commonEventHeader").get("sourceName");
                          var oruOduMap = JSON.parse(executor.parameters.get("ORU-ODU-Map"));
 
                          if (oruId in oruOduMap) {
                              var oduId = oruOduMap[oruId];
                              executor.outFields.put("OruId", oruId);
                              executor.outFields.put("OduId", oduId);
                              executor.logger.info(executor.outFields);
                          } else {
                              executor.message = "No O-RU found in the config with this ID: " + oruId;
                              returnValue = false;
                          }
 
                          returnValue;
                  - key:
                      name: LinkClearedTask
                      version: 0.0.1
                    value:
                      key:
                        name: LinkClearedTask
                        version: 0.0.1
                      inputFields:
                        entry:
                        - key: OruId
                          value:
                            key: OruId
                            fieldSchemaKey:
                              name: OruIdSchema
                              version: 0.0.1
                            optional: false
                      outputFields:
                        entry:
                        - key: message
                          value:
                            key: message
                            fieldSchemaKey:
                              name: MessageSchema
                              version: 0.0.1
                            optional: false
                      taskParameters:
                        entry: []
                      contextAlbumReference: []
                      taskLogic:
                        key: TaskLogic
                        logicFlavour: JAVASCRIPT
                        logic: |-
                          /*
                           * ============LICENSE_START=======================================================
                           * Copyright (C) 2021 Nordix Foundation.
                           * ================================================================================
                           * Licensed under the Apache License, Version 2.0 (the "License");
                           * you may not use this file except in compliance with the License.
                           * You may obtain a copy of the License at
                           *
                           *      http://www.apache.org/licenses/LICENSE-2.0
                           *
                           * Unless required by applicable law or agreed to in writing, software
                           * distributed under the License is distributed on an "AS IS" BASIS,
                           * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                           * See the License for the specific language governing permissions and
                           * limitations under the License.
                           *
                           * SPDX-License-Identifier: Apache-2.0
                           * ============LICENSE_END=========================================================
                           */
 
                          executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
 
                          var oruId = executor.inFields.get("OruId");
 
                          executor.outFields.put("message", "CLEARED link failure for O-RU: " + oruId);
 
                          executor.logger.info(executor.outFields);
 
                          true;
                  - key:
                      name: LinkFailureTask
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureTask
                        version: 0.0.1
                      inputFields:
                        entry:
                        - key: OduId
                          value:
                            key: OduId
                            fieldSchemaKey:
                              name: OduIdSchema
                              version: 0.0.1
                            optional: false
                        - key: OruId
                          value:
                            key: OruId
                            fieldSchemaKey:
                              name: OruIdSchema
                              version: 0.0.1
                            optional: false
                      outputFields:
                        entry:
                        - key: LinkFailureOutput
                          value:
                            key: LinkFailureOutput
                            fieldSchemaKey:
                              name: LinkFailureOutputSchema
                              version: 0.0.1
                            optional: false
                      taskParameters:
                        entry: []
                      contextAlbumReference: []
                      taskLogic:
                        key: TaskLogic
                        logicFlavour: JAVASCRIPT
                        logic: |-
                          /*
                           * ============LICENSE_START=======================================================
                           * Copyright (C) 2021 Nordix Foundation.
                           * ================================================================================
                           * Licensed under the Apache License, Version 2.0 (the "License");
                           * you may not use this file except in compliance with the License.
                           * You may obtain a copy of the License at
                           *
                           *      http://www.apache.org/licenses/LICENSE-2.0
                           *
                           * Unless required by applicable law or agreed to in writing, software
                           * distributed under the License is distributed on an "AS IS" BASIS,
                           * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
                           * See the License for the specific language governing permissions and
                           * limitations under the License.
                           *
                           * SPDX-License-Identifier: Apache-2.0
                           * ============LICENSE_END=========================================================
                           */
 
                          executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
 
                          var linkFailureOutput = executor.subject.getOutFieldSchemaHelper("LinkFailureOutput").createNewInstance();
 
                          var oruId = executor.inFields.get("OruId");
                          var oduId = executor.inFields.get("OduId");
 
                          var unlockMessageArray = new java.util.ArrayList();
                          for (var i = 0; i < 1; i++) {
                              unlockMessageArray.add({
                                  "nameid" : oruId:"rrm-pol-1",
                                  "administrativeradio_DasH_state" : "UNLOCKED"
resource_DasH_management_DasH_policy_DasH_max_DasH_ratio":25,
                                });
"radio_DasH_resource_DasH_management_DasH_policy_DasH_members":
                            }

        [
                  linkFailureOutput.put("o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection", unlockMessageArray);
                      {
       executor.outFields.put("LinkFailureOutput", linkFailureOutput.toString());

                          executor.getExecutionProperties().setProperty("OduId", oduId);
         "mobile_DasH_country_DasH_code":"310",
                 executor.getExecutionProperties().setProperty("OruId", oruId);

                          executor.logger.info(executor.outFields);
"mobile_DasH_network_DasH_code":"150",
                          true;
                  - key:"slice_DasH_differentiator":1,
                      name: NoPolicyDefinedTask
                      version: 0.0."slice_DasH_service_DasH_type":1
                    value:
                    }
  key:
                          name: NoPolicyDefinedTask
       ],
                 version: 0.0.1
              "radio_DasH_resource_DasH_management_DasH_policy_DasH_min_DasH_ratio":15,
        inputFields:
                        entry:
"user_DasH_label":"rrm-pol-1",
                               - key: LinkFailureInput "resource_DasH_type":"prb",
                          value:
      "radio_DasH_resource_DasH_management_DasH_policy_DasH_dedicated_DasH_ratio":20,
                      key: LinkFailureInput
         "administrative_DasH_state":"unlocked"
                   fieldSchemaKey:
         });
                     name: LinkFailureInputSchema
    }
 
                         version: 0.0.1linkFailureOutput.put("o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_radio_DasH_resource_DasH_management_DasH_policy_DasH_ratio", unlockMessageArray);
                          executor.outFields.put("LinkFailureOutput",  optional: falselinkFailureOutput.toString());
 
                      outputFields:
    executor.getExecutionProperties().setProperty("OduId", oduId);
                   entry:
       executor.getExecutionProperties().setProperty("OruId", oruId);
 
                - key: message
        executor.logger.info(executor.outFields);
 
                 value:
         true;
                  - key: message
                      name: NoPolicyDefinedTask
     fieldSchemaKey:
                 version: 0.0.1
            name: MessageSchema
       value:
                       version: 0.0.1key:
                        name: NoPolicyDefinedTask
   optional: false
                    version:  taskParameters:
0.0.1
                      inputFields:
   entry: []
                    entry:
  contextAlbumReference: []
                     - taskLogickey: LinkFailureInput
                        key: TaskLogic
  value:
                            logicFlavourkey: JAVASCRIPTLinkFailureInput
                            logicfieldSchemaKey: |-
                          /*
    name: LinkFailureInputSchema
                      * ============LICENSE_START=======================================================
       version: 0.0.1
                   * Copyright (C) 2021 Nordix Foundation.
     optional: false
                     * ================================================================================
 outputFields:
                        entry:
    * Licensed under the Apache License, Version 2.0 (the "License");
           - key: message
              * you may not use this file except in compliance with the License.value:
                           * Youkey: maymessage
 obtain a copy of the License at
                     fieldSchemaKey:
      *
                        name: MessageSchema
  *      http://www.apache.org/licenses/LICENSE-2.0
                      version: 0.0.1
    *
                        optional: false
  * Unless required by applicable law or agreed to in writing, software
         taskParameters:
                  * distributed under the License is distributed on an "AS IS" BASIS,
entry: []
                      contextAlbumReference: []
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   taskLogic:
                        * See the License for the specific language governing permissions andkey: TaskLogic
                           * limitations under the License.logicFlavour: JAVASCRIPT
                           *logic: |-
                           * SPDX-License-Identifier: Apache-2.0/*
                           * ============LICENSE_ENDSTART=========================================================
                           */

 Copyright (C) 2021 Nordix Foundation.
                           executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");

* ================================================================================
                           * Licensed  executor.outFields.put("message", "No policy defined for this event");
under the Apache License, Version 2.0 (the "License");
                          executor.logger.info(executor.outFields);

              * you may not use this file except in compliance with the License.
             true;
              events:
* You may obtain a copy of the         key:
  License at
                name: LinkMonitorModel_Events
                  version: 0.0.1
 *
               eventMap:
            *      entry:http://www.apache.org/licenses/LICENSE-2.0
                  - key:
        *
              name: ApexMessageOutputEvent
            * Unless required by applicable law or agreed to in version: 0.0.1writing, software
                    value:
       * distributed under the License is distributed on an "AS      key:IS" BASIS,
                        name: ApexMessageOutputEvent
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express             version: 0.0.1or implied.
                      nameSpace: org.onap.policy.apex.auth.clieditor
    * See the License for the specific language governing permissions and
        source: APEX
                  * limitations under  target: APEXthe License.
                      parameter:
     *
                   entry:
        * SPDX-License-Identifier: Apache-2.0
              - key: message
              * ============LICENSE_END=========================================================
            value:
               */
 
            key: message
             executor.logger.info("Task Execution: '"+executor.subject.id+"'. Input Fields: '"+executor.inFields+"'");
 
          fieldSchemaKey:
                executor.outFields.put("message", "No policy defined for this event");
 
       name: MessageSchema
                  executor.logger.info(executor.outFields);
 
           version: 0.0.1
              true;
              optionalevents: false
                  - key:
                      name: CreateLinkClearedOutfieldsEvent
    LinkMonitorModel_Events
                  version: 0.0.1
                eventMap:
        value:
          entry:
                  - key:
                        name: CreateLinkClearedOutfieldsEventApexMessageOutputEvent
                        version: 0.0.1
                      nameSpace: org.onap.policy.apex.auth.clieditorvalue:
                      sourcekey:
  APEX
                      target: APEXname: ApexMessageOutputEvent
                        version: 0.0.1
                      nameSpace: org.onap.policy.apex.auth.clieditor
                      source: APEX
                      target: APEX
                      parameter:
                        entry:
                        - key: OruIdmessage
                          value:
                            key: OruIdmessage
                            fieldSchemaKey:
                              name: OruIdSchemaMessageSchema
                              version: 0.0.1
                            optional: false
                  - key:
                      name: CreateLinkFailureOutfieldsEventCreateLinkClearedOutfieldsEvent
                      version: 0.0.1
                    value:
                      key:
                        name: CreateLinkFailureOutfieldsEventCreateLinkClearedOutfieldsEvent
                        version: 0.0.1
                      nameSpace: org.onap.policy.apex.auth.clieditor
                      source: APEX
                      target: APEX
                      parameter:
                        entry:
                        - key: OduIdOruId
                          value:
                            key: OduIdOruId
                            fieldSchemaKey:
                              name: OduIdSchemaOruIdSchema
                              version: 0.0.1
                            optional: false
                        - key: OruId
                      name:  CreateLinkFailureOutfieldsEvent
  value:
                    version: 0.0.1
       key: OruId
            value:
                fieldSchemaKey:
      key:
                        name: OruIdSchemaCreateLinkFailureOutfieldsEvent
                              version: 0.0.1
                      nameSpace: org.onap.policy.apex.auth.clieditor
     optional: false
                  - key:source: APEX
                      nametarget: LinkFailureInputEventAPEX
                      versionparameter: 0.0.1

                        valueentry:
                        - key: OduId
                          namevalue:
 LinkFailureInputEvent
                        version: 0.0.1
     key: OduId
                    nameSpace: org.onap.policy.apex.auth.clieditor
       fieldSchemaKey:
               source: DMAAP
              name: OduIdSchema
       target: APEX
                      parameter:version: 0.0.1
                        entry:    optional: false
                        - key: LinkFailureInputOruId
                          value:
                            key: LinkFailureInputOruId
                            fieldSchemaKey:
                              name: LinkFailureInputSchemaOruIdSchema
                              version: 0.0.1
                            optional: false
                  - key:
                      name: LinkFailureOutputEventLinkFailureInputEvent
                      version: 0.0.1
                    value:
                      key:
                        name: LinkFailureOutputEventLinkFailureInputEvent
                        version: 0.0.1
                      nameSpace: org.onap.policy.apex.auth.clieditor
                      source: APEXDMAAP
                      target: OAMAPEX
                      parameter:
                        entry:
                        - key: LinkFailureOutputLinkFailureInput
                          value:
                            key: LinkFailureOutputLinkFailureInput
                            fieldSchemaKey:
                              name: LinkFailureOutputSchemaLinkFailureInputSchema
                              version: 0.0.1
                            optional: false
              schemas:
    - key:
           key:
           name: LinkFailureOutputEvent
      name: LinkMonitorModel_Schemas
                  version: 0.0.1
                schemas:
             value:
     entry:
                  - key:
                        name: LinkFailureInputSchemaLinkFailureOutputEvent
                        version: 0.0.1
                      value:nameSpace: org.onap.policy.apex.auth.clieditor
                      keysource: APEX
                        nametarget: LinkFailureInputSchemaOAM
                      parameter:
   version: 0.0.1
                    entry:
  schemaFlavour: Avro
                     - schemaDefinitionkey: |-LinkFailureOutput
                         { value:
                            "type"key: "record",LinkFailureOutput
                            "name"fieldSchemaKey: "Link_Failure_Input",

                              "fields"name: [LinkFailureOutputSchema
                                {version: 0.0.1
                            optional: false
       "name": "event",
      schemas:
                key:
              "type": {
   name: LinkMonitorModel_Schemas
                  version: 0.0.1
                 "type": "record",schemas:
                  entry:
                  - key:
    "name": "Event_Type",
                 name: LinkFailureInputSchema
                      "fields"version: [0.0.1
                    value:
                      key:
  {
                      name: LinkFailureInputSchema
                         "name"version: "commonEventHeader",0.0.1
                      schemaFlavour: Avro
                         "type"schemaDefinition: {|-
                        {
                            "type": "record",
                            "name": "Link_Failure_Input",
                            "namefields": "Common_Event_Header_Type",
[
                                {
                            "fields        "name": ["event",
                                    "type": {
                   {
                     "type": "record",
                                        "name": "domainEvent_Type",
                                        "fields": [
                   "type": "string"
                         {
                                  },
              "name": "commonEventHeader",
                                         {
       "type": {
                                                    "nametype": "eventIdrecord",
                                                            "typename": "string"Common_Event_Header_Type",
                                                    "fields": [
   },
                                                         {
                                                            "name": "eventNamedomain",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "eventTypeeventId",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "sequenceeventName",
                                                            "type": "intstring"
                                                        },
                                                        {
                                                            "name": "priorityeventType",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "reportingEntityIdsequence",
                                                            "type": "stringint"
                                                        },
                                                        {
                                                            "name": "reportingEntityNamepriority",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "sourceIdreportingEntityId",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "sourceNamereportingEntityName",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "startEpochMicrosecsourceId",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "lastEpochMicrosecsourceName",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "nfNamingCodestartEpochMicrosec",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "nfVendorNamelastEpochMicrosec",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "timeZoneOffsetnfNamingCode",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "versionnfVendorName",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "vesEventListenerVersiontimeZoneOffset",
                                                            "type": "string"
                                                        },
                                                        ]{
                                                }
            "name": "version",
                               },
                             "type": "string"
              {
                                          },
      "name": "faultFields",
                                                "type": {
                                                      "type      "name": "recordvesEventListenerVersion",
                                                     "name       "type": "Fault_Fields_Typestring",
                                                    "fields": [
   }
                                                     {]
                                                }
            "name": "faultFieldsVersion",
                               },
                             "type": "string"
              {
                                          },
      "name": "faultFields",
                                                "type": {
                                                            "name"type": "alarmConditionrecord",
                                                            "type"name": "stringFault_Fields_Type",
                                                        },"fields": [
                                                        {
                                                            "name": "alarmInterfaceAfaultFieldsVersion",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "eventSourceTypealarmCondition",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "specificProblemalarmInterfaceA",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "eventSeverityeventSourceType",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "vfStatusspecificProblem",
                                                            "type": "string"
                                                        },
                                                        {
                                                            "name": "alarmAdditionalInformationeventSeverity",
                                                            "type": {"string"
                                                        },
          "type": "record",
                                              {
                    "name": "Alarm_Additional_Information_Type",
                                                                "fieldsname": ["vfStatus",
                                                                    {"type": "string"
                                                                        "name": "eventTime"},
                                                                        "type": "string"{
                                                                    }"name": "alarmAdditionalInformation",
                                                                   "type": {
                                                                        "nametype": "equipTyperecord",
                                                                        "typename": "string"Alarm_Additional_Information_Type",
                                                                    },"fields": [
                                                                    {
                                                                        "name": "vendoreventTime",
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "name": "modelequipType",
                                                                        "type": "string"
                                                                    },
                                                                ]
    {
                                                        }
                "name": "vendor",
                                       }
                                 "type": "string"
                    ]
                                                },
                                            }
                        {
                ]
                                    }
                    "name": "model",
           }
                            ]
                        }
         "type": "string"
        - key:
                      name: LinkFailureOutputSchema
                      version: 0.0.1
              }
          value:
                      key:
                        name: LinkFailureOutputSchema
       ]
                 version: 0.0.1
                      schemaFlavour: Avro
                   }
   schemaDefinition: "{\n    \"type\": \"record\",\n    \"name\":
                        \"Link_Failure_Output\",\n    \"fields\": [\n        {\n      }
      \"name\":
                        \"o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_du_DasH_to_DasH_ru_DasH_connection\",\n
                      ]
  \           \"type\": {\n        \t\"type\": \"array\",\n
                        \ }
      \t\"items\": {\n\t\t    \"name\": \"Config_Change_Message\",\n
                        \        }
           \"type\": \"record\",\n                    \"fields\":
        ]
                [\n                    }
    {\n                            \"name\":}
                        \"name\",\n    ]
                        \"type\": \"string\"\n}
                  - key:
     \                 name: LinkFailureOutputSchema
     },\n\t\t\t{\n                 version: 0.0.1
          \"name\":
          value:
              \"administrative_DasH_state\",\n        key:
                    \"type\":
    name: LinkFailureOutputSchema
                   \"string\"\n     version: 0.0.1
                  }\n    schemaFlavour: Avro
               ]\n
       schemaDefinition: "{\n  \"name\": \"Link_Failure_Output\",\n  \"type\": \"record\",\n  \"fields\": [\n       {\n      \"name\": \"o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_radio_DasH_resource_DasH_management_DasH_policy_DasH_ratio\",\n        }\n"type\t    }": {\n        }\n    ]\n}"
"type\": \"array\",\n        \"items\": {\n         - key\"name\":
  \"o_DasH_ran_DasH_sc_DasH_du_DasH_hello_DasH_world_ColoN_radio_DasH_resource_DasH_management_DasH_policy_DasH_ratio_record\",\n          \"type\": \"record\",\n          name\"fields\": MessageSchema
[\n            {\n          version: 0.0.1
   \"name\": \"id\",\n                value:
 \"type\": \"string\"\n             },\n        key:
    {\n                    name: MessageSchema
\"name\": \"radio_DasH_resource_DasH_management_DasH_policy_DasH_max_DasH_ratio\",\n                        version: 0.0.1
\"type\": \"int\"\n            },\n          schemaFlavour: Java
 {\n              \"name\": \"radio_DasH_resource_DasH_management_DasH_policy_DasH_members\",\n      schemaDefinition: java.lang.String
       \"type\": {\n          - key:
     \"type\": \"array\",\n                name\"items\": OduIdSchema
{\n                      version: 0.0.1
\"name\": \"radio_DasH_resource_DasH_management_DasH_policy_DasH_members_record\",\n                    value:
 \"type\": \"record\",\n                     key:
 \"fields\": [\n                    {\n   name: OduIdSchema
                        version: 0.0.1
\"name\": \"mobile_DasH_country_DasH_code\",\n                      schemaFlavour\"type\": Java
\"string\"\n                    },\n  schemaDefinition: java.lang.String
                 {\n - key:
                      \"name\": OruIdSchema
\"mobile_DasH_network_DasH_code\",\n                      version: 0.0.1
\"type\": \"string\"\n                    value:
},\n                    {\n  key:
                    \"name\": \"slice_DasH_differentiator\",\n   name: OruIdSchema
                  \"type\": \"int\"\n       version: 0.0.1
            },\n          schemaFlavour: Java
         {\n             schemaDefinition: java.lang.String
        eventOutputParameters:
\"name\": \"slice_DasH_service_DasH_type\",\n          RestProducer:
            carrierTechnologyParameters\"type\":
 \"int\"\n             carrierTechnology: RESTCLIENT
      }\n         parameterClassName: org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
        ]\n      parameters:
          }\n      url: http://sdnr-simulator.nonrtric:9990/rests/data/network-topology:network-topology/topology=topology-netconf/node={OduId}/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection={OruId}
       }\n         httpMethod: PUT
  },\n            {\n  httpHeaders:
            \"name\": \"radio_DasH_resource_DasH_management_DasH_policy_DasH_min_DasH_ratio\",\n   - - Authorization
         \"type\": \"int\"\n          - Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==
 },\n            eventProtocolParameters:
{\n              eventProtocol: JSON
\"name\": \"user_DasH_label\",\n              parameters\"type\":
 \"string\"\n            },\n   pojoField: LinkFailureOutput
         {\n   eventNameFilter: LinkFailureOutputEvent
          StdOutProducer\"name\":
  \"resource_DasH_type\",\n           carrierTechnologyParameters:
   \"type\": \"string\"\n          carrierTechnology: FILE
 },\n            {\n parameters:
             \"name\": \"radio_DasH_resource_DasH_management_DasH_policy_DasH_dedicated_DasH_ratio\",\n  standardIo: true
            eventProtocolParameters:
 \"type\": \"int\"\n            },\n eventProtocol: JSON
          {\n    parameters:
          \"name\": \"administrative_DasH_state\",\n              \"type\": \"string\"\n     pojoField: message
        }\n          ]\n eventNameFilter: ApexMessageOutputEvent
      }\n  eventInputParameters:
    }\n    }\n  DMaaPConsumer:]\n}"
            carrierTechnologyParameters      - key:
                   carrierTechnology   name: RESTCLIENT
MessageSchema
                      parameterClassNameversion: org0.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
0.1
                 parameters   value:
                   url: http://message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT/users/link-monitor-nonrtric?timeout=15000&limit=100   key:
            eventProtocolParameters:            name: MessageSchema
              eventProtocol: JSON
         version: 0.0.1
    parameters:
                  versionAliasschemaFlavour: versionJava
                 pojoField     schemaDefinition: LinkFailureInput
java.lang.String
              eventName: LinkFailureInputEvent

NOTE: The default hostname/port for sdnr-simulator and message-router are specified in lines 1547 and 1573 respectively of the above file. They should be replaced with actual values if using different hostname/port.

After commissioning the above tosca template, control loop can be instantiated using the steps described in previous sub-section. Once the control loop is in RUNNING state, the below steps can be done to test the correct working of the apex policy.

  • First of all, deploy the sdnr-simulator in the cluster (if not using the real SDNR in ONAP). The sdnr simulator can be found in the nonrtric repo of OSC.
Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout e-release --track origin/e-release
cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/
helm package .
helm install sdnr-simulator sdnr-simulator-0.1.0.tgz --set image.repository=registry.nordix.org/onap/sdnr-simulator --set image.tag=1.0.0 --set messagerouter.host="http://message-router.onap" --set messagerouter.port="3904" --namespace nonrtric --create-namespace --wait
  • In order to make sure that the apex policy has been deployed successfully, the REST APIs for policy-pap and policy-api components can be used. However, these components do not expose the NodePorts. Hence, a NodePort needs to be opened for accessing each of these APIs.
Code Block
languagebash
kubectl expose deployment def-policy-pap --type=NodePort --name=policy-pap-public
kubectl expose deployment def-policy-api --type=NodePort --name=policy-api-public
  • Find the NodePort numbers allocated in the cluster for these two components.
Code Block
languagebash
kubectl -n onap get svc | grep policy-pap-public
kubectl -n onap get svc | grep policy-api-public
  • Making this REST call to the policy-api component should return the deployed policy.
Code Block
languagebash
curl -k -u 'healthcheck:zb!XztG34' -X GET "https://<NodeIP>:<NodePort-policy-api>/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.linkmonitor/versions/1.0.0"
  • The status of deployed policy can be checked by making a REST call to policy-pap component.
Code Block
languagebash
curl -k -u 'healthcheck:zb!XztG34' -X GET "https://<NodeIP>:<NodePort-policy-pap>/policy/pap/v1/policies/status"

The above command should show a state of "SUCCESS" for the LinkMonitor policy.

  • Finally, to test that the apex policy is actually working, an example LinkFailureEvent can be sent to the DmaaP MR.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor
curl -k -X POST -H accept:application/json -H Content-Type:application/json "https://<NodeIP>:<NodePort-message-router>/events/unauthenticated.SEC_FAULT_OUTPUT/" -d @./events/LinkFailureEvent.json

The logs of the sdnr-simulator should show that a PUT request has been successfully received.

"PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=HCL-O-DU-1123/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection=ERICSSON-O-RU-11225 HTTP/1.1" 200

b) Control loop for script version

This sub-section describes the steps required for bringing up the control loop with script version of the usecase. The tosca template to be used for commissioning this control loop is given below. The steps for commissioning are depicted in the sub-section Commission/Instantiate control loop via GUI.

Code Block
languageyml
titlecommission.yaml
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_1_0
data_types:
  onap.datatypes.ToscaConceptIdentifier:
    derived_from: tosca.datatypes.Root
    properties:
    - key:
                      name: OduIdSchema
                      version: 0.0.1
                    value:
                      key:
                        name: OduIdSchema
        type: string
        required: true
      version:
   0.0.1
                 type     schemaFlavour: string
Java
               required: true
node_types:
  org.onap.policy.clamp.controlloop.Participant:
    versionschemaDefinition: 1java.0lang.1String
    derived_from: tosca.nodetypes.Root
              - propertieskey:
       provider:
               typename: stringOruIdSchema
         requred: false
  org.onap.policy.clamp.controlloop.ControlLoop:
             version: 10.0.1
         derived_from: tosca.nodetypes.Root
    properties:
      providervalue:
         type: string
             requredkey:
 false
      elements:
        type: list
        requiredname: trueOruIdSchema
        entry_schema:
          type: onap.datatypes.ToscaConceptIdentifier
  org.onap.policy.clamp.controlloop.ControlLoopElement:
    version: 10.0.1
    derived_from: tosca.nodetypes.Root
    properties:
      provider:
        typeschemaFlavour: stringJava
        requred: false
      participant_id:
        typeschemaDefinition: onapjava.datatypeslang.ToscaConceptIdentifierString
        requredeventOutputParameters:
  true
  org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement:
        RestProducer:
            carrierTechnologyParameters:
              versioncarrierTechnology: 1.0.1
RESTCLIENT
         derived_from     parameterClassName: org.onap.policy.clamp.controlloop.ControlLoopElement
.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters
      properties:
        chartparameters:
        type: string
        required: true
url: http://sdnr-simulator.nonrtric:9990/rests/data/network-topology:network-topology/topology=topology-netconf/node={OduId}/yang-ext:mount/o-ran-sc-du-hello-world:network-function/distributed-unit-functions={OduId}/radio-resource-management-policy-ratio=rrm-pol-1
        configs:
        typehttpMethod: listPUT
        required:  false
      requirementshttpHeaders:
        type: string
       - requred:- falseAuthorization
      templates:
        type: list
   - Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==
   required: false
        entry_schemaeventProtocolParameters:
      values:
        typeeventProtocol: stringJSON
           requred: true
topology_template:
  node_templatesparameters:
    org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition1:
            versionpojoField: 1.2.3LinkFailureOutput
      type: org.onap.policy.clamp.controlloop.ControlLoop
      eventNameFilter: LinkFailureOutputEvent
        type_version: 1.0.1
  StdOutProducer:
       description: Control loop for Link MonitorcarrierTechnologyParameters:
      properties:
        providercarrierTechnology: EricssonFILE
          elements:
    parameters:
    - name: org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement
          versionstandardIo: 1.2.3true
        -    nameeventProtocolParameters: org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement

              versioneventProtocol: 1.2.3
JSON
             - nameparameters: org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement

           version: 1.2.3
    org.onap.k8s.controlloop.K8SControlLoopParticipant:pojoField: message
      version: 2.3.4
      typeeventNameFilter: org.onap.policy.clamp.controlloop.Participant
ApexMessageOutputEvent
        type_versioneventInputParameters:
 1.0.1
      description: Participant for k8sDMaaPConsumer:
      properties:
      carrierTechnologyParameters:
   provider: ONAP
    org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement:
      versioncarrierTechnology: 1.2.3RESTCLIENT
      type:         parameterClassName: org.onap.policy.apex.clampplugins.controlloop.K8SMicroserviceControlLoopElement
      type_version: 1.0.1
 event.carrier.restclient.RestClientCarrierTechnologyParameters
     description: Control loop element for oru-app
      propertiesparameters:
        provider: ONAP
        participant_idurl:
          name: K8sParticipant0
          version: 1.0.0
   http://message-router:3904/events/unauthenticated.SEC_FAULT_OUTPUT/users/link-monitor-nonrtric?timeout=15000&limit=100
      participantType:
          name: org.onap.k8s.controlloop.K8SControlLoopParticipanteventProtocolParameters:
          version: 2.3.4
        chart:
   eventProtocol: JSON
       chartId:
            name: oru-appparameters:
            version: 0.1.0
          releaseNameversionAlias: oru-appversion
          repository:
             repoNamepojoField: chartmuseumLinkFailureInput
          namespace: nonrtric
          overrideParams:
            image.repository: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-o-ru-closed-loop-recovery
            image.tag: 1.0.0
            messagerouter.host:  eventName: LinkFailureInputEvent


NOTE: The default hostname/port for sdnr-simulator and message-router are specified in lines 1547 and 1573 respectively of the above file. They should be replaced with actual values if using different hostname/port.


After commissioning the above tosca template, control loop can be instantiated using the steps described in previous sub-section. Once the control loop is in RUNNING state, the below steps can be done to test the correct working of the apex policy.

  • First of all, deploy the sdnr-simulator in the cluster (if not using the real SDNR in ONAP). The sdnr simulator can be found in the nonrtric repo of OSC.
Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout -b e-release --track origin/e-release

cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/
helm package .

helm install sdnr-simulator sdnr-simulator-0.1.0.tgz --set image.repository=registry.nordix.org/onap/sdnr-simulator --set image.tag=1.0.0 --set messagerouter.host="http://message-router.onap
            " --set messagerouter.port: ="3904
" --namespace nonrtric --create-namespace --wait
  • In order to make sure that the apex policy has been deployed successfully, the REST APIs for policy-pap and policy-api components can be used. However, these components do not expose the NodePorts. Hence, a NodePort needs to be opened for accessing each of these APIs.
Code Block
languagebash
kubectl expose deployment def-policy-pap --type=NodePort --name=policy-pap-public

kubectl expose deployment def-policy-api --type=NodePort --name=policy-api-public
  • Find the NodePort numbers allocated in the cluster for these two components.
Code Block
languagebash
kubectl -n onap get svc | grep policy-pap-public

kubectl -n onap get svc | grep policy-api-public
  • Making this REST call to the policy-api component should return the deployed policy.
Code Block
languagebash
curl -k -u 'policyadmin:zb!XztG34' -X GET "https://<NodeIP>:<NodePort-policy-api>/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.linkmonitor/versions/1.0.0"
  • The status of deployed policy can be checked by making a REST call to policy-pap component.
Code Block
languagebash
curl -k -u 'policyadmin:zb!XztG34' -X GET "https://<NodeIP>:<NodePort-policy-pap>/policy/pap/v1/policies/status"

The above command should show a state of "SUCCESS" for the LinkMonitor policy.

  • Finally, to test that the apex policy is actually working, an example LinkFailureEvent can be sent to the DmaaP MR.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor

curl -k -X POST -H accept:application/json -H Content-Type:application/json "https://<NodeIP>:<NodePort-message-router>/events/unauthenticated.SEC_FAULT_OUTPUT/" -d @./events/LinkFailureEvent.json

The logs of the sdnr-simulator should show that a PUT request has been successfully received.

"PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=HCL-O-DU-1123/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection=ERICSSON-O-RU-11225 HTTP/1.1" 200


b) Control loop for script version

This sub-section describes the steps required for bringing up the control loop with script version of the usecase. The tosca template to be used for commissioning this control loop is given below. The steps for commissioning are depicted in the sub-section Commission/Instantiate control loop via GUI.

Code Block
languageyml
titlecommission.yaml
linenumberstrue
collapsetrue
tosca_definitions_version: tosca_simple_yaml_1_1_0
data_types:
  onap.datatypes.ToscaConceptIdentifier:
    derived_from: tosca.datatypes.Root
    properties:
      name:    sdnr.host: http://sdnr-simulator
            sdnr.port: 9990
    org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
      type_version: 1.0.1
      description: Control loop element for message-generator
      properties:
        provider: ONAP
        participant_id:
          name: K8sParticipant0
          version: 1.0.0
        participantType:
          name: org.onap.k8s.controlloop.K8SControlLoopParticipant
          version: 2.3.4
        chart:
          chartId:
            name: message-generator
            version: 0.1.0
          releaseName: message-generator
        type:  repository:string
        required: true
      repoNameversion: chartmuseum
          namespacetype: nonrtricstring
          overrideParamsrequired: true
node_types:
  org.onap.policy.clamp.controlloop.Participant:
    version: 1.0.1
     image.repositoryderived_from: registrytosca.nordix.org/onap/message-generatornodetypes.Root
    properties:
      provider:
  image.tag: 1.0.0
            messagerouter.host: http://message-router.onaptype: string
            messagerouter.portrequred: 3904false
    org.onap.policy.domainclamp.linkmonitorcontrolloop.SdnrSimulatorK8SMicroserviceControlLoopElementControlLoop:
      version: 1.20.31
      typederived_from: orgtosca.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElementnodetypes.Root
      type_version: 1.0.1properties:
      descriptionprovider:
 Control loop element for sdnr-simulator
      properties:type: string
        providerrequred: ONAPfalse
        participant_idelements:
          nametype: K8sParticipant0list
          versionrequired: 1.0.0true
        participantTypeentry_schema:
          nametype: onap.datatypes.ToscaConceptIdentifier
  org.onap.policy.k8sclamp.controlloop.K8SControlLoopParticipantControlLoopElement:
    version: 1.0.1
     versionderived_from: 2tosca.3nodetypes.4Root
    properties:
      chartprovider:
        type:  chartId:string
        requred:  false
  name: sdnr-simulator
   participant_id:
         versiontype: 0onap.1datatypes.0ToscaConceptIdentifier
          releaseNamerequred: sdnr-simulatortrue
  org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement:
        repository:version: 1.0.1
    derived_from: org.onap.policy.clamp.controlloop.ControlLoopElement
    properties:
      chart:
        type: string
        required: true
      configs:
        type: list
        required: false
      requirements:
        type: string
        requred: false
      templates:
        type: list
        required: false
        entry_schema:
      values:
        type: string
        requred: true
topology_template:
  node_templates:
    org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition1:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.ControlLoop
      type_version: 1.0.1
      description: Control loop for Link Monitor
      properties:
        provider: Ericsson
        elements:
        - name: org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement
          version: 1.2.3
        - name: org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement
          version: 1.2.3
        - name: org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement
          version: 1.2.3
    org.onap.k8s.controlloop.K8SControlLoopParticipant:
      version: 2.3.4
      type: org.onap.policy.clamp.controlloop.Participant
      type_version: 1.0.1
      description: Participant for k8s
      properties:
        provider: ONAP
    org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
      type_version: 1.0.1
      description: Control loop element for oru-app
      properties:
        provider: ONAP
        participant_id:
          name: K8sParticipant0
          version: 1.0.0
        participantType:
          name: org.onap.k8s.controlloop.K8SControlLoopParticipant
          version: 2.3.4
        chart:
          chartId:
            name: oru-app
            version: 0.1.0
          releaseName: oru-app
          repository:
             repoName: chartmuseum
          namespace: nonrtric
          overrideParams:
            image.repository: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-o-ru-closed-loop-recovery
            image.tag: 1.0.1
            messagerouter.host: http://message-router.onap
            messagerouter.port: 3904
            sdnr.host: http://sdnr-simulator
            sdnr.port: 9990
    org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
      type_version: 1.0.1
      description: Control loop element for message-generator
      properties:
        provider: ONAP
        participant_id:
          name: K8sParticipant0
          version: 1.0.0
        participantType:
          name: org.onap.k8s.controlloop.K8SControlLoopParticipant
          version: 2.3.4
        chart:
          chartId:
            name: message-generator
            version: 0.1.0
          releaseName: message-generator
          repository:
             repoName: chartmuseum
          namespace: nonrtric
          overrideParams:
            image.repository: registry.nordix.org/onap/message-generator
            image.tag: 1.0.0
            messagerouter.host: http://message-router.onap
            messagerouter.port: 3904
    org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement:
      version: 1.2.3
      type: org.onap.policy.clamp.controlloop.K8SMicroserviceControlLoopElement
      type_version: 1.0.1
      description: Control loop element for sdnr-simulator
      properties:
        provider: ONAP
        participant_id:
          name: K8sParticipant0
          version: 1.0.0
        participantType:
          name: org.onap.k8s.controlloop.K8SControlLoopParticipant
          version: 2.3.4
        chart:
          chartId:
            name: sdnr-simulator
            version: 0.1.0
          releaseName: sdnr-simulator
          repository:
             repoName: chartmuseum
          namespace: nonrtric
          overrideParams:
            image.repository: registry.nordix.org/onap/sdnr-simulator
            image.tag: 1.0.0
            messagerouter.host: http://message-router.onap
            messagerouter.port: 3904

This control loop will bring up three micro-services in the nonrtric namespace: oru-app (running the actual logic of the usecase), message-generator (sending the LinkFailure messages at random intervals), and sdnr-simulator (for receiving the REST calls made by oru-app). Make sure that the sdnr-simulator is not already running in the nonrtric namespace, otherwise the control loop instantiation might fail.

NOTE: The default hostname/port for sdnr and message-router are specified in overrideParams of the above file. They should be replaced with actual values if using different hostname/port.f


Before commissioning this tosca template, some preparations need to be done in the kubernetes-participant component of the clamp.

  • First step is to copy the kube config file of the cluster inside the kubernetes-participant. Find the pod-name of this component using:
Code Block
languagebash
kubectl -n onap get pod | grep k8s-ppnt

Copy the config file using this command:

Code Block
languagebash
kubectl cp ~/.kube/config onap/<POD-NAME-k8s-ppnt>:/home/policy/.kube/config

In order to make sure that the kubernetes-participant is properly configured, get into the pod using "kubectl -n onap exec -it <POD-NAME-k8s-ppnt> sh" and run the following command:

Code Block
languagebash
kubectl get ns

This should show all the namespaces in the cluster where ONAP is deployed.

  • Next step is to copy the helm charts of all three components into the kubernetes-participant. The helm charts are located in the nonrtric repo of OSC.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/
helm package .
kubectl cp ./sdnr-simulator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/sdnr-simulator-0.1.0.tgz

cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/
helm package .
kubectl cp ./message-generator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/message-generator-0.1.0.tgz

cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/
helm package .
kubectl cp ./oru-app-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/oru-app-0.1.0.tgz
  • Finally, install chartmuseum into the kubernetes-participant and push the above helm charts into it. Get into the pod using "kubectl -n onap exec -it <POD-NAME-k8s-ppnt> sh" and run the following commands:
Code Block
languagebash
mkdir -p ~/helm3-storage
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/linux/amd64/chartmuseum
chmod +x ./chartmuseum
./chartmuseum --storage local --storage-local-rootdir /home/policy/helm3-storage -port 8080 &

curl --data-binary "@local-charts/sdnr-simulator-0.1.0.tgz" http://localhost:8080/api/charts
curl --data-binary "@local-charts/message-generator-0.1.0.tgz" http://localhost:8080/api/charts
curl --data-binary "@local-charts/oru-app-0.1.0.tgz" http://localhost:8080/api/charts

helm repo add chartmuseum http://localhost:8080
helm repo update


Once the kubernetes-participant is set up, the tosca template can be commissioned. After that, the control loop can be instantiated using the steps described in the sub-section Commission/Instantiate control loop via GUI. Once the control loop is in RUNNING state, check that all three micro-services have been created in the nonrtric namespace.

Code Block
languagebash
kubectl -n nonrtric get pod

In order to test the correct working of the usecase, check logs in each of the three components. There should be messages flowing in this order:

message-generator → oru-app → sdnr-simulator


Control loops in docker

This section is related to running the control loops in a docker environment. Separate docker-compose files are available in the nonrtric repo of OSC for bringing up the apex policy as well as the script versions of the usecase. 

a) Control loop for apex policy version

This sub-section describes the steps for running the control loop for apex policy version of the usecase using docker.

  • The first step is to clone the nonrtric repo and start the DmaaP message-router. Then, two topics are created in the message-router: POLICY-CLRUNTIME-PARTICIPANT (to be used by controlloop-runtime component of policy/clamp) and unauthenticated.SEC_FAULT_OUTPUT (for handling fault notification events).
Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout e-release --track origin/e-release

cd nonrtric/test/auto-test
./startMR.sh remote docker --env-file ../common/test_env-oran-e-release.sh

docker rename message-router onap-dmaap

curl -X POST -H "Content-Type: application/json" -d "{"topicName": "POLICY-CLRUNTIME-PARTICIPANT"}" http://localhost:3904/events/POLICY-CLRUNTIME-PARTICIPANT

curl -X POST -H "Content-Type: application/json" -d "{"topicName": "unauthenticated.SEC_FAULT_OUTPUT"}" http://localhost:3904/events/unauthenticated.SEC_FAULT_OUTPUT


  • After creating the topics in the message-router, start the ONAP Policy Framework using the docker-compose file available in nonrtric repo.
Code Block
languagebash
cd nonrtric/docker-compose/docker-compose-policy-framework
docker-compose up -d


  • The next step is to start the controlloop-runtime and policy-participant components of the clamp.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/docker-compose-controlloop
docker-compose up -d

Check the logs of policy-participant using the command "docker logs -f policy-participant" and wait until these messages start appearing in the logs:

"com.att.nsa.apiClient.http.HttpClient    : --> HTTP/1.1 200 OK"

  • Once all the components get up and running, the control loop can be commissioned and instantiated. This can be done by making a REST call to the controlloop-runtime component of the clamp. The tosca template for commissioning and the instantiation payload are provided in this directory of the nonrtric repo:
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/controlloop-rest-payloads

Commission the tosca template using this REST call:

Code Block
languagebash
curl -X POST -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/yaml https://localhost:6969/onap/controlloop/v2/commission/ --data-binary @commission.yaml

It should give the following response:

{"errorDetails":null,"affectedControlLoopDefinitions":[{"name":"org.onap.domain.linkmonitor.LinkMonitorPolicyControlLoopElement","version":"1.2.3"},{"name":"org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition0","version":"1.2.3"},{"name":"org.onap.policy.controlloop.PolicyControlLoopParticipant","version":"2.3.1"}]}

Make the following REST call to instantiate the control loop:

Code Block
languagebash
curl -X POST -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/json https://localhost:6969/onap/controlloop/v2/instantiation/ --data-binary @instantiation.json

It should give the following response:

{"errorDetails":null,"affectedControlLoops":[{"name":"LinkMonitorInstance0","version":"1.0.1"}]}

Change the control loop from default UNINITIALISED state to PASSIVE using the following REST call:

Code Block
languagebash
curl -X PUT -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/json https://localhost:6969/onap/controlloop/v2/instantiation/command/ --data-binary @instantiation-command.json

It should give the same response as above.

Next step is to change the control loop from PASSIVE to RUNNING state. Edit the "instantiation-command.json" file and replace PASSIVE with RUNNING. Making the above REST call once again will change the control loop to RUNNING state.


  • Once the control loop is in RUNNING state, check whether the apex policy has been deployed successfully in the policy framework. Making the below REST call to policy-api component should return the deployed policy.
Code Block
languagebash
curl -u 'healthcheck:zb!XztG34' -X GET "http://localhost:6869/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Apex/versions/1.0.0/policies/operational.apex.linkmonitor/versions/1.0.0"

Make the below REST call to policy-pap component and make sure that it returns a state of "SUCCESS" for the deployed policy.

Code Block
languagebash
curl -u 'healthcheck:zb!XztG34' -X GET "http://localhost:6868/policy/pap/v1/policies/status"


  • Start the sdnr-simulator in a docker container that will receive the REST call made by apex policy when a link failure event is received.
Code Block
languagebash
docker run --rm --name sdnr-sim --network nonrtric-docker-net -e MR-HOST="http://onap-dmaap" -e MR-PORT="3904" registry.nordix.org/onap/sdnr-simulator:1.0.0


  • Send the example link failure event.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor

curl -X POST -H accept:application/json -H Content-Type:application/json "http://localhost:3904/events/unauthenticated.SEC_FAULT_OUTPUT/" -d @./events/LinkFailureEvent.json

The logs of sdnr-simulator should show that the following REST call is received:

"PUT /rests/data/network-topology:network-topology/topology=topology-netconf/node=HCL-O-DU-1123/yang-ext:mount/o-ran-sc-du-hello-world:network-function/du-to-ru-connection=ERICSSON-O-RU-11225 HTTP/1.1" 200 -


  • In order to stop the docker containers and free up resources on the host machine, use the following commands:
Code Block
languagebash
cd nonrtric/docker-compose/docker-compose-policy-framework
docker-compose down

cd nonrtric/test/usecases/oruclosedlooprecovery/apexpolicyversion/LinkMonitor/docker-compose-controlloop
docker-compose down

docker stop sdnr-sim
docker rm sdnr-sim

docker volume rm docker-compose-policy-framework_db-vol


b) Control loop for script version

This sub-section describes the steps for running the control loop for script version of the usecase using docker. This version of the control loop will bring up four micro-services in the nonrtric namespace: oru-app (running the actual logic of the usecase), message-generator (sending the LinkFailure messages at random intervals), sdnr-simulator (for receiving the REST calls made by oru-app), and dmaap-mr (a message-router stub where the LinkFailure messages will be sent). 

NOTE:The below instructions refer to bringing up the micro-services in a minikube cluster on the host machine, and it is assumed that the minikube is already up and running. The instructions should be modified accordingly when using a different environment.


  • The first step is to clone the nonrtric repo and start the DmaaP message-router. Then, a topic named POLICY-CLRUNTIME-PARTICIPANT is created in the message-router (to be used by controlloop-runtime component of policy/clamp).
Code Block
languagebash
git clone   repoName: chartmuseum
          namespace: nonrtric
          overrideParams:
            image.repository: registry.nordix.org/onap/sdnr-simulator
            image.tag: 1.0.0
            messagerouter.host: http://message-router.onap
            messagerouter.port: 3904


This control loop will bring up three micro-services in the nonrtric namespace: oru-app (running the actual logic of the usecase), message-generator (sending the LinkFailure messages at random intervals), and sdnr-simulator (for receiving the REST calls made by oru-app). Make sure that the sdnr-simulator is not already running in the nonrtric namespace, otherwise the control loop instantiation might fail.

NOTE: The default hostname/port for sdnr and message-router are specified in overrideParams of the above file. They should be replaced with actual values if using different hostname/port.

Before commissioning this tosca template, some preparations need to be done in the kubernetes-participant component of the clamp.

  • First step is to copy the kube config file of the cluster inside the kubernetes-participant. Find the pod-name of the this component using:
Code Block
languagebash
kubectl -n onap get pod | grep k8s-ppnt

Copy the config file using this command:

Code Block
languagebash
kubectl cp ~/.kube/config onap/<POD-NAME-k8s-ppnt>:/home/policy/.kube/config

In order to make sure that the kubernetes-participant is properly configured, get into the pod using "kubectl -n onap exec -it <POD-NAME-k8s-ppnt> sh" and run the following command:

Code Block
languagebash
kubectl get ns

This should show all the namespaces in the cluster where ONAP is deployed.

"https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout e-release --track origin/e-release

cd nonrtric/test/auto-test
./startMR.sh remote docker --env-file ../common/test_env-oran-e-release.sh

docker rename message-router onap-dmaap

curl -X POST -H "Content-Type: application/json" -d "{"topicName": "POLICY-CLRUNTIME-PARTICIPANT"}" http://localhost:3904/events/POLICY-CLRUNTIME-PARTICIPANT


  • Build a docker image for each of the four micro-services and make it available for use inside the minikube. Open a new terminal window (keep it separate and do not run any other commands except the ones given below) and run the following commands:
Code Block
languagebash
eval $(minikube docker-env)

cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/app
docker build -t oru-app .

cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/simulators
docker build -f Dockerfile-sdnr-sim -t sdnr-simulator .
docker build -f Dockerfile-message-generator -t message-generator:v2 .

cd nonrtric/test/mrstub/
docker build -t mrstub .

Make sure that all four docker images have been successfully created by running the "docker images" command.


  • Next step is to prepare the kube config file of minikube for mounting it inside the k8s-participant component of policy/clamp. First of all, copy the kube config file inside the config directory used by docker-compose file that runs k8s-participant.
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/docker-compose-controlloop

cp ~/.kube/config ./config/kube-config

Open the copied kube-config file (located at nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/docker-compose-controlloop/config/kube-config) and make the following changes:

  1. replace everything under "cluster" with these two lines:

        server: https://host.docker.internal:<PORT>

        insecure-skip-tls-verify: true

  2. replace <PORT> with the port in original kube-config file before editing (i.e., before doing the above step)
  3. replace last two lines in the file with:

                client-certificate: /home/policy/.minikube/profiles/minikube/client.crt

                client-key: /home/policy/.minikube/profiles/minikube/client.key



  • Start all the components using this docker-compose file:
Code Block
languagebash
docker-compose up -d

Check the logs of k8s-participant using the command "docker logs -f k8s-participant" and wait until these messages start appearing in the logs:

"com.att.nsa.apiClient.http.HttpClient    : --> HTTP/1.1 200 OK"


  • Once all the components get up and running, the control loop can be commissioned and instantiated. This can be done by making a REST call to the controlloop-runtime component of the clamp. The tosca template for commissioning and the instantiation payload are provided in this directory of the nonrtric repo:Next step is to copy the helm charts of all three components into the kubernetes-participant. The helm charts are located in the nonrtric repo of OSC.
Code Block
languagebash
cd /nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/sdnr-simulator/
helm package .
kubectl cp ./sdnr-simulator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/sdnr-simulator-0.1.0.tgz

cd /nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/message-generator/
helm package .
kubectl cp ./message-generator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/message-generator-0.1.0.tgz

cd /nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/helm/oru-app/
helm package .
kubectl cp ./oru-app-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/oru-app-0.1.0.tgz

...

controlloop-rest-payloads

Commission the tosca template using this REST call:

Code Block
languagebash
curl -X POST -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/yaml https://localhost:6969/onap/controlloop/v2/commission/ --data-binary @commission.yaml

It should give the following response:

{"errorDetails":null,"affectedControlLoopDefinitions":[{"name":"org.onap.domain.linkmonitor.LinkMonitorControlLoopDefinition1","version":"1.2.3"},{"name":"org.onap.k8s.controlloop.K8SControlLoopParticipant","version":"2.3.4"},{"name":"org.onap.domain.linkmonitor.OruAppK8SMicroserviceControlLoopElement","version":"1.2.3"},{"name":"org.onap.domain.linkmonitor.MessageGeneratorK8SMicroserviceControlLoopElement","version":"1.2.3"},{"name":"org.onap.domain.linkmonitor.SdnrSimulatorK8SMicroserviceControlLoopElement","version":"1.2.3"},{"name":"org.onap.domain.linkmonitor.DmaapMrK8SMicroserviceControlLoopElement","version":"1.2.3"}]}

Make the following REST call to instantiate the control loop:

Code Block
languagebash
mkdir -p ~/helm3-storage
curl -LO https://s3.amazonaws.com/chartmuseum/release/latest/bin/linux/amd64/chartmuseum
chmod +x ./chartmuseum
./chartmuseum --storage local --storage-local-rootdir /home/policy/helm3-storage -port 8080 &

curl --data-binary "@local-charts/sdnr-simulator-0.1.0.tgz" http://localhost:8080/api/charts
curlX POST -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/json https://localhost:6969/onap/controlloop/v2/instantiation/ --data-binary "@local-charts/message-generator-0.@instantiation.json

It should give the following response:

{"errorDetails":null,"affectedControlLoops":[{"name":"LinkMonitorInstance1","version":"1.0.1"}]}

Change the control loop from default UNINITIALISED state to PASSIVE using the following REST call:

Code Block
languagebash
curl -X PUT -k -u 'healthcheck:zb!XztG34' -H Content-Type:application/json httpstgz" http://localhost:8080/api/charts
curl --data-binary "@local-charts/oru-app-0.1.0.tgz" http://localhost:8080/api/charts

helm repo add chartmuseum http://localhost:8080
helm repo update

...

6969/onap/controlloop/v2/instantiation/command/ --data-binary @instantiation-command.json

It should give the same response as above.

Next step is to change the control loop from PASSIVE to RUNNING state. Edit the "instantiation-command.json" file and replace PASSIVE with RUNNING. Making the above REST call once again will change the control loop to RUNNING state.


  • Once the control loop is in RUNNING state, check that

...

  • all four micro-services have been created in the nonrtric namespace.

    Code Block
    languagebash
    kubectl -n nonrtric get pod

    In order to test the correct working of the usecase, check logs in each of the

...

  • four components. There should be messages flowing in this order:

    message-generator → dmaap-

...

  • mr → oru-app → sdnr-simulator


  • In order to stop the docker containers and free up resources on the host machine, use the following commands:
Code Block
languagebash
cd nonrtric/test/usecases/oruclosedlooprecovery/scriptversion/docker-compose-controlloop
docker-compose down

docker volume rm docker-compose-controlloop_db-vol