Versions Compared

Key

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

...

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

    The example below shows the new flag in "

    Code Block
    languageyml
    titleorg.onap.policy.clamp.acm.HttpAutomationCompositionElement
    " definition
    definition
      org.onap.policy.clamp.acm.HttpAutomationCompositionElement:
        version: 1.0.0
        derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
        properties:
          baseUrl:
            type: string
            required: true
      
    Code Block
    languageyml
          configurationEntitiesallowChange: true
              description: The base URL to be prepended to each path, identifies the host for the REST endpoints.
          httpHeaders:
            type: map
            required: false
            allowChange: true
            entry_schema:
              type: string
            description: HTTP headers to send on REST requests
          configurationEntities:
            type: map
            required: true
             allowChange: true
            entry entry_schema:
                   type: org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.ConfigurationEntity
                   type_version: 1.0.0
                description: The configurationconnfiguration entities the Automation Composition Element is managing and their associated REST requests
    
    


  2. a new message type will be created to send to participants (AC_PROPERTIES_UPDATE) and a new message type to send back (AC_PROPERTIES_UPDATE_ACK)
  3. participants and intermediary will be update accordingly
  4. 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)
    This patch, will update the original instance saved in db.
    The example below shows endpoint and body to change the property configurationEntities of a specific instance:

...

Code Block
languageyml
titlePATCH /onap/policy/clamp/acm/v2/compositions/{{compositionId}}/instances
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

...