aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java7
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java21
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java13
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java9
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java1
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java7
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json4
-rw-r--r--version.properties6
8 files changed, 57 insertions, 11 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
index 84ff054a7c..7feaa9c4c3 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -27,6 +27,7 @@ import javax.xml.bind.annotation.XmlElement;
import org.onap.so.adapters.requestsdb.exceptions.MsoRequestsDbException;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.beans.InstanceNfvoMapping;
+import org.onap.so.db.request.beans.OperationStatus;
import org.onap.so.db.request.beans.ResourceOperationStatus;
/**
@@ -77,6 +78,12 @@ public interface MsoRequestsDbAdapter {
public boolean getSiteStatus(@WebParam(name = "siteName") @XmlElement(required = true) String siteName);
@WebMethod
+ public OperationStatus getServiceOperationStatus(
+ @WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
+ @WebParam(name = "operationId") @XmlElement(required = false) String operationId)
+ throws MsoRequestsDbException;
+
+ @WebMethod
public void updateServiceOperationStatus(
@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = false) String operationId,
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index b262cb21cb..8782cce34a 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -222,6 +222,27 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
/**
+ * get the operation status
+ *
+ * @param serviceId
+ * @param operationId
+ * @return operationStatus
+ * @throws MsoRequestsDbException
+ */
+ @Override
+ @Transactional
+ public OperationStatus getServiceOperationStatus(String serviceId, String operationId)
+ throws MsoRequestsDbException {
+ OperationStatus operationStatus;
+ if (operationId.isEmpty()) {
+ operationStatus = operationStatusRepository.findOneByServiceId(serviceId);
+ } else {
+ operationStatus = operationStatusRepository.findOneByServiceIdAndOperationId(serviceId, operationId);
+ }
+ return operationStatus;
+ }
+
+ /**
* update operation status <br>
*
* @param serviceId
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
index 4517811494..0df2575ed5 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaVIDRequest.java
@@ -66,6 +66,9 @@ public class CamundaVIDRequest {
@JsonProperty(CommonConstants.SERVICE_INSTANCE_ID_VARIABLE)
private CamundaInput serviceInstanceId;
+ @JsonProperty(CommonConstants.OPERATION_TYPE)
+ private CamundaInput operationType;
+
@JsonProperty(CommonConstants.PNF_CORRELATION_ID)
private CamundaInput pnfCorrelationId;
@@ -194,6 +197,16 @@ public class CamundaVIDRequest {
this.serviceInstanceId = serviceInstanceId;
}
+ @JsonProperty(CommonConstants.OPERATION_TYPE)
+ public CamundaInput getOperationType() {
+ return operationType;
+ }
+
+ @JsonProperty(CommonConstants.OPERATION_TYPE)
+ public void setOperationType(CamundaInput operationType) {
+ this.operationType = operationType;
+ }
+
@JsonProperty(CommonConstants.PNF_CORRELATION_ID)
public CamundaInput getPnfCorrelationId() {
return pnfCorrelationId;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index bc8af6e690..d4e00743e2 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -111,7 +111,8 @@ public class CamundaClient extends RequestClient {
parameterObject.getVnfType(), parameterObject.getVfModuleType(), parameterObject.getNetworkType(),
parameterObject.getRequestDetails(), parameterObject.getApiVersion(), parameterObject.isaLaCarte(),
parameterObject.getRequestUri(), parameterObject.getRecipeParamXsd(),
- parameterObject.getInstanceGroupId(), parameterObject.isGenerateIdsOnly());
+ parameterObject.getInstanceGroupId(), parameterObject.isGenerateIdsOnly(),
+ parameterObject.getOperationType());
StringEntity input = new StringEntity(jsonReq);
input.setContentType(CommonConstants.CONTENT_TYPE_JSON);
@@ -170,7 +171,7 @@ public class CamundaClient extends RequestClient {
String serviceInstanceId, String pnfCorrelationId, String vnfId, String vfModuleId, String volumeGroupId,
String networkId, String configurationId, String serviceType, String vnfType, String vfModuleType,
String networkType, String requestDetails, String apiVersion, boolean aLaCarte, String requestUri,
- String paramXsd, String instanceGroupId, boolean generateIdsOnly) {
+ String paramXsd, String instanceGroupId, boolean generateIdsOnly, String operationType) {
String jsonReq = null;
try {
@@ -182,6 +183,7 @@ public class CamundaClient extends RequestClient {
CamundaIntegerInput recipeTimeoutInput = new CamundaIntegerInput();
CamundaInput requestActionInput = new CamundaInput();
CamundaInput serviceInstanceIdInput = new CamundaInput();
+ CamundaInput operationTypeInput = new CamundaInput();
CamundaInput pnfCorrelationIdInput = new CamundaInput();
CamundaInput vnfIdInput = new CamundaInput();
CamundaInput vfModuleIdInput = new CamundaInput();
@@ -199,7 +201,7 @@ public class CamundaClient extends RequestClient {
CamundaInput instanceGroupIdInput = new CamundaInput();
CamundaBooleanInput generateIds = new CamundaBooleanInput();
-
+ operationTypeInput.setValue(StringUtils.defaultString(operationType));
requestIdInput.setValue(StringUtils.defaultString(requestId));
isBaseVfModuleInput.setValue(isBaseVfModule);
recipeTimeoutInput.setValue(recipeTimeout);
@@ -231,6 +233,7 @@ public class CamundaClient extends RequestClient {
camundaRequest.setRecipeTimeout(recipeTimeoutInput);
camundaRequest.setRequestAction(requestActionInput);
camundaRequest.setServiceInstanceId(serviceInstanceIdInput);
+ camundaRequest.setOperationType(operationTypeInput);
camundaRequest.setPnfCorrelationId(pnfCorrelationIdInput);
camundaRequest.setVnfId(vnfIdInput);
camundaRequest.setVfModuleId(vfModuleIdInput);
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
index 6d2bbfc613..d667126afa 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CommonConstants.java
@@ -54,6 +54,7 @@ public final class CommonConstants {
public static final String RECIPE_TIMEOUT_VARIABLE = "recipeTimeout";
public static final String REQUEST_ACTION_VARIABLE = "requestAction";
public static final String SERVICE_INSTANCE_ID_VARIABLE = "serviceInstanceId";
+ public static final String OPERATION_TYPE = "operationType";
public static final String PNF_CORRELATION_ID = "pnfCorrelationId";
public static final String VNF_ID_VARIABLE = "vnfId";
public static final String VF_MODULE_ID_VARIABLE = "vfModuleId";
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
index 94c62a9689..2e1e37193d 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/onap/so/apihandler/common/CamundaClientTest.java
@@ -10,9 +10,9 @@
* 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.
@@ -160,11 +160,12 @@ public class CamundaClientTest {
boolean aLaCarte = true;
String requestUri = "v7/serviceInstances/assign";
String instanceGroupId = "ff305d54-75b4-431b-adb2-eb6b9e5ff000";
+ String operationType = "activation";
String testResult = testClient.wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction,
serviceInstanceId, pnfCorrelationId, vnfId, vfModuleId, volumeGroupId, networkId, configurationId,
serviceType, vnfType, vfModuleType, networkType, requestDetails, apiVersion, aLaCarte, requestUri, "",
- instanceGroupId, false);
+ instanceGroupId, false, operationType);
String expected = inputStream("/WrappedVIDRequest.json");
JSONAssert.assertEquals(expected, testResult, false);
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
index 3353f8c7ce..6eebb5f703 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
+++ b/mso-api-handlers/mso-api-handler-common/src/test/resources/CamundaClientTest/WrappedVIDRequest.json
@@ -95,6 +95,10 @@
"generateIdsOnly": {
"value": false,
"type": "Boolean"
+ },
+ "operationType": {
+ "value": "activation",
+ "type": "String"
}
}
}
diff --git a/version.properties b/version.properties
index 248a45d8a7..922c4fa961 100644
--- a/version.properties
+++ b/version.properties
@@ -3,12 +3,8 @@
# because they are used in Jenkins, whose plug-in doesn't support
major=1
-<<<<<<< HEAD (cd5d60 Docker file for NSSMF-ADAPTER)
minor=6
-=======
-minor=7
->>>>>>> CHANGE (7192a4 update the arch diag for the F release)
-patch=0
+patch=1
base_version=${major}.${minor}.${patch}