Merge "API doc for onap3gppServiceInstances"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Thu, 21 Oct 2021 10:51:32 +0000 (10:51 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 21 Oct 2021 10:51:32 +0000 (10:51 +0000)
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
docs/api/apis/serviceInstances-api.rst
releases/1.9.2.yaml [new file with mode: 0644]
version.properties

index 8d6e133..24c9b0f 100644 (file)
@@ -28,7 +28,10 @@ import javax.annotation.PostConstruct;
 import org.camunda.bpm.application.PreUndeploy;
 import org.camunda.bpm.application.ProcessApplicationInfo;
 import org.camunda.bpm.engine.ProcessEngine;
+import org.camunda.bpm.engine.RepositoryService;
+import org.camunda.bpm.engine.repository.Deployment;
 import org.camunda.bpm.engine.repository.DeploymentBuilder;
+import org.camunda.bpm.engine.repository.ProcessDefinition;
 import org.onap.logging.filter.spring.MDCTaskDecorator;
 import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
 import org.onap.so.db.catalog.beans.Workflow;
@@ -76,6 +79,9 @@ public class MSOInfrastructureApplication {
     @Value("${mso.async.queue-capacity}")
     private int queueCapacity;
 
+    @Value("${mso.bpmn-history-ttl:14}")
+    private Integer bpmnHistoryTtl;
+
     private static final String LOGS_DIR = "logs_dir";
     private static final String BPMN_SUFFIX = ".bpmn";
     private static final String SDC_SOURCE = "sdc";
@@ -102,8 +108,10 @@ public class MSOInfrastructureApplication {
     @PostConstruct
     public void postConstruct() {
         try {
-            DeploymentBuilder deploymentBuilder = processEngine.getRepositoryService().createDeployment();
+            RepositoryService repositoryService = processEngine.getRepositoryService();
+            DeploymentBuilder deploymentBuilder = repositoryService.createDeployment();
             deployCustomWorkflows(deploymentBuilder);
+            setBpmnTTL(repositoryService, bpmnHistoryTtl);
         } catch (Exception e) {
             logger.warn("Unable to invoke deploymentBuilder ", e);
         }
@@ -149,4 +157,18 @@ public class MSOInfrastructureApplication {
             logger.warn("Unable to deploy custom workflows ", e);
         }
     }
+
+    private void setBpmnTTL(RepositoryService repositoryService, Integer ttl) {
+        List<Deployment> deployments = repositoryService.createDeploymentQuery().list();
+        for (Deployment deployment : deployments) {
+            List<ProcessDefinition> processDefinitions =
+                    repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
+            for (ProcessDefinition processDefinition : processDefinitions) {
+                if (!ttl.equals(processDefinition.getHistoryTimeToLive())) {
+                    logger.info("Setting ttl {} for processdefinition {}", ttl, processDefinition.getName());
+                    repositoryService.updateProcessDefinitionHistoryTimeToLive(processDefinition.getId(), ttl);
+                }
+            }
+        }
+    }
 }
index 8eafe05..15ed393 100644 (file)
@@ -13,6 +13,7 @@ This API allows to generate some requests to manage:
 - vfModules attached to a vnf instance (create, delete)
 - vnfs attached to a service instance (create, delete)
 - orchestrationRequests (get)
+- CNF healthCheck
 
 links:
 
@@ -26,7 +27,7 @@ links:
 - :ref:`delete_vnf`
 - :ref:`get_orchestration_request_by_id`
 - :ref:`get_orchestration_request_all`
-
+- :ref:`healthCheck`
 
 .. _create_service_instance:
 
@@ -1293,3 +1294,108 @@ RequestStatus Object
 +-------------------------+------------------+-------------------------------------------------+
 |percentProgress          |String            |percentage of progress                           |
 +-------------------------+------------------+-------------------------------------------------+
+
+.. _healthCheck:
+
+CNF healthCheck
+++++++++++++++++
+
++--------------------+---------------------------------------------------------------------------------------------------------------+
+|Interface Definition|Description                                                                                                    |
++====================+===============================================================================================================+
+|URI                 |/onap/so/infra/serviceInstantiation/v7/serviceInstances/{serviceInstanceId}/vnfs/{vnfInstanceId}/healthcheck   |
++--------------------+---------------------------------------------------------------------------------------------------------------+
+|Operation Type      |POST                                                                                                           |
++--------------------+---------------------------------------------------------------------------------------------------------------+
+|Content-Type        |application/json                                                                                               |
++--------------------+---------------------------------------------------------------------------------------------------------------+
+
+Request Headers:
+
++-------------------+---------+-----------------------------------------------------------------------------------------+
+|Header Name        |Required |Description                                                                              |
++===================+=========+=========================================================================================+
+|Authorization      |Y        |Base64 encoded username:password                                                         |
++-------------------+---------+-----------------------------------------------------------------------------------------+
+
+Request Body:
+
++----------------+---------+-----------+--------------------------+-------------------------------------------+
+|Attribute       |Qualifier|Cardinality|Content                   |Description                                |
++================+=========+===========+==========================+===========================================+
+|requestDetails  |M        |1          |requestDetails Object     |Content of requestDetails object.          |
++----------------+---------+-----------+--------------------------+-------------------------------------------+
+
+RequestDetails Object
+
++---------------------+-------------------------+-------------------------------------------------+
+|Attribute            |Content                  |Description                                      |
++=====================+=========================+=================================================+
+|modelInfo            |modelInfo Object         |Content of modelInfo object.                     |
++---------------------+-------------------------+-------------------------------------------------+
+|cloudConfiguration   |cloudConfiguration Object|Content of cloudConfiguration object.            |
++---------------------+-------------------------+-------------------------------------------------+
+|requestInfo          |requestInfo Object       |Content of requestInfo object.                   |
++---------------------+-------------------------+-------------------------------------------------+
+|relatedInstanceList  |List                     |Content of relatedInstanceList.                  |
++---------------------+-------------------------+-------------------------------------------------+
+
+ModelInfo Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute                |Content           |Description                                      |
++=========================+==================+=================================================+
+|ModelType                |String            |Type of model                                    |
++-------------------------+------------------+-------------------------------------------------+
+|ModelInvariantId         |String            |The Model Invariant Id.                          |
++-------------------------+------------------+-------------------------------------------------+
+|ModelNameVersionId       |String            |The modelname Version Id                         |
++-------------------------+------------------+-------------------------------------------------+
+|ModelName                |String            |Name of the Model                                |
++-------------------------+------------------+-------------------------------------------------+
+|ModelVersion             |String            |Version of the model                             |
++-------------------------+------------------+-------------------------------------------------+
+|ModelCustomization Name  |String            |The Model Customization name                     |
++-------------------------+------------------+-------------------------------------------------+
+
+CloudConfiguration Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute                |Content           |Description                                      |
++=========================+==================+=================================================+
+|lcpCloudRegionId         |String            |CloudRegion Id (in A&AI)                         |
++-------------------------+------------------+-------------------------------------------------+
+|tenantId                 |String            |Name of the Subscriber                           |
++-------------------------+------------------+-------------------------------------------------+
+
+RequestInfo Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute                |Content           |Description                                      |
++=========================+==================+=================================================+
+|InstanceName             |String            |The instance Name                                |
++-------------------------+------------------+-------------------------------------------------+
+|Source                   |String            |source of the request                            |
++-------------------------+------------------+-------------------------------------------------+
+|SuppressRollback         |Boolean           |SuppressRollback                                 |
++-------------------------+------------------+-------------------------------------------------+
+
+relatedInstance List
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute                |Content           |Description                                      |
++=========================+==================+=================================================+
+|relatedInstance          |Object            |relatedInstance Object                           |
++-------------------------+------------------+-------------------------------------------------+
+
+relatedInstance List
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute                |Content           |Description                                      |
++=========================+==================+=================================================+
+|instanceId               |String            |instanceId                                       |
++-------------------------+------------------+-------------------------------------------------+
+|modelInfo                |Object            |Content of modelInfo object.                     |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName             |String            |Name of the instance                             |
++-------------------------+------------------+-------------------------------------------------+
\ No newline at end of file
diff --git a/releases/1.9.2.yaml b/releases/1.9.2.yaml
new file mode 100644 (file)
index 0000000..7c04ff1
--- /dev/null
@@ -0,0 +1,22 @@
+
+---
+distribution_type: 'container'
+container_release_tag: '1.9.2'
+project: 'so'
+log_dir: 'so-maven-docker-stage-master/880/'
+ref: 'c0c57ed8c3ca558cb09e7885a9416accd2b80a67'
+containers:
+    - name: 'so/catalog-db-adapter'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/request-db-adapter'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/openstack-adapter'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/sdnc-adapter'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/sdc-controller'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/bpmn-infra'
+      version: '1.9.2-20211012T0420'
+    - name: 'so/api-handler-infra'
+      version: '1.9.2-20211012T0420'
index ece2980..ccc7b61 100644 (file)
@@ -4,7 +4,7 @@
 
 major=1
 minor=9
-patch=1
+patch=2
 
 base_version=${major}.${minor}.${patch}