aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-14 09:22:15 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-14 09:22:15 +0000
commit09f3630ea990197e9d7b669aa2d6a63ec397bf3e (patch)
tree6625d3e9ac31600d86bf54a50e75dba61cc2c82a /adapters/mso-requests-db-adapter
parenta56de0e221751debd038aca5b6d20d8f9325d294 (diff)
parent38f720752af4d4aad8c4e467a288d9048659f688 (diff)
Merge "AT&T 1712 and 1802 release code"
Diffstat (limited to 'adapters/mso-requests-db-adapter')
-rw-r--r--adapters/mso-requests-db-adapter/pom.xml6
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java7
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java24
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java3
4 files changed, 30 insertions, 10 deletions
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
index 8bec34e785..582d1eafe3 100644
--- a/adapters/mso-requests-db-adapter/pom.xml
+++ b/adapters/mso-requests-db-adapter/pom.xml
@@ -62,9 +62,9 @@
</plugin>
<plugin>
- <groupId>org.jvnet.jax-ws-commons</groupId>
+ <groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
- <version>2.3</version>
+ <version>2.4.1</version>
<executions>
<execution>
<goals>
@@ -93,4 +93,4 @@
</plugin>
</plugins>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
index 877012c2fe..fa9016c69c 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -49,6 +49,8 @@ public interface MsoRequestsDbAdapter {
@WebParam(name = "vfModuleId") @XmlElement(required = false) String vfModuleId,
@WebParam(name = "volumeGroupId") @XmlElement(required = false) String volumeGroupId,
@WebParam(name = "serviceInstanceName") @XmlElement(required = false) String serviceInstanceName,
+ @WebParam(name = "configurationId") @XmlElement(required = false) String configurationId,
+ @WebParam(name = "configurationName") @XmlElement(required = false) String configurationName,
@WebParam(name = "vfModuleName") @XmlElement(required = false) String vfModuleName) throws MsoRequestsDbException;
@WebMethod
@@ -60,7 +62,6 @@ public interface MsoRequestsDbAdapter {
@WebMethod
public void updateServiceOperationStatus (@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = false) String operationId,
- @WebParam(name = "serviceName") @XmlElement(required = false) String serviceName,
@WebParam(name = "operationType") @XmlElement(required = false) String operationType,
@WebParam(name = "userId") @XmlElement(required = false) String userId,
@WebParam(name = "result") @XmlElement(required = false) String result,
@@ -73,11 +74,12 @@ public interface MsoRequestsDbAdapter {
@WebParam(name = "operationId") @XmlElement(required = true) String operationId,
@WebParam(name = "operationType") @XmlElement(required = true) String operationType,
@WebParam(name = "resourceTemplateUUIDs") @XmlElement(required = true) String resourceTemplateUUIDs) throws MsoRequestsDbException;
-
+
@WebMethod
public ResourceOperationStatus getResourceOperationStatus (@WebParam(name="serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = true) String operationId,
@WebParam(name = "resourceTemplateUUID") @XmlElement(required = true) String resourceTemplateUUID) throws MsoRequestsDbException;
+
@WebMethod
public void updateResourceOperationStatus (@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = true) String operationId,
@@ -89,5 +91,4 @@ public interface MsoRequestsDbAdapter {
@WebParam(name = "progress") @XmlElement(required = false) String progress,
@WebParam(name = "errorCode") @XmlElement(required = false) String errorCode,
@WebParam(name = "statusDescription") @XmlElement(required = false) String statusDescription) throws MsoRequestsDbException;
-
}
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index 99f6e86b00..358fe53ecb 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -61,6 +61,8 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
String vfModuleId,
String volumeGroupId,
String serviceInstanceName,
+ String configurationId,
+ String configurationName,
String vfModuleName) throws MsoRequestsDbException {
MsoLogger.setLogContext (requestId, null);
Session session = requestsDbSessionFactoryManager.getSessionFactory ().openSession ();
@@ -105,6 +107,12 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
if (vfModuleName != null) {
queryString += "vfModuleName = :vfModuleName, ";
}
+ if (configurationId != null) {
+ queryString += "configurationId = :configurationId, ";
+ }
+ if (configurationName != null) {
+ queryString += "configurationName = :configurationName, ";
+ }
if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
queryString += "endTime = :endTime, ";
} else {
@@ -165,6 +173,18 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
query.setParameter ("vfModuleName", vfModuleName);
logger.debug ("vfModuleName in updateInfraRequest is set to: " + vfModuleName);
}
+ if (configurationId != null) {
+ query.setParameter ("configurationId", configurationId);
+ logger.debug ("configurationId in updateInfraRequest is set to: " + configurationId);
+ }
+ if (configurationName != null) {
+ query.setParameter ("configurationName", configurationName);
+ logger.debug ("configurationName in updateInfraRequest is set to: " + configurationName);
+ }
+ if (vfModuleName != null) {
+ query.setParameter ("vfModuleName", vfModuleName);
+ logger.debug ("vfModuleName in updateInfraRequest is set to: " + vfModuleName);
+ }
Timestamp nowTimeStamp = new Timestamp (System.currentTimeMillis ());
if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
query.setParameter ("endTime", nowTimeStamp);
@@ -282,13 +302,11 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
* @since ONAP Amsterdam Release
*/
@Override
- public void updateServiceOperationStatus(String serviceId, String operationId, String serviceName,String operationType, String userId,
+ public void updateServiceOperationStatus(String serviceId, String operationId, String operationType, String userId,
String result, String operationContent, String progress, String reason) throws MsoRequestsDbException {
OperationStatus operStatus = new OperationStatus();
- operStatus.setResult(RequestsDbConstant.Status.PROCESSING);
operStatus.setServiceId(serviceId);
operStatus.setOperationId(operationId);
- operStatus.setServiceName(serviceName);
operStatus.setUserId(userId);
operStatus.setOperation(operationType);
operStatus.setReason(reason);
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java
index 58c77b4ad7..cebde1aa7a 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/RequestStatusType.java
@@ -56,7 +56,8 @@ public enum RequestStatusType {
COMPLETE,
FAILED,
- IN_PROGRESS;
+ IN_PROGRESS,
+ PENDING_MANUAL_TASK;
public String value() {
return name();