summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java38
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/HealthCheckImpl.java3
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSInfo.java28
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSMessage.java24
-rw-r--r--cmso-topology/data/vnf1.json1
-rw-r--r--cmso-topology/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java3
-rw-r--r--cmso-topology/src/main/java/org/onap/optf/cmso/topology/filters/CmsoClientFilters.java4
7 files changed, 50 insertions, 51 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java
index 57a0751..02b803f 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java
@@ -96,25 +96,25 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
Environment env;
@Autowired
- ChangeManagementScheduleDAO cmScheduleDAO;
+ ChangeManagementScheduleDAO cmScheduleDao;
@Autowired
- ChangeManagementGroupDAO cmGroupDAO;
+ ChangeManagementGroupDAO cmGroupDao;
@Autowired
- ChangeManagementChangeWindowDAO cmChangeWindowDAO;
+ ChangeManagementChangeWindowDAO cmChangeWindowDao;
@Autowired
- ChangeManagementDetailDAO cmDetailsDAO;
+ ChangeManagementDetailDAO cmDetailsDao;
@Autowired
- ScheduleQueryDAO scheduleQueryDAO;
+ ScheduleQueryDAO scheduleQueryDao;
@Autowired
- ScheduleDAO scheduleDAO;
+ ScheduleDAO scheduleDao;
@Autowired
- ElementDataDAO elementDataDAO;
+ ElementDataDAO elementDataDao;
@Autowired
TmClient tmClient;
@@ -137,22 +137,22 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
int maxRows = 0;
// MultivaluedMap<String, String> qp = uri.getQueryParameters();
// buildWhere(qp, where);
- List<ScheduleQuery> list = scheduleQueryDAO.searchSchedules(where.toString(), maxRows);
+ List<ScheduleQuery> list = scheduleQueryDao.searchSchedules(where.toString(), maxRows);
if (list == null || !list.iterator().hasNext()) {
throw new CMSException(Status.NOT_FOUND, LogMessages.SCHEDULE_NOT_FOUND,
DomainsEnum.ChangeManagement.toString(), scheduleId);
}
Iterator<ScheduleQuery> iter = list.iterator();
while (iter.hasNext()) {
- Schedule sch = scheduleDAO.findById(iter.next().getUuid()).orElse(null);
+ Schedule sch = scheduleDao.findById(iter.next().getUuid()).orElse(null);
if (sch != null) {
schedules.add(sch);
if (includeDetails) {
- List<ChangeManagementGroup> groups = cmGroupDAO.findBySchedulesID(sch.getUuid());
+ List<ChangeManagementGroup> groups = cmGroupDao.findBySchedulesID(sch.getUuid());
sch.setGroups(groups);
for (ChangeManagementGroup g : groups) {
List<ChangeManagementSchedule> cmSchedules =
- cmScheduleDAO.findByChangeManagementGroupId(g.getUuid());
+ cmScheduleDao.findByChangeManagementGroupId(g.getUuid());
g.setChangeManagementSchedules(cmSchedules);
}
}
@@ -208,8 +208,10 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
List<Map<String, String>> smdd = sm.getDomainData();
for (Map<String, String> map : smdd) {
for (String name : map.keySet()) {
- NameValue nv = new NameValue(name, map.get(name));
- dd.add(nv);
+ if (!name.equals(CmDomainDataEnum.CallbackData.toString())) {
+ NameValue nv = new NameValue(name, map.get(name));
+ dd.add(nv);
+ }
}
}
osm.setCommonData(dd);
@@ -285,7 +287,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
Response response = null;
Observation.report(LogMessages.DELETE_SCHEDULE_REQUEST, "Received", request.getRemoteAddr(), scheduleId, "");
try {
- Schedule schedule = scheduleDAO.findByDomainScheduleID(DomainsEnum.ChangeManagement.toString(), scheduleId);
+ Schedule schedule = scheduleDao.findByDomainScheduleID(DomainsEnum.ChangeManagement.toString(), scheduleId);
if (schedule == null) {
throw new CMSNotFoundException(DomainsEnum.ChangeManagement.toString(), scheduleId);
}
@@ -312,7 +314,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
Observation.report(LogMessages.GET_SCHEDULE_REQUEST_INFO, "Received", request.getRemoteAddr(), scheduleId, "");
Schedule schedule = null;
try {
- schedule = scheduleDAO.findByDomainScheduleID(DomainsEnum.ChangeManagement.toString(), scheduleId);
+ schedule = scheduleDao.findByDomainScheduleID(DomainsEnum.ChangeManagement.toString(), scheduleId);
if (schedule == null) {
throw new CMSException(Status.NOT_FOUND, LogMessages.SCHEDULE_NOT_FOUND,
DomainsEnum.ChangeManagement.toString(), scheduleId);
@@ -339,7 +341,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
approval.toString());
try {
String domain = DomainsEnum.ChangeManagement.toString();
- Schedule sch = scheduleDAO.findByDomainScheduleID(domain, scheduleId);
+ Schedule sch = scheduleDao.findByDomainScheduleID(domain, scheduleId);
if (sch == null) {
throw new CMSNotFoundException(domain, scheduleId);
}
@@ -385,7 +387,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
maxRows = maxSchedules;
}
buildWhere(qp, where);
- List<ChangeManagementDetail> list = cmDetailsDAO.searchScheduleDetails(where.toString(), maxRows);
+ List<ChangeManagementDetail> list = cmDetailsDao.searchScheduleDetails(where.toString(), maxRows);
if (list == null || !list.iterator().hasNext()) {
throw new CMSException(Status.NOT_FOUND, LogMessages.SCHEDULE_NOT_FOUND,
DomainsEnum.ChangeManagement.toString(), scheduleId);
@@ -443,7 +445,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService {
msg.setMsoStatus(cms.getMsoStatus());
msg.setMsoTimeMillis(cms.getMsoTimeMillis());
if (!scheduleMap.containsKey(cms.getSchedulesUuid())) {
- Schedule schedule = scheduleDAO.findById(cms.getSchedulesUuid()).orElse(null);
+ Schedule schedule = scheduleDao.findById(cms.getSchedulesUuid()).orElse(null);
if (schedule != null) {
// DO not innclude in the results
schedule.setScheduleInfo(null);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/HealthCheckImpl.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/HealthCheckImpl.java
index 6f60248..6785646 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/HealthCheckImpl.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/HealthCheckImpl.java
@@ -48,7 +48,8 @@ import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
/**
- * @author jf9860
+ * Health check.
+ *
*
*/
@Controller
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSInfo.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSInfo.java
index 1f7e317..3d104d2 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSInfo.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSInfo.java
@@ -1,27 +1,27 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
- *
+ * 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.
@@ -31,18 +31,18 @@
package org.onap.optf.cmso.service.rs.models;
-import java.io.Serializable;
-import java.util.List;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.List;
/**
* The persistent class for the approval_types database table.
- *
+ *
*/
@ApiModel(value = "Change Management Scheduling Info", description = "Details of schedule being requested")
public class CMSInfo implements Serializable {
@@ -61,12 +61,14 @@ public class CMSInfo implements Serializable {
private Integer concurrencyLimit;
@ApiModelProperty(
- value = "Name of schedule optimization policy used by the change management cmso optimizer to determine available time slot")
+ value = "Name of schedule optimization policy used by the"
+ + " change management cmso optimizer to determine available time slot")
private String policyId;
@ApiModelProperty(value = "Lists of the VNFs to be changed and the desired change windows")
private List<VnfDetailsMessage> vnfDetails;
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSMessage.java
index afa4c44..cd8c946 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSMessage.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CMSMessage.java
@@ -1,27 +1,27 @@
/*
- * Copyright © 2017-2018 AT&T Intellectual Property.
- * Modifications Copyright © 2018 IBM.
- *
+ * 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.
@@ -31,16 +31,16 @@
package org.onap.optf.cmso.service.rs.models;
-import java.io.Serializable;
-import org.onap.optf.cmso.common.LogMessages;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.ApiModel;
+import java.io.Serializable;
+import org.onap.optf.cmso.common.LogMessages;
/**
* The persistent class for the approval_types database table.
- *
+ *
*/
@ApiModel
public class CMSMessage extends ScheduleMessage implements Serializable {
diff --git a/cmso-topology/data/vnf1.json b/cmso-topology/data/vnf1.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/cmso-topology/data/vnf1.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java b/cmso-topology/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java
index 5cd258e..f644aca 100644
--- a/cmso-topology/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java
+++ b/cmso-topology/src/main/java/org/onap/optf/cmso/common/CmsoRequestError.java
@@ -26,8 +26,6 @@
package org.onap.optf.cmso.common;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import java.util.ArrayList;
@@ -35,7 +33,6 @@ import java.util.List;
public class CmsoRequestError implements Serializable {
private static final long serialVersionUID = 1L;
- private static EELFLogger log = EELFManager.getInstance().getLogger(CmsoRequestError.class);
@JsonProperty
RequestError requestError;
diff --git a/cmso-topology/src/main/java/org/onap/optf/cmso/topology/filters/CmsoClientFilters.java b/cmso-topology/src/main/java/org/onap/optf/cmso/topology/filters/CmsoClientFilters.java
index 51d548e..248ea43 100644
--- a/cmso-topology/src/main/java/org/onap/optf/cmso/topology/filters/CmsoClientFilters.java
+++ b/cmso-topology/src/main/java/org/onap/optf/cmso/topology/filters/CmsoClientFilters.java
@@ -28,8 +28,6 @@ package org.onap.optf.cmso.topology.filters;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import java.io.IOException;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
@@ -40,7 +38,6 @@ 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.topology.Application;
import org.onap.optf.cmso.topology.common.LogMessages;
import org.slf4j.MDC;
import org.springframework.stereotype.Component;
@@ -49,7 +46,6 @@ import org.springframework.stereotype.Component;
@Component
public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFilter {
- private static EELFLogger log = EELFManager.getInstance().getLogger(Application.class);
private static String appId = "cmso";
@Override