summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Lott (cl778h) <clott@research.att.com>2017-08-17 21:59:09 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-08-17 22:00:09 -0400
commita6214cfb46570297c71fea29ee68014892a2484b (patch)
tree36dc070100fad4e79161e0b157f0b26a33e405bb
parent9015d0d86d23a83e578ded1bd95485d467515208 (diff)
Revise for Jenkins failure, reviewer comments
1. Add skip-deploy plugin config. 2. Define an application exception and use it. Issue: CCSDK-61 Change-Id: I9ad527ff2169619edbb0a1f27576ae47413b9ee4 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
-rw-r--r--ecd-app-common/pom.xml42
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java7
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/ConsulController.java5
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardHomeController.java5
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardRestrictedBaseController.java3
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/exception/OOMDashboardException.java26
-rw-r--r--ecd-app-common/src/main/java/org/onap/oom/dashboard/rest/ControllerRestClientMockImpl.java5
-rw-r--r--ecd-app-os/pom.xml9
-rw-r--r--ecd-app-os/src/main/webapp/WEB-INF/conf/system.properties.vm-ep-dev371
-rw-r--r--ecd-app-overlay/pom.xml41
-rw-r--r--pom.xml64
11 files changed, 119 insertions, 159 deletions
diff --git a/ecd-app-common/pom.xml b/ecd-app-common/pom.xml
index fcfcdb8..07aea5d 100644
--- a/ecd-app-common/pom.xml
+++ b/ecd-app-common/pom.xml
@@ -1,25 +1,15 @@
<?xml version="1.0"?>
-<!--
- =============LICENSE_START=========================================================
-
- =================================================================================
- Copyright (c) 2017 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=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
- -->
+<!-- =============LICENSE_START=========================================================
+ =================================================================================
+ Copyright (c) 2017 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -138,6 +128,16 @@
</executions>
</plugin>
+ <!-- no deployment needed -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
index 31e888c..ed2c903 100644
--- a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/CloudifyController.java
@@ -31,6 +31,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.onap.oom.dashboard.exception.OOMDashboardException;
import org.onap.oom.dashboard.model.CloudifyBlueprint;
import org.onap.oom.dashboard.model.CloudifyBlueprintUpload;
import org.onap.oom.dashboard.model.CloudifyDeployment;
@@ -123,7 +124,7 @@ public class CloudifyController extends DashboardRestrictedBaseController {
* @param pageSize
* Number of items per browser page
* @return JSON block as String, see above.
- * @throws Exception
+ * @throws OOMDashboardException
* On any error; e.g., Network failure.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
@@ -141,7 +142,7 @@ public class CloudifyController extends DashboardRestrictedBaseController {
Collections.sort(itemList, deploymentComparator);
break;
default:
- throw new Exception("getItemListForPage failed: unimplemented case: " + option.name());
+ throw new OOMDashboardException("getItemListForPage failed: unimplemented case: " + option.name());
}
// Shrink if needed
@@ -169,7 +170,7 @@ public class CloudifyController extends DashboardRestrictedBaseController {
try {
User appUser = UserUtils.getUserSession(request);
if (appUser == null || appUser.getLoginId() == null || appUser.getLoginId().length() == 0)
- throw new Exception("getItemListForPageWrapper: Failed to get application user");
+ throw new OOMDashboardException("getItemListForPageWrapper: Failed to get application user");
int pageNum = getRequestPageNumber(request);
int pageSize = getRequestPageSize(request);
outboundJson = getItemListForPage(appUser.getId(), option, pageNum, pageSize);
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/ConsulController.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/ConsulController.java
index 06e80e9..5d75759 100644
--- a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/ConsulController.java
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/ConsulController.java
@@ -31,6 +31,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
+import org.onap.oom.dashboard.exception.OOMDashboardException;
import org.onap.oom.dashboard.model.ConsulHealthServiceRegistration;
import org.onap.oom.dashboard.model.ConsulNodeInfo;
import org.onap.oom.dashboard.model.ConsulServiceHealth;
@@ -134,7 +135,7 @@ public class ConsulController extends DashboardRestrictedBaseController {
itemList = restClient.getDatacenters();
break;
default:
- throw new Exception("getItemListForPage failed: unimplemented case: " + option.name());
+ throw new OOMDashboardException("getItemListForPage failed: unimplemented case: " + option.name());
}
// Shrink if needed
@@ -161,7 +162,7 @@ public class ConsulController extends DashboardRestrictedBaseController {
try {
User appUser = UserUtils.getUserSession(request);
if (appUser == null || appUser.getLoginId() == null || appUser.getLoginId().length() == 0)
- throw new Exception("getItemListForPageWrapper: Failed to get application user");
+ throw new OOMDashboardException("getItemListForPageWrapper: Failed to get application user");
int pageNum = getRequestPageNumber(request);
int pageSize = getRequestPageSize(request);
outboundJson = getItemListForPage(appUser.getId(), option, pageNum, pageSize);
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardHomeController.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardHomeController.java
index 997e5dd..a0c521d 100644
--- a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardHomeController.java
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardHomeController.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import org.onap.oom.dashboard.domain.ControllerEndpoint;
+import org.onap.oom.dashboard.exception.OOMDashboardException;
import org.onap.oom.dashboard.model.ControllerEndpointCredentials;
import org.onap.oom.dashboard.model.ControllerEndpointTransport;
import org.onap.oom.dashboard.model.RestResponseError;
@@ -106,7 +107,7 @@ public class DashboardHomeController extends DashboardRestrictedBaseController {
try {
User appUser = UserUtils.getUserSession(request);
if (appUser == null || appUser.getLoginId() == null || appUser.getLoginId().length() == 0)
- throw new Exception("getControllers: Failed to get application user");
+ throw new OOMDashboardException("getControllers: Failed to get application user");
ControllerEndpointCredentials selectedInDb = getOrSetControllerEndpointSelection(appUser.getId());
// Built result from properties
ArrayList<ControllerEndpointTransport> list = new ArrayList<>();
@@ -147,7 +148,7 @@ public class DashboardHomeController extends DashboardRestrictedBaseController {
String outboundJson = null;
User appUser = UserUtils.getUserSession(request);
if (appUser == null || appUser.getLoginId() == null || appUser.getLoginId().length() == 0)
- throw new Exception("setControllerSelection: Failed to get application user");
+ throw new OOMDashboardException("setControllerSelection: Failed to get application user");
ControllerEndpoint dbEntry = new ControllerEndpoint(appUser.getId(), endpoint.getName(), endpoint.getUrl());
controllerEndpointService.updateControllerEndpointSelection(dbEntry);
RestResponseSuccess success = new RestResponseSuccess("Updated selection to " + endpoint.getName());
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardRestrictedBaseController.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardRestrictedBaseController.java
index c921608..28b336c 100644
--- a/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardRestrictedBaseController.java
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/controller/DashboardRestrictedBaseController.java
@@ -28,6 +28,7 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.onap.oom.dashboard.domain.ControllerEndpoint;
+import org.onap.oom.dashboard.exception.OOMDashboardException;
import org.onap.oom.dashboard.model.ControllerEndpointCredentials;
import org.onap.oom.dashboard.rest.ControllerRestClientImpl;
import org.onap.oom.dashboard.rest.ControllerRestClientMockImpl;
@@ -237,7 +238,7 @@ public class DashboardRestrictedBaseController extends RestrictedBaseController
protected IControllerRestClient getControllerRestClient(HttpServletRequest request) throws Exception {
User appUser = UserUtils.getUserSession(request);
if (appUser == null || appUser.getLoginId() == null || appUser.getLoginId().length() == 0)
- throw new Exception("getControllerRestClient: Failed to get application user");
+ throw new OOMDashboardException("getControllerRestClient: Failed to get application user");
return getControllerRestClient(appUser.getId());
}
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/exception/OOMDashboardException.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/exception/OOMDashboardException.java
new file mode 100644
index 0000000..5fac7c5
--- /dev/null
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/exception/OOMDashboardException.java
@@ -0,0 +1,26 @@
+package org.onap.oom.dashboard.exception;
+
+/**
+ * A little something to placate the Sonar code-analysis tool.
+ */
+public class OOMDashboardException extends Exception {
+
+ private static final long serialVersionUID = -1373841666122351816L;
+
+ public OOMDashboardException() {
+ super();
+ }
+
+ public OOMDashboardException(String message) {
+ super(message);
+ }
+
+ public OOMDashboardException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public OOMDashboardException(Throwable cause) {
+ super(cause);
+ }
+
+}
diff --git a/ecd-app-common/src/main/java/org/onap/oom/dashboard/rest/ControllerRestClientMockImpl.java b/ecd-app-common/src/main/java/org/onap/oom/dashboard/rest/ControllerRestClientMockImpl.java
index bd855ea..b8f5d77 100644
--- a/ecd-app-common/src/main/java/org/onap/oom/dashboard/rest/ControllerRestClientMockImpl.java
+++ b/ecd-app-common/src/main/java/org/onap/oom/dashboard/rest/ControllerRestClientMockImpl.java
@@ -30,6 +30,7 @@ import java.util.List;
import java.util.Map;
import java.util.Scanner;
+import org.onap.oom.dashboard.exception.OOMDashboardException;
import org.onap.oom.dashboard.model.CloudifyBlueprintContent;
import org.onap.oom.dashboard.model.CloudifyBlueprintList;
import org.onap.oom.dashboard.model.CloudifyBlueprintUpload;
@@ -73,7 +74,7 @@ public class ControllerRestClientMockImpl implements IControllerRestClient {
try {
InputStream is = getClass().getResourceAsStream(path);
if (is == null)
- throw new Exception("Failed to find resource at path " + path);
+ throw new OOMDashboardException("Failed to find resource at path " + path);
Scanner scanner = new Scanner(is, "UTF-8");
result = scanner.useDelimiter("\\A").next();
scanner.close();
@@ -303,7 +304,7 @@ public class ControllerRestClientMockImpl implements IControllerRestClient {
List<ConsulServiceHealthHistory> list9 = client.getServiceHealthHistory("mock", Instant.now(), Instant.now());
if (list1 == null || list2 == null || list3 == null || list4 == null || list5 == null || list6 == null
|| list7 == null || list8 == null || list9 == null)
- throw new Exception("Failed");
+ throw new OOMDashboardException("Failed");
System.out.println("Pass.");
}
diff --git a/ecd-app-os/pom.xml b/ecd-app-os/pom.xml
index 30cc0ca..12368b1 100644
--- a/ecd-app-os/pom.xml
+++ b/ecd-app-os/pom.xml
@@ -106,6 +106,15 @@
</overlays>
</configuration>
</plugin>
+ <!-- no deployment needed -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/ecd-app-os/src/main/webapp/WEB-INF/conf/system.properties.vm-ep-dev3 b/ecd-app-os/src/main/webapp/WEB-INF/conf/system.properties.vm-ep-dev3
deleted file mode 100644
index 2ce2a1e..0000000
--- a/ecd-app-os/src/main/webapp/WEB-INF/conf/system.properties.vm-ep-dev3
+++ /dev/null
@@ -1,71 +0,0 @@
-###############################################################################
-# =============LICENSE_START=========================================================
-#
-# =================================================================================
-# Copyright (c) 2017 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=========================================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-###############################################################################
-# OS system.properties
-
-app_display_name = OOM Dashboard
-
-# Postgres
-db.driver=org.postgresql.Driver
-db.connectionURL=jdbc:postgresql://vm-ep-dev3.client.research.att.com:5432/ec_dash?searchpath=ecd_os_1707
-db.userName=ec_dash_user
-db.password=ec_dash_pass
-db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect
-hb.dialect=org.hibernate.dialect.PostgreSQLDialect
-
-# Hibernate
-db.min_pool_size = 5
-db.max_pool_size = 10
-hb.show_sql = false
-hb.db_reconnect = true
-hb.idle_connection_test_period = 3600
-
-# Directory with the Quantum.lic file
-files_path = /tmp
-
-application_user_id = 30000
-post_default_role_id = 16
-clustered = true
-
-#Enable Fusion Mobile capabilities for the application
-mobile_enable = false
-
-# Cache config file is needed on the classpath
-cache_config_file_path = /WEB-INF/classes/cache.ccf
-cache_switch = 199
-cache_load_on_startup = false
-
-user_name = fullName
-decryption_key = AGLDdG4D04BKm2IxIWEr8o==
-
-contact_us_link = https://www.onap.org/
-
-# An Unique 128-bit value defined to identify a specific version
-# of an application deployed on a specific virtual machine.
-# This value must be generated and updated by the application
-# which is using the ECOMP SDK at the time of its deployment.
-# Online Unique UUID generator - https://www.uuidgenerator.net/
-# ID generated for DBC to supply to EELF
-# A bogus value is cached in SCM: 12345678-..
-instance_uuid = 12345678-90ab-cdef-1234-567890abcdef
-
-# Application base URL is a proper prefix of the on-boarded URL.
-app_base_url = http://www.oom.onap.org:8080/ecd-app-os/
diff --git a/ecd-app-overlay/pom.xml b/ecd-app-overlay/pom.xml
index 8114d82..fc0f6bd 100644
--- a/ecd-app-overlay/pom.xml
+++ b/ecd-app-overlay/pom.xml
@@ -1,25 +1,15 @@
<?xml version="1.0"?>
-<!--
- =============LICENSE_START=========================================================
-
- =================================================================================
- Copyright (c) 2017 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=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
- -->
+<!-- =============LICENSE_START=========================================================
+ =================================================================================
+ Copyright (c) 2017 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=========================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@@ -50,6 +40,15 @@
<target>1.8</target>
</configuration>
</plugin>
+ <!-- no deployment needed -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
</plugins>
</build>
diff --git a/pom.xml b/pom.xml
index e04c579..7e64417 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,40 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- =============LICENSE_START=========================================================
-
- =================================================================================
- Copyright (c) 2017 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=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
- -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <!-- Maven parent project for convenience of building and cleaning -->
- <groupId>org.openecomp.controller.dashboard</groupId>
- <artifactId>ecd-app-parent</artifactId>
- <version>0</version>
- <packaging>pom</packaging>
- <name>ONAP Operations Manager Dashboard project</name>
-
- <modules>
- <module>ecd-app-common</module>
- <module>ecd-app-overlay</module>
- <module>ecd-app-os</module>
- </modules>
+ <!-- Maven parent project for convenience of building and cleaning -->
+ <groupId>org.openecomp.controller.dashboard</groupId>
+ <artifactId>ecd-app-parent</artifactId>
+ <version>0</version>
+ <packaging>pom</packaging>
+ <name>ONAP Operations Manager Dashboard project</name>
+
+ <modules>
+ <module>ecd-app-common</module>
+ <module>ecd-app-overlay</module>
+ <module>ecd-app-os</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>