Multiple commits required due to commit size limitation.
Change-Id: I4d0b30c535f71a969dae74ce80f36c88d4ad7386
Issue-ID: OPTFRA-437
Signed-off-by: Jerry Flood <jflood@att.com>
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;
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);
}
}
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);
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);
}
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);
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);
}
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);
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);
import org.springframework.stereotype.Controller;\r
\r
/**\r
- * @author jf9860\r
+ * Health check.\r
+ *\r
*\r
*/\r
@Controller\r
/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2018 IBM.\r
- * \r
+ * Copyright � 2017-2018 AT&T Intellectual Property.\r
+ * Modifications Copyright � 2018 IBM.\r
+ *\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * \r
+ *\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
+ *\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * \r
- * \r
+ *\r
+ *\r
* Unless otherwise specified, all documentation contained herein is licensed\r
* under the Creative Commons License, Attribution 4.0 Intl. (the "License");\r
* you may not use this documentation except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * \r
+ *\r
* https://creativecommons.org/licenses/by/4.0/\r
- * \r
+ *\r
* Unless required by applicable law or agreed to in writing, documentation\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
\r
package org.onap.optf.cmso.service.rs.models;\r
\r
-import java.io.Serializable;\r
-import java.util.List;\r
import com.att.eelf.configuration.EELFLogger;\r
import com.att.eelf.configuration.EELFManager;\r
import com.fasterxml.jackson.core.JsonProcessingException;\r
import com.fasterxml.jackson.databind.ObjectMapper;\r
import io.swagger.annotations.ApiModel;\r
import io.swagger.annotations.ApiModelProperty;\r
+import java.io.Serializable;\r
+import java.util.List;\r
\r
/**\r
* The persistent class for the approval_types database table.\r
- * \r
+ *\r
*/\r
@ApiModel(value = "Change Management Scheduling Info", description = "Details of schedule being requested")\r
public class CMSInfo implements Serializable {\r
private Integer concurrencyLimit;\r
\r
@ApiModelProperty(\r
- value = "Name of schedule optimization policy used by the change management cmso optimizer to determine available time slot")\r
+ value = "Name of schedule optimization policy used by the"\r
+ + " change management cmso optimizer to determine available time slot")\r
private String policyId;\r
\r
@ApiModelProperty(value = "Lists of the VNFs to be changed and the desired change windows")\r
private List<VnfDetailsMessage> vnfDetails;\r
\r
+ @Override\r
public String toString() {\r
ObjectMapper mapper = new ObjectMapper();\r
try {\r
/*\r
- * Copyright © 2017-2018 AT&T Intellectual Property.\r
- * Modifications Copyright © 2018 IBM.\r
- * \r
+ * Copyright � 2017-2018 AT&T Intellectual Property.\r
+ * Modifications Copyright � 2018 IBM.\r
+ *\r
* Licensed under the Apache License, Version 2.0 (the "License");\r
* you may not use this file except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * \r
+ *\r
* http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
+ *\r
* Unless required by applicable law or agreed to in writing, software\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
- * \r
- * \r
+ *\r
+ *\r
* Unless otherwise specified, all documentation contained herein is licensed\r
* under the Creative Commons License, Attribution 4.0 Intl. (the "License");\r
* you may not use this documentation except in compliance with the License.\r
* You may obtain a copy of the License at\r
- * \r
+ *\r
* https://creativecommons.org/licenses/by/4.0/\r
- * \r
+ *\r
* Unless required by applicable law or agreed to in writing, documentation\r
* distributed under the License is distributed on an "AS IS" BASIS,\r
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
\r
package org.onap.optf.cmso.service.rs.models;\r
\r
-import java.io.Serializable;\r
-import org.onap.optf.cmso.common.LogMessages;\r
import com.att.eelf.configuration.EELFLogger;\r
import com.att.eelf.configuration.EELFManager;\r
import com.fasterxml.jackson.databind.ObjectMapper;\r
import io.swagger.annotations.ApiModel;\r
+import java.io.Serializable;\r
+import org.onap.optf.cmso.common.LogMessages;\r
\r
/**\r
* The persistent class for the approval_types database table.\r
- * \r
+ *\r
*/\r
@ApiModel\r
public class CMSMessage extends ScheduleMessage implements Serializable {\r
--- /dev/null
+{}
\ No newline at end of file
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;
public class CmsoRequestError implements Serializable {
private static final long serialVersionUID = 1L;
- private static EELFLogger log = EELFManager.getInstance().getLogger(CmsoRequestError.class);
@JsonProperty
RequestError requestError;
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;
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;
@Component
public class CmsoClientFilters implements ClientRequestFilter, ClientResponseFilter {
- private static EELFLogger log = EELFManager.getInstance().getLogger(Application.class);
private static String appId = "cmso";
@Override