Add A1PMS participant in CSIT 42/132542/3
authoraravind.est <aravindhan.a@est.tech>
Thu, 1 Dec 2022 07:54:35 +0000 (07:54 +0000)
committerAravindhan Ayyanathan <aravindhan.a@est.tech>
Fri, 2 Dec 2022 13:45:20 +0000 (13:45 +0000)
Issue-ID: CCSDK-3816
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: Ic5b49f6e4b3ca1652cf33efc0adfab9d0c754821

csit/clamp/plans/setup.sh
csit/clamp/tests/data/PMSHMultipleACTosca.yaml
csit/config/clamp/A1pmsParticipantParameters.yaml [new file with mode: 0755]
csit/docker-compose-all.yml

index 6b11f9e..4ce4829 100755 (executable)
@@ -47,6 +47,7 @@ echo POLICY RUNTIME ACM IP IS "${POLICY_RUNTIME_ACM_IP}"
 docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-k8s-ppnt
 docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-http-ppnt
 docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-pf-ppnt
+docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d policy-clamp-ac-a1pms-ppnt
 
 sleep 10
 unset http_proxy https_proxy
@@ -55,11 +56,13 @@ POLICY_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-pf-ppnt)
 POLICY_API_IP=$(get-instance-ip.sh policy-api)
 K8S_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-k8s-ppnt)
 HTTP_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-http-ppnt)
+A1PMS_PARTICIPANT_IP=$(get-instance-ip.sh policy-clamp-ac-a1pms-ppnt)
 
 echo POLICY PARTICIPANT IP IS "${POLICY_PARTICIPANT_IP}"
 echo API IP IS "${POLICY_API_IP}"
 echo K8S PARTICIPANT IP IS "${K8S_PARTICIPANT_IP}"
 echo HTTP PARTICIPANT IP IS "${HTTP_PARTICIPANT_IP}"
+echo A1PMS PARTICIPANT IP IS "${A1PMS_PARTICIPANT_IP}"
 
 # wait for the app to start up
 "${SCRIPTS}"/wait_for_port.sh "${POLICY_PARTICIPANT_IP}" 6969
@@ -69,5 +72,6 @@ ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_RUNTIME_ACM_IP:${POLICY_RUNTIME_AC
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PARTICIPANT_IP:${POLICY_PARTICIPANT_IP}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v K8S_PARTICIPANT_IP:${K8S_PARTICIPANT_IP}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v HTTP_PARTICIPANT_IP:${HTTP_PARTICIPANT_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v A1PMS_PARTICIPANT_IP:${A1PMS_PARTICIPANT_IP}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
 
index fc4ac73..c6f61e7 100644 (file)
@@ -421,6 +421,27 @@ data_types:
               org.onap.datatypes.policy.clamp.acm.httpAutomationCompositionElement.RestRequest
             typeVersion: 1.0.0
           description: A sequence of REST commands to send to the REST endpoint
+  org.onap.datatypes.policy.clamp.acm.a1PmsAutomationCompositionElement.A1PolicyServiceEntity:
+    version: 1.0.0
+    derived_from: tosca.datatypes.Root
+    properties:
+      a1PolicyServiceEntityId:
+        type: onap.datatypes.ToscaConceptIdentifier
+        typeVersion: 1.0.0
+        required: true
+        description: The name and version of a Configuration Entity to be handled by the A1 PMS Automation Composition Element
+      clientId:
+        type: string
+        required: true
+        description: Client Id to be created
+      callbackUrl:
+        type: string
+        required: true
+        description: The callback URL to get registered
+      keepAliveIntervalSeconds:
+        type: integer
+        required: true
+        description: Keep alive interval time for the callback URL
 policy_types:
   onap.policies.Monitoring:
     derived_from: tosca.policies.Root
@@ -690,6 +711,17 @@ node_types:
         description: >-
           The connfiguration entities the Automation Composition Element is
           managing and their associated REST requests
+  org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement:
+    version: 1.0.1
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      policyServiceEntities:
+        type: list
+        required: true
+        entry_schema:
+          type: org.onap.datatypes.policy.clamp.acm.a1pmsAutomationCompositionElement.A1PolicyServiceEntity
+          typeVersion: 1.0.0
+        description: The configuration entities of A1 PMS policy services
 topology_template:
   inputs:
     pmsh_monitoring_policy:
@@ -845,6 +877,36 @@ topology_template:
                   "DN":"ManagedElement=1,ENodeBFunction=1,EUtranCell=CityCenter1,
                   EUtranCellRelation=CityCenter3" } ] } } ] } }
                 expectedResponse: 201
+    org.onap.k8s.acm.A1PMSAutomationCompositionParticipant:
+      version: 2.3.4
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for A1 PMS requests
+      properties:
+        provider: ONAP
+    org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement
+      type_version: 1.0.1
+      description: Automation composition element for the A1 PMS Requests
+      properties:
+        provider: ONAP
+        participantType:
+          name: org.onap.policy.clamp.acm.A1PMSParticipant
+          version: 2.3.4
+        policyServiceEntities:
+          - a1PolicyServiceEntityId:
+              name: entity1
+              version: 1.0.1
+            clientId: firstService
+            callbackUrl: http://localhost
+            keepAliveIntervalSeconds: 0
+          - a1PolicyServiceEntityId:
+              name: entity2
+              version: 1.0.1
+            clientId: secondService
+            callbackUrl: http://127.0.0.1
+            keepAliveIntervalSeconds: 0
     org.onap.domain.sample.GenericK8s_AutomationCompositionDefinition:
       version: 1.2.3
       type: org.onap.policy.clamp.acm.AutomationComposition
@@ -859,6 +921,9 @@ topology_template:
           - name: >-
               org.onap.domain.database.Http_PMSHMicroserviceAutomationCompositionElement
             version: 1.2.3
+          - name: >-
+              org.onap.domain.database.PMSH_A1PMSAutomationCompositionElement
+            version: 1.2.3
           - name: >-
               org.onap.domain.pmsh.PMSH_MonitoringPolicyAutomationCompositionElement
             version: 1.2.3
diff --git a/csit/config/clamp/A1pmsParticipantParameters.yaml b/csit/config/clamp/A1pmsParticipantParameters.yaml
new file mode 100755 (executable)
index 0000000..c9b5a8a
--- /dev/null
@@ -0,0 +1,59 @@
+spring:
+  security:
+    user:
+      name: participantUser
+      password: zb!XztG34
+  autoconfigure:
+    exclude:
+      - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+      - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
+security:
+  enable-csrf: false
+
+a1pms:
+  baseUrl: http://a1policymanagement.onap:8081
+  headers:
+    content-type: application/json
+  endpoints:
+    health: /a1-policy/v2/rics
+    services: /a1-policy/v2/services
+    service: /a1-policy/v2/services/{service_id}
+
+participant:
+  intermediaryParameters:
+    reportingTimeIntervalMs: 120000
+    description: Participant Description
+    participantId:
+      name: A1PMSParticipant0
+      version: 1.0.0
+    participantType:
+      name: org.onap.policy.clamp.acm.A1PMSParticipant
+      version: 2.3.4
+    clampAutomationCompositionTopics:
+      topicSources:
+        - topic: POLICY-ACRUNTIME-PARTICIPANT
+          servers:
+            - ${topicServer:message-router}
+          topicCommInfrastructure: dmaap
+          fetchTimeout: 15000
+      topicSinks:
+        - topic: POLICY-ACRUNTIME-PARTICIPANT
+          servers:
+            - ${topicServer:message-router}
+          topicCommInfrastructure: dmaap
+
+
+management:
+  endpoints:
+    web:
+      base-path: /
+      exposure:
+        include: health, metrics, prometheus
+server:
+  port: 6969
+  ssl:
+    enabled: false
+  servlet:
+    context-path: /onap/policy/clamp/acm/a1pmsparticipant
\ No newline at end of file
index d8f485b..e64ac8a 100644 (file)
@@ -305,6 +305,23 @@ services:
         'message-router', '3904',
         'api', '6969'
         ]
+   policy-clamp-ac-a1pms-ppnt:
+      image: ${CONTAINER_LOCATION}onap/policy-clamp-ac-a1pms-ppnt:${POLICY_CLAMP_VERSION}
+      container_name: policy-clamp-ac-a1pms-ppnt
+      depends_on:
+       - simulator
+      hostname: policy-clamp-ac-a1pms-ppnt
+      ports:
+       - 30296:6969
+      volumes:
+       - ./config/clamp/A1pmsParticipantParameters.yaml:/opt/app/policy/clamp/etc/A1pmsParticipantParameters.yaml:ro
+       - ./config/clamp/logback.xml:/opt/app/policy/clamp/etc/logback.xml:ro
+       - ./wait_for_port.sh:/opt/app/policy/bin/wait_for_port.sh:ro
+      entrypoint: /opt/app/policy/bin/wait_for_port.sh
+      command: [
+        '-c', './a1pms-participant.sh',
+        'message-router', '3904'
+        ]
    policy-gui:
      image: ${CONTAINER_LOCATION}onap/policy-gui:latest
      container_name: policy-gui