Versions Compared

Key

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

...

This work is covered in 

Jira
serverONAP Jira
columnIdsissuekey,summary,issuetype,created,updated,duedate,assignee,reporter,priority,status,resolution
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyPOLICY-4415


Currently, properties can be updated on AC Instances when they are undeployed. 

  1. The AC definition should flag that indicates whether a property can be updated on a deployed instance or not. The default is that the property cannot be changed when an instance is deployed.
  2. We need a new message between ACM Runtime and the participant intermediary to handle this
  3. We need a new Java API message between the Participant Intermediary and the participant implementation


Initial Proposal

  1. "allowChange" flag should be provide by the user in AC definition properties.

    The example below shows the new flag in "org.onap.policy.clamp.acm.HttpAutomationCompositionElement" definition

          configurationEntities:
            type: map
            required: true
            allowChange: true
            entry_schema:
              type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
              type_version: 1.0.0
            description: The configuration entities the Automation Composition Element is managing and their associated REST requests
  2. will create a new message type to send participant (AC_PROPERTIES_UPDATE) and new message type to send back (AC_PROPERTIES_UPDATE_ACK)




When a client needs to replace an existing Resource entirely, they can use PUT. When they're doing a partial update, they can use HTTP PATCH. (https://www.baeldung.com/http-put-patch-difference-spring
- PATCH /onap/policy/clamp/acm/v2/compositions/{{compositionId}}/instances
# example
name: DemoInstance0
version: 1.0.1
compositionId: {{compositionId}}
instanceId: {{instanceId}}
elements:

  709c62b3-8918-41b9-a747-d21eb79c6c24:
    id: 709c62b3-8918-41b9-a747-d21eb79c6c24
    definition:
      name: onap.policy.clamp.ac.element.Http_StarterAutomationCompositionElement
      version: 1.2.3
    properties:
      configurationEntities:
        - configurationEntityId:
            name: onap.policy.clamp.ac.starter
            version: 1.0.0
          restSequence:
            - restRequestId:
                name: request1
                version: 1.0.1
              httpMethod: POST
              path: /onap/policy/clamp/acelement/v2/activate
              body: '{ "receiverId": { "name": "onap.policy.clamp.ac.startertobridge", "version": "1.0.0" }, "timerMs": 10000, "elementType": "STARTER", "topicParameterGroup": { "server": "message-router:3904", "listenerTopic": "POLICY_UPDATE_MSG", "publisherTopic": "AC_ELEMENT_MSG", "fetchTimeout": 10000, "topicCommInfrastructure": "dmaap" } }'
              expectedResponse: 201

- Questions:
    Does this update, change the original instance saved?
    Can this update, be used as operational action instead of a configuration update? (I think that is not raccumanted)
- create a new TRANSITIONAL STATE (example UPDATING) to show the current instance element state.
  Could it be the LookState {  "lockState": "UPDATING", "deployState":"DEPLOYED"  } or {  "lockState": "LOCKED", "deployState":"UPDATING"  }
- participant do not designed for update will ignore the message
- transitional state where is allowed to update properties (LOCK,UNLOCK?)
- when runtime receive the message back the transitional state will return in the original status
- move policy to instance to be updated (in undeploy and deploy if allowed) (could be done later)