summaryrefslogtreecommitdiffstats
path: root/cmso-optimizer/src/main/java/org
diff options
context:
space:
mode:
authorJerry Flood <jflood@att.com>2019-04-19 07:09:34 -0400
committerJerry Flood <jflood@att.com>2019-04-19 10:07:39 -0400
commit9407eccc5c8347c7c92d2f25590d8867213107aa (patch)
treecf97b388f99b64bac36e60ac95147fd933380116 /cmso-optimizer/src/main/java/org
parentee1816bf02d5f76548b78c46c39537ec8c1d23b0 (diff)
Rename classes to avoid duplicates
Copy jacoco exec files for upload to sonar Handle ending midnight in time window Issue-ID: OPTFRA-474 Change-Id: Id5df25e404a08e039537e4eb987838835ee12f11 Signed-off-by: Jerry Flood <jflood@att.com>
Diffstat (limited to 'cmso-optimizer/src/main/java/org')
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/CmsoEnvironmentPostProcessor.java65
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/CmsoEnvironmentPostProcessor.java2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthorizationFilter.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafAuthorizationFilter.java)6
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafFilter.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafFilter.java)6
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafPerm.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafPerm.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafSecurityConfig.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafSecurityConfig.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRole.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRoleProperties.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRoleProperties.java)4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/FilterPriority.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/FilterPriority.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/ResponseFormatter.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/ResponseFormatter.java)4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/policies/PolicyManager.java2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/timewindows/RecurringWindows.java9
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/ElementAvailability.java1
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerClient.java6
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerRequestManager.java12
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/models/OptimizerResponseUtility.java2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtClient.java9
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtRequestManager.java3
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/topology/TopologyClient.java8
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/BasicAuthenticatorFilter.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/common/BasicAuthenticatorFilter.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/CmsoRequestError.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/LogMessages.java2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/core/OptimizerManager.java4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/exceptions/CmsoException.java (renamed from cmso-optimizer/src/main/java/org/onap/optf/cmso/common/exceptions/CmsoException.java)6
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java9
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoContainerFilters.java12
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Mdc.java (renamed from cmso-optimizer/src/main/java/org/onap/observations/Mdc.java)4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/MessageHeaders.java (renamed from cmso-optimizer/src/main/java/org/onap/observations/MessageHeaders.java)34
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Observation.java (renamed from cmso-optimizer/src/main/java/org/onap/observations/Observation.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationInterface.java (renamed from cmso-optimizer/src/main/java/org/onap/observations/ObservationInterface.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationObject.java (renamed from cmso-optimizer/src/main/java/org/onap/observations/ObservationObject.java)2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/AdminToolImpl.java2
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterface.java12
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterfaceImpl.java4
-rw-r--r--cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/models/ChangeWindow.java2
36 files changed, 88 insertions, 162 deletions
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/CmsoEnvironmentPostProcessor.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/CmsoEnvironmentPostProcessor.java
deleted file mode 100644
index 5f873e3..0000000
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/CmsoEnvironmentPostProcessor.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM.
- *
- * 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.
- *
- *
- * Unless otherwise specified, all documentation contained herein is licensed under the Creative
- * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * https://creativecommons.org/licenses/by/4.0/
- *
- * Unless required by applicable law or agreed to in writing, documentation 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.
- */
-
-package org.onap.optf.cmso;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.onap.optf.cmso.common.PropertiesManagement;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.env.EnvironmentPostProcessor;
-import org.springframework.core.env.ConfigurableEnvironment;
-import org.springframework.core.env.MapPropertySource;
-import org.springframework.core.env.MutablePropertySources;
-
-/**
- * The Class CMSEnvironmentPostProcessor.
- */
-public class CmsoEnvironmentPostProcessor implements EnvironmentPostProcessor {
- // tested in ONAP springboot and this is called before all of the properties files have been
- // loaded...
- // perhaps there is a post post processor? Until this works. DB password will be in the clear in the
- /**
- * Post process environment.
- *
- * @param environment the environment
- * @param application the application
- */
- // proeprties files.
- @Override
- public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) {
- String pwd = environment.getProperty("cmso.database.password");
- if (pwd != null) {
- pwd = PropertiesManagement.getDecryptedValue(pwd);
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("spring.datasource.password", pwd);
- MapPropertySource propertySource = new MapPropertySource("abc", map);
- MutablePropertySources proeprtySources = environment.getPropertySources();
- proeprtySources.addLast(propertySource);
- }
- }
-
-}
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/CmsoEnvironmentPostProcessor.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/CmsoEnvironmentPostProcessor.java
index 5e425d0..bb47567 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/CmsoEnvironmentPostProcessor.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/CmsoEnvironmentPostProcessor.java
@@ -28,7 +28,7 @@ package org.onap.optf.cmso.optimizer;
import java.util.HashMap;
import java.util.Map;
-import org.onap.optf.cmso.common.PropertiesManagement;
+import org.onap.optf.cmso.optimizer.common.PropertiesManagement;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.core.env.ConfigurableEnvironment;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafAuthorizationFilter.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthorizationFilter.java
index ba9aa6d..230c0a0 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafAuthorizationFilter.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafAuthorizationFilter.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.io.IOException;
import java.util.List;
@@ -34,10 +34,10 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.onap.aaf.cadi.CadiWrap;
import org.onap.aaf.cadi.Permission;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.SpringProfiles;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafFilter.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafFilter.java
index 246c396..015305a 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafFilter.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafFilter.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.io.IOException;
import java.util.Properties;
@@ -34,11 +34,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.onap.aaf.cadi.PropAccess;
import org.onap.aaf.cadi.filter.CadiFilter;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.Application;
import org.onap.optf.cmso.optimizer.SpringProfiles;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.springframework.boot.web.servlet.filter.OrderedRequestContextFilter;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafPerm.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafPerm.java
index db58156..f2a95ea 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafPerm.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafPerm.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.util.HashSet;
import java.util.Set;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafSecurityConfig.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafSecurityConfig.java
index 38e9af4..1e44433 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafSecurityConfig.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafSecurityConfig.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import org.onap.optf.cmso.optimizer.SpringProfiles;
import org.springframework.context.annotation.ComponentScan;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRole.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java
index 65decec..859c3ed 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRole.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRole.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.util.ArrayList;
import java.util.List;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRoleProperties.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRoleProperties.java
index 171a11f..037c54e 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/AafUserRoleProperties.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/AafUserRoleProperties.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.io.File;
import java.io.FileInputStream;
@@ -35,9 +35,9 @@ import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import org.onap.aaf.cadi.Permission;
import org.onap.aaf.cadi.aaf.AAFPermission;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.SpringProfiles;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/FilterPriority.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/FilterPriority.java
index bfafbd8..0b22e99 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/FilterPriority.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/FilterPriority.java
@@ -24,7 +24,7 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import org.springframework.core.Ordered;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/ResponseFormatter.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/ResponseFormatter.java
index 518814e..be8656d 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/aaf/ResponseFormatter.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/aaf/ResponseFormatter.java
@@ -24,12 +24,12 @@
* limitations under the License.
******************************************************************************/
-package org.onap.optf.cmso.aaf;
+package org.onap.optf.cmso.optimizer.aaf;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
class ResponseFormatter {
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/policies/PolicyManager.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/policies/PolicyManager.java
index 58d3355..dcc5e54 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/policies/PolicyManager.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/policies/PolicyManager.java
@@ -25,10 +25,10 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.availability.policies.model.Policy;
import org.onap.optf.cmso.optimizer.availability.policies.model.TimeLimitAndVerticalTopology;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/timewindows/RecurringWindows.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/timewindows/RecurringWindows.java
index 81a848e..b3829c3 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/timewindows/RecurringWindows.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/availability/timewindows/RecurringWindows.java
@@ -37,11 +37,11 @@ import java.util.List;
import java.util.Set;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.availability.policies.model.AllowedPeriodicTime;
import org.onap.optf.cmso.optimizer.availability.policies.model.TimeLimitAndVerticalTopology;
import org.onap.optf.cmso.optimizer.availability.policies.model.TimeRange;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.ChangeWindow;
/**
@@ -128,7 +128,7 @@ public class RecurringWindows {
if (ranges.size() == 0) {
TimeRange range = new TimeRange();
range.setStartTime("00:00:00+00:00");
- range.setEndTime("23:59:59+00:00");
+ range.setEndTime("24:00:00+00:00");
ranges.add(range);
}
StringBuilder rdata = new StringBuilder();
@@ -204,6 +204,11 @@ public class RecurringWindows {
private static Instant getInstanceFromTime(String timeIn, Instant cwStartInstant) {
Instant instant = null;
Instant date = cwStartInstant.truncatedTo(ChronoUnit.DAYS);
+ // Handle ending midnight
+ if (timeIn.startsWith("24:00:00")) {
+ timeIn = "00:00:00+00:00";
+ date = date.plus(1, ChronoUnit.DAYS);
+ }
LocalDate epoch = LocalDate.ofEpochDay(0);
try {
OffsetTime offset = OffsetTime.parse(timeIn);
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/ElementAvailability.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/ElementAvailability.java
index ac5d2e7..f2193bb 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/ElementAvailability.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/ElementAvailability.java
@@ -122,6 +122,7 @@ public class ElementAvailability extends ElementWindowMapping {
if (optimizerRequest.getAdditionalDuration() != null) {
duration += optimizerRequest.getAdditionalDuration();
}
+ duration = duration * 1000;
for (String elementId : nodeInfo.keySet()) {
TopologyElementInfo info = nodeInfo.get(elementId);
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerClient.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerClient.java
index b42ff9c..88570e8 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerClient.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerClient.java
@@ -36,9 +36,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.io.IOUtils;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.PropertiesManagement;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.availability.policies.PolicyManager;
import org.onap.optf.cmso.optimizer.availability.policies.model.TimeLimitAndVerticalTopology;
import org.onap.optf.cmso.optimizer.clients.optimizer.models.OptimizerEngineResponse;
@@ -51,12 +48,15 @@ import org.onap.optf.cmso.optimizer.clients.ticketmgt.models.ActiveTicketsRespon
import org.onap.optf.cmso.optimizer.clients.topology.TopologyRequestManager;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyResponse;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.common.PropertiesManagement;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.model.Optimizer;
import org.onap.optf.cmso.optimizer.model.Request;
import org.onap.optf.cmso.optimizer.model.Ticket;
import org.onap.optf.cmso.optimizer.model.Topology;
import org.onap.optf.cmso.optimizer.model.dao.OptimizerDao;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.PolicyInfo;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerRequestManager.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerRequestManager.java
index cfe23ba..e3a4ef8 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerRequestManager.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/OptimizerRequestManager.java
@@ -22,7 +22,6 @@ package org.onap.optf.cmso.optimizer.clients.optimizer;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Optional;
import java.util.UUID;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.clients.optimizer.models.OptimizerEngineResponse;
import org.onap.optf.cmso.optimizer.clients.optimizer.models.OptimizerEngineResponse.OptimizerEngineResponseStatus;
import org.onap.optf.cmso.optimizer.clients.optimizer.models.OptimizerResults;
@@ -36,6 +35,7 @@ import org.onap.optf.cmso.optimizer.model.Response;
import org.onap.optf.cmso.optimizer.model.dao.OptimizerDao;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
import org.onap.optf.cmso.optimizer.model.dao.ResponseDao;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerResponse;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerResponse.OptimizeScheduleStatus;
@@ -76,7 +76,7 @@ public class OptimizerRequestManager {
*/
public OptimizerEngineResponse createOptimizerRequest(Request requestRow) {
//
- if (okToDispatch(false)) {
+ if (okToDispatch()) {
Optimizer optimizer = getExistingOptmizer(requestRow.getUuid());
if (optimizer == null) {
optimizer = new Optimizer();
@@ -146,14 +146,12 @@ public class OptimizerRequestManager {
- private boolean okToDispatch(boolean checkDispatchability) {
- if (checkDispatchability) {
+ private boolean okToDispatch() {
+ if (env.getProperty("ok.to.dispatch.check", Boolean.class, true)) {
// not yet implemented
- return false;
- }
- else {
return true;
}
+ return false;
}
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/models/OptimizerResponseUtility.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/models/OptimizerResponseUtility.java
index 595bc0d..a156619 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/models/OptimizerResponseUtility.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/optimizer/models/OptimizerResponseUtility.java
@@ -24,8 +24,8 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.introspector.Property;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtClient.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtClient.java
index 21f0d76..1ba21e0 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtClient.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtClient.java
@@ -39,10 +39,6 @@ import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.BasicAuthenticatorFilter;
-import org.onap.optf.cmso.common.PropertiesManagement;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.clients.common.models.ElementCriteria;
import org.onap.optf.cmso.optimizer.clients.ticketmgt.models.ActiveTicketsRequest;
import org.onap.optf.cmso.optimizer.clients.ticketmgt.models.ActiveTicketsResponse;
@@ -52,14 +48,17 @@ import org.onap.optf.cmso.optimizer.clients.topology.models.ConstraintElements;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyElementInfo;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyPolicyInfo;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyResponse;
+import org.onap.optf.cmso.optimizer.common.BasicAuthenticatorFilter;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.common.PropertiesManagement;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.filters.CmsoClientFilters;
import org.onap.optf.cmso.optimizer.model.Request;
import org.onap.optf.cmso.optimizer.model.Ticket;
import org.onap.optf.cmso.optimizer.model.Topology;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
import org.onap.optf.cmso.optimizer.model.dao.TicketDao;
-import org.onap.optf.cmso.optimizer.service.rs.models.ElementInfo;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.PolicyInfo;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtRequestManager.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtRequestManager.java
index 85ff950..df892b3 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtRequestManager.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/ticketmgt/TicketMgtRequestManager.java
@@ -21,12 +21,9 @@ package org.onap.optf.cmso.optimizer.clients.ticketmgt;
import java.util.Optional;
import java.util.UUID;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.clients.ticketmgt.models.ActiveTicketsResponse;
-import org.onap.optf.cmso.optimizer.common.LogMessages;
import org.onap.optf.cmso.optimizer.model.Request;
import org.onap.optf.cmso.optimizer.model.Ticket;
-import org.onap.optf.cmso.optimizer.model.Topology;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
import org.onap.optf.cmso.optimizer.model.dao.TicketDao;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/topology/TopologyClient.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/topology/TopologyClient.java
index ca6bdb3..6229185 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/topology/TopologyClient.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/clients/topology/TopologyClient.java
@@ -33,21 +33,21 @@ import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.BasicAuthenticatorFilter;
-import org.onap.optf.cmso.common.PropertiesManagement;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.clients.common.models.ElementCriteria;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyPolicyInfo;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyRequest;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyResponse;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyResponse.TopologyRequestStatus;
+import org.onap.optf.cmso.optimizer.common.BasicAuthenticatorFilter;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.common.PropertiesManagement;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.filters.CmsoClientFilters;
import org.onap.optf.cmso.optimizer.model.Request;
import org.onap.optf.cmso.optimizer.model.Topology;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
import org.onap.optf.cmso.optimizer.model.dao.TopologyDao;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.ElementInfo;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.PolicyInfo;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/BasicAuthenticatorFilter.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/BasicAuthenticatorFilter.java
index 4c85246..00a2971 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/BasicAuthenticatorFilter.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/BasicAuthenticatorFilter.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.optf.cmso.common;
+package org.onap.optf.cmso.optimizer.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/CmsoRequestError.java
index d56a992..0627b50 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/CmsoRequestError.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.optf.cmso.common;
+package org.onap.optf.cmso.optimizer.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/LogMessages.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/LogMessages.java
index f8d23eb..77c057c 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/LogMessages.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/LogMessages.java
@@ -35,7 +35,7 @@ import java.nio.file.Files;
import java.nio.file.Paths;
import javax.ws.rs.core.Response.Status;
import org.apache.log4j.Level;
-import org.onap.observations.ObservationInterface;
+import org.onap.optf.cmso.optimizer.observations.ObservationInterface;
/**
* The Enum LogMessages.
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java
index 79a0a79..4b68176 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/PropertiesManagement.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/common/PropertiesManagement.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.optf.cmso.common;
+package org.onap.optf.cmso.optimizer.common;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/core/OptimizerManager.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/core/OptimizerManager.java
index b61ec08..04b69b7 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/core/OptimizerManager.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/core/OptimizerManager.java
@@ -25,8 +25,6 @@ import java.util.List;
import java.util.Optional;
import java.util.UUID;
import javax.ws.rs.core.Response.Status;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.clients.optimizer.OptimizerRequestManager;
import org.onap.optf.cmso.optimizer.clients.optimizer.models.OptimizerEngineResponse;
import org.onap.optf.cmso.optimizer.clients.ticketmgt.TicketMgtRequestManager;
@@ -34,10 +32,12 @@ import org.onap.optf.cmso.optimizer.clients.ticketmgt.models.ActiveTicketsRespon
import org.onap.optf.cmso.optimizer.clients.topology.TopologyRequestManager;
import org.onap.optf.cmso.optimizer.clients.topology.models.TopologyResponse;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.model.Request;
import org.onap.optf.cmso.optimizer.model.Response;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
import org.onap.optf.cmso.optimizer.model.dao.ResponseDao;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.ChangeWindow;
import org.onap.optf.cmso.optimizer.service.rs.models.ElementInfo;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/exceptions/CmsoException.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/exceptions/CmsoException.java
index a83437f..f780390 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/common/exceptions/CmsoException.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/exceptions/CmsoException.java
@@ -24,14 +24,14 @@
* limitations under the License.
*/
-package org.onap.optf.cmso.common.exceptions;
+package org.onap.optf.cmso.optimizer.exceptions;
import com.att.eelf.i18n.EELFResourceManager;
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.core.Response.Status;
-import org.onap.observations.ObservationInterface;
-import org.onap.optf.cmso.common.CmsoRequestError;
+import org.onap.optf.cmso.optimizer.common.CmsoRequestError;
+import org.onap.optf.cmso.optimizer.observations.ObservationInterface;
/**
* The Class CMSException.
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
index fffd53e..07bca5b 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoClientFilters.java
@@ -27,18 +27,17 @@
package org.onap.optf.cmso.optimizer.filters;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-
import java.io.IOException;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.ClientResponseContext;
import javax.ws.rs.client.ClientResponseFilter;
import javax.ws.rs.core.MultivaluedMap;
-import org.onap.observations.Mdc;
-import org.onap.observations.MessageHeaders;
-import org.onap.observations.MessageHeaders.HeadersEnum;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Mdc;
+import org.onap.optf.cmso.optimizer.observations.MessageHeaders;
+import org.onap.optf.cmso.optimizer.observations.MessageHeaders.HeadersEnum;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoContainerFilters.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoContainerFilters.java
index 3a13805..5a236f9 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoContainerFilters.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/filters/CmsoContainerFilters.java
@@ -40,11 +40,11 @@ import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
import javax.ws.rs.ext.Provider;
-import org.onap.observations.Mdc;
-import org.onap.observations.MessageHeaders;
-import org.onap.observations.MessageHeaders.HeadersEnum;
-import org.onap.observations.Observation;
import org.onap.optf.cmso.optimizer.common.LogMessages;
+import org.onap.optf.cmso.optimizer.observations.Mdc;
+import org.onap.optf.cmso.optimizer.observations.MessageHeaders;
+import org.onap.optf.cmso.optimizer.observations.MessageHeaders.HeadersEnum;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.springframework.stereotype.Component;
@Priority(1)
@@ -68,8 +68,8 @@ public class CmsoContainerFilters implements ContainerRequestFilter, ContainerRe
MultivaluedMap<String, Object> respHeaders = responseContext.getHeaders();
String minorVersion = reqHeaders.getFirst(HeadersEnum.MinorVersion.toString());
respHeaders.add(HeadersEnum.MinorVersion.toString(), minorVersion);
- respHeaders.add(HeadersEnum.LatestVersion.toString(), MessageHeaders.getLatestversion());
- respHeaders.add(HeadersEnum.PatchVersion.toString(), MessageHeaders.getPatchversion());
+ respHeaders.add(HeadersEnum.LatestVersion.toString(), MessageHeaders.getLatestVersion());
+ respHeaders.add(HeadersEnum.PatchVersion.toString(), MessageHeaders.getPatchVersion());
} catch (Exception e) {
if (e instanceof WebApplicationException) {
diff --git a/cmso-optimizer/src/main/java/org/onap/observations/Mdc.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Mdc.java
index 5dea5aa..66834fa 100644
--- a/cmso-optimizer/src/main/java/org/onap/observations/Mdc.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Mdc.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.observations;
+package org.onap.optf.cmso.optimizer.observations;
import static com.att.eelf.configuration.Configuration.MDC_BEGIN_TIMESTAMP;
import static com.att.eelf.configuration.Configuration.MDC_END_TIMESTAMP;
@@ -49,7 +49,7 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response.StatusType;
-import org.onap.observations.MessageHeaders.HeadersEnum;
+import org.onap.optf.cmso.optimizer.observations.MessageHeaders.HeadersEnum;
import org.slf4j.MDC;
/**
diff --git a/cmso-optimizer/src/main/java/org/onap/observations/MessageHeaders.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/MessageHeaders.java
index ccb7e56..1c40196 100644
--- a/cmso-optimizer/src/main/java/org/onap/observations/MessageHeaders.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/MessageHeaders.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.observations;
+package org.onap.optf.cmso.optimizer.observations;
import java.util.HashMap;
import java.util.HashSet;
@@ -65,7 +65,7 @@ public class MessageHeaders {
}
/** The Constant supportedMajorVersions. */
- private static final Map<String, String> supportedMajorVersions = new HashMap<String, String>();
+ public static final Map<String, String> supportedMajorVersions = new HashMap<String, String>();
static {
supportedMajorVersions.put("v1", "0");
@@ -73,7 +73,7 @@ public class MessageHeaders {
}
/** The Constant supportedMajorMinorVersions. */
- private static final Set<String> supportedMajorMinorVersions = new HashSet<String>();
+ public static final Set<String> supportedMajorMinorVersions = new HashSet<String>();
static {
supportedMajorMinorVersions.add("v1.0");
@@ -81,10 +81,10 @@ public class MessageHeaders {
}
/** The Constant latestVersion. */
- private static final String latestVersion = "2.0.0";
+ public static final String latestVersion = "2.0.0";
/** The Constant patchVersion. */
- private static final String patchVersion = "0";
+ public static final String patchVersion = "0";
/**
* From string.
@@ -119,6 +119,14 @@ public class MessageHeaders {
return latestVersion;
}
+ public static Map<String, String> getSupportedmajorversions() {
+ return supportedMajorVersions;
+ }
+
+ public static Set<String> getSupportedmajorminorversions() {
+ return supportedMajorMinorVersions;
+ }
+
/**
* Validate major version.
*
@@ -152,20 +160,4 @@ public class MessageHeaders {
}
return true;
}
-
- public static Map<String, String> getSupportedmajorversions() {
- return supportedMajorVersions;
- }
-
- public static Set<String> getSupportedmajorminorversions() {
- return supportedMajorMinorVersions;
- }
-
- public static String getLatestversion() {
- return latestVersion;
- }
-
- public static String getPatchversion() {
- return patchVersion;
- }
}
diff --git a/cmso-optimizer/src/main/java/org/onap/observations/Observation.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Observation.java
index 05fe983..cb36e40 100644
--- a/cmso-optimizer/src/main/java/org/onap/observations/Observation.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/Observation.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.observations;
+package org.onap.optf.cmso.optimizer.observations;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/cmso-optimizer/src/main/java/org/onap/observations/ObservationInterface.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationInterface.java
index 0dce93d..2b4ff58 100644
--- a/cmso-optimizer/src/main/java/org/onap/observations/ObservationInterface.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationInterface.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.observations;
+package org.onap.optf.cmso.optimizer.observations;
import com.att.eelf.i18n.EELFResolvableErrorEnum;
import javax.ws.rs.core.Response.Status;
diff --git a/cmso-optimizer/src/main/java/org/onap/observations/ObservationObject.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationObject.java
index f1c1277..60ba2a1 100644
--- a/cmso-optimizer/src/main/java/org/onap/observations/ObservationObject.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/observations/ObservationObject.java
@@ -24,7 +24,7 @@
* limitations under the License.
*/
-package org.onap.observations;
+package org.onap.optf.cmso.optimizer.observations;
import com.att.eelf.i18n.EELFResolvableErrorEnum;
import com.att.eelf.i18n.EELFResourceManager;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/AdminToolImpl.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/AdminToolImpl.java
index 7b4859d..93da842 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/AdminToolImpl.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/AdminToolImpl.java
@@ -32,7 +32,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import org.onap.optf.cmso.common.PropertiesManagement;
+import org.onap.optf.cmso.optimizer.common.PropertiesManagement;
import org.springframework.stereotype.Controller;
@Controller
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterface.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterface.java
index 27a368f..d5cbac4 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterface.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterface.java
@@ -26,11 +26,6 @@
package org.onap.optf.cmso.optimizer.service.rs;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
@@ -40,13 +35,18 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
-import org.onap.optf.cmso.common.CmsoRequestError;
+import org.onap.optf.cmso.optimizer.common.CmsoRequestError;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerResponse;
import org.onap.optf.cmso.optimizer.service.rs.models.PolicyInfo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
@Api("Optimizer Interface")
@Path("/{apiVersion}")
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterfaceImpl.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterfaceImpl.java
index b475861..17260f1 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterfaceImpl.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/OptimizerInterfaceImpl.java
@@ -34,11 +34,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import org.onap.observations.Observation;
-import org.onap.optf.cmso.common.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.common.LogMessages;
import org.onap.optf.cmso.optimizer.core.OptimizerManager;
+import org.onap.optf.cmso.optimizer.exceptions.CmsoException;
import org.onap.optf.cmso.optimizer.model.dao.RequestDao;
+import org.onap.optf.cmso.optimizer.observations.Observation;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerRequest;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerResponse;
import org.onap.optf.cmso.optimizer.service.rs.models.OptimizerResponse.OptimizeScheduleStatus;
diff --git a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/models/ChangeWindow.java b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/models/ChangeWindow.java
index bec1de7..5b52963 100644
--- a/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/models/ChangeWindow.java
+++ b/cmso-optimizer/src/main/java/org/onap/optf/cmso/optimizer/service/rs/models/ChangeWindow.java
@@ -140,7 +140,7 @@ public class ChangeWindow implements Serializable {
Instant startInstant = startTime.toInstant();
Instant endInstant = endTime.toInstant();
Instant testStart = test.getStartTime().toInstant().plusMillis(startTimeZoneOffset);;
- Instant testEnd = test.getEndTime().toInstant().plusMillis(startTimeZoneOffset);;
+ Instant testEnd = test.getEndTime().toInstant().plusMillis(endTimeZoneOffset);;
if (!testStart.isBefore(startInstant)
&& !testEnd.isAfter(endInstant)) {
return true;