summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-requests-db')
-rw-r--r--mso-api-handlers/mso-requests-db/pom.xml4
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java3
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java69
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java34
-rw-r--r--mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml2
6 files changed, 107 insertions, 8 deletions
diff --git a/mso-api-handlers/mso-requests-db/pom.xml b/mso-api-handlers/mso-requests-db/pom.xml
index 5ef683b444..82bf6af659 100644
--- a/mso-api-handlers/mso-requests-db/pom.xml
+++ b/mso-api-handlers/mso-requests-db/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>mso-api-handlers</artifactId>
- <version>1.3.0-SNAPSHOT</version>
+ <version>1.4.0-SNAPSHOT</version>
</parent>
<artifactId>mso-requests-db</artifactId>
@@ -36,4 +36,4 @@
<build>
<finalName>${project.artifactId}</finalName>
</build>
-</project> \ No newline at end of file
+</project>
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
index b66e027a35..aa7b79765b 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/ArchivedInfraRequests.java
@@ -85,7 +85,8 @@ public class ArchivedInfraRequests extends InfraRequests {
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
.append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
- .append("operationalEnvName", getOperationalEnvName()).toString();
+ .append("operationalEnvName", getOperationalEnvName())
+ .append("requestUrl", getRequestUrl()).toString();
}
}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
index 348fc524ef..08aaeb9960 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraActiveRequests.java
@@ -89,6 +89,7 @@ public class InfraActiveRequests extends InfraRequests {
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
.append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
- .append("operationalEnvName", getOperationalEnvName()).toString();
+ .append("operationalEnvName", getOperationalEnvName())
+ .append("requestUrl", getRequestUrl()).toString();
}
}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
index 4a46a0d00d..0959cf61d4 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/beans/InfraRequests.java
@@ -57,6 +57,12 @@ public abstract class InfraRequests implements java.io.Serializable {
private String requestStatus;
@Column(name = "STATUS_MESSAGE", length = 2000)
private String statusMessage;
+ @Column(name = "ROLLBACK_STATUS_MESSAGE", length = 2000)
+ private String rollbackStatusMessage;
+ @Column(name = "FLOW_STATUS", length = 2000)
+ private String flowStatus;
+ @Column(name = "RETRY_STATUS_MESSAGE", length = 2000)
+ private String retryStatusMessage;
@Column(name = "PROGRESS", precision = 11)
private Long progress;
@@ -137,7 +143,13 @@ public abstract class InfraRequests implements java.io.Serializable {
private String operationalEnvId;
@Column(name = "OPERATIONAL_ENV_NAME", length = 200)
private String operationalEnvName;
-
+ @Column(name = "INSTANCE_GROUP_ID", length = 45)
+ private String instanceGroupId;
+ @Column(name = "INSTANCE_GROUP_NAME", length = 200)
+ private String instanceGroupName;
+ @Column(name = "REQUEST_URL", length = 500)
+ private String requestUrl;
+
@ResourceId
public URI getRequestURI() {
return URI.create(this.requestId);
@@ -182,6 +194,30 @@ public abstract class InfraRequests implements java.io.Serializable {
public void setStatusMessage(String statusMessage) {
this.statusMessage = statusMessage;
}
+
+ public String getRollbackStatusMessage() {
+ return this.rollbackStatusMessage;
+ }
+
+ public void setRollbackStatusMessage(String rollbackStatusMessage) {
+ this.rollbackStatusMessage = rollbackStatusMessage;
+ }
+
+ public String getFlowStatus() {
+ return this.flowStatus;
+ }
+
+ public void setFlowStatus(String flowStatus) {
+ this.flowStatus = flowStatus;
+ }
+
+ public String getRetryStatusMessage() {
+ return this.retryStatusMessage;
+ }
+
+ public void setRetryStatusMessage(String retryStatusMessage) {
+ this.retryStatusMessage = retryStatusMessage;
+ }
public Long getProgress() {
return this.progress;
@@ -493,6 +529,30 @@ public abstract class InfraRequests implements java.io.Serializable {
this.operationalEnvName = operationalEnvName;
}
+ public String getInstanceGroupId() {
+ return instanceGroupId;
+ }
+
+ public void setInstanceGroupId(String instanceGroupId) {
+ this.instanceGroupId = instanceGroupId;
+ }
+
+ public String getInstanceGroupName() {
+ return instanceGroupName;
+ }
+
+ public void setInstanceGroupName(String instanceGroupName) {
+ this.instanceGroupName = instanceGroupName;
+ }
+
+ public String getRequestUrl() {
+ return this.requestUrl;
+ }
+
+ public void setRequestUrl(String requestUrl) {
+ this.requestUrl = requestUrl;
+ }
+
@PrePersist
protected void onCreate() {
if (requestScope == null)
@@ -532,7 +592,8 @@ public abstract class InfraRequests implements java.io.Serializable {
public String toString() {
return new ToStringBuilder(this).append("requestId", getRequestId())
.append("clientRequestId", getClientRequestId()).append("action", getAction())
- .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage())
+ .append("requestStatus", getRequestStatus()).append("statusMessage", getStatusMessage()).append("rollbackStatusMessage", getRollbackStatusMessage())
+ .append("flowStatus", getFlowStatus()).append("retryStatusMessage", getRetryStatusMessage())
.append("progress", getProgress()).append("startTime", getStartTime()).append("endTime", getEndTime())
.append("source", getSource()).append("vnfId", getVnfId()).append("vnfName", getVnfName())
.append("vnfType", getVnfType()).append("serviceType", getServiceType())
@@ -551,6 +612,8 @@ public abstract class InfraRequests implements java.io.Serializable {
.append("networkName", getNetworkName()).append("networkType", getNetworkType())
.append("requestorId", getRequestorId()).append("configurationId", getConfigurationId())
.append("configurationName", getConfigurationName()).append("operationalEnvId", getOperationalEnvId())
- .append("operationalEnvName", getOperationalEnvName()).toString();
+ .append("operationalEnvName", getOperationalEnvName())
+ .append("instanceGroupId", getInstanceGroupId()).append("instanceGroupName", getInstanceGroupName())
+ .append("requestUrl", getRequestUrl()).toString();
}
}
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java
new file mode 100644
index 0000000000..76418629e1
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/exceptions/NoEntityFoundException.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * 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.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.request.exceptions;
+public class NoEntityFoundException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 545820289784366486L;
+
+ public NoEntityFoundException(String errorMessage) {
+ super(errorMessage);
+ }
+
+
+}
diff --git a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml
index c4dd60356b..670d16b6c7 100644
--- a/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml
+++ b/mso-api-handlers/mso-requests-db/src/test/resources/application-test.yaml
@@ -16,7 +16,7 @@ mso:
# H2
spring:
datasource:
- url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
+ jdbc-url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;
username: sa
password: sa
driver-class-name: org.h2.Driver