aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-service/src
diff options
context:
space:
mode:
Diffstat (limited to 'cmso-service/src')
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoInfo.java176
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoMessage.java73
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckComponent.java69
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckMessage.java88
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/ScheduleMessage.java92
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/VnfDetailsMessage.java64
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ChangeWindow.java96
7 files changed, 573 insertions, 85 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoInfo.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoInfo.java
new file mode 100644
index 0000000..e2e4f10
--- /dev/null
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoInfo.java
@@ -0,0 +1,176 @@
+/*
+ * 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.service.rs.models;
+
+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 CmsoInfo implements Serializable {
+ private static EELFLogger log = EELFManager.getInstance().getLogger(CmsoInfo.class);
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "Expected duration (in seconds) of a successful execution of a single VNF change.")
+ private Integer normalDurationInSeconds;
+
+ @ApiModelProperty(
+ value = "Additional duration (in seconds) to be added to support backout of an unsuccessful VNF change.")
+ private Integer additionalDurationInSeconds;
+
+ @ApiModelProperty(value = "Maximum number of VNF changes to schedule concurrently")
+ private Integer concurrencyLimit;
+
+ @ApiModelProperty(
+ 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;
+
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
+ public String toString() {
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ return mapper.writeValueAsString(this);
+ } catch (JsonProcessingException e) {
+ log.debug("Error in toString()", e);
+ }
+ return "";
+ }
+
+ /**
+ * Gets the normal duration in seconds.
+ *
+ * @return the normal duration in seconds
+ */
+ public Integer getNormalDurationInSeconds() {
+ return normalDurationInSeconds;
+ }
+
+ /**
+ * Sets the normal duration in seconds.
+ *
+ * @param normalDurationInSeconds the new normal duration in seconds
+ */
+ public void setNormalDurationInSeconds(Integer normalDurationInSeconds) {
+ this.normalDurationInSeconds = normalDurationInSeconds;
+ }
+
+ /**
+ * Gets the additional duration in seconds.
+ *
+ * @return the additional duration in seconds
+ */
+ public Integer getAdditionalDurationInSeconds() {
+ return additionalDurationInSeconds;
+ }
+
+ /**
+ * Sets the additional duration in seconds.
+ *
+ * @param additionalDurationInSeconds the new additional duration in seconds
+ */
+ public void setAdditionalDurationInSeconds(Integer additionalDurationInSeconds) {
+ this.additionalDurationInSeconds = additionalDurationInSeconds;
+ }
+
+ /**
+ * Gets the concurrency limit.
+ *
+ * @return the concurrency limit
+ */
+ public Integer getConcurrencyLimit() {
+ return concurrencyLimit;
+ }
+
+ /**
+ * Sets the concurrency limit.
+ *
+ * @param concurrencyLimit the new concurrency limit
+ */
+ public void setConcurrencyLimit(Integer concurrencyLimit) {
+ this.concurrencyLimit = concurrencyLimit;
+ }
+
+ /**
+ * Gets the policy id.
+ *
+ * @return the policy id
+ */
+ public String getPolicyId() {
+ return policyId;
+ }
+
+ /**
+ * Sets the policy id.
+ *
+ * @param policyId the new policy id
+ */
+ public void setPolicyId(String policyId) {
+ this.policyId = policyId;
+ }
+
+ /**
+ * Gets the vnf details.
+ *
+ * @return the vnf details
+ */
+ public List<VnfDetailsMessage> getVnfDetails() {
+ return vnfDetails;
+ }
+
+ /**
+ * Sets the vnf details.
+ *
+ * @param vnfDetails the new vnf details
+ */
+ public void setVnfDetails(List<VnfDetailsMessage> vnfDetails) {
+ this.vnfDetails = vnfDetails;
+ }
+}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoMessage.java
new file mode 100644
index 0000000..e81e212
--- /dev/null
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/CmsoMessage.java
@@ -0,0 +1,73 @@
+/*
+ * 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.service.rs.models;
+
+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 CmsoMessage extends ScheduleMessage implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private static EELFLogger errors = EELFManager.getInstance().getErrorLogger();
+ private static EELFLogger debug = EELFManager.getInstance().getDebugLogger();
+
+ private CmsoInfo schedulingInfo;
+
+ @Override
+ public CmsoInfo getSchedulingInfo() {
+ // TODO Auto-generated method stub
+ return schedulingInfo;
+ }
+
+ @Override
+ public void setSchedulingInfo(Object info) {
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ String jsonString = mapper.writeValueAsString(info);
+ schedulingInfo = mapper.readValue(jsonString, CmsoInfo.class);
+ } catch (Exception e) {
+ debug.debug(LogMessages.UNEXPECTED_EXCEPTION, e, e.getMessage());
+ errors.error(LogMessages.UNEXPECTED_EXCEPTION, e, e.getMessage());
+ }
+
+ }
+
+}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckComponent.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckComponent.java
index 47d8d57..a9995c2 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckComponent.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckComponent.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,13 +31,16 @@
package org.onap.optf.cmso.service.rs.models;
-import java.io.Serializable;
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 java.io.Serializable;
+/**
+ * The Class HealthCheckComponent.
+ */
@ApiModel
public class HealthCheckComponent implements Serializable {
private static final long serialVersionUID = 1L;
@@ -48,38 +51,84 @@ public class HealthCheckComponent implements Serializable {
private String status;
private Boolean healthy = false;
+ /**
+ * Gets the healthy.
+ *
+ * @return the healthy
+ */
public Boolean getHealthy() {
return healthy;
}
+ /**
+ * Sets the healthy.
+ *
+ * @param healthy the new healthy
+ */
public void setHealthy(Boolean healthy) {
this.healthy = healthy;
}
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
public String getName() {
return name;
}
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ * Gets the url.
+ *
+ * @return the url
+ */
public String getUrl() {
return url;
}
+ /**
+ * Sets the url.
+ *
+ * @param url the new url
+ */
public void setUrl(String url) {
this.url = url;
}
+ /**
+ * Gets the status.
+ *
+ * @return the status
+ */
public String getStatus() {
return status;
}
+ /**
+ * Sets the status.
+ *
+ * @param status the new status
+ */
public void setStatus(String status) {
this.status = status;
}
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckMessage.java
index 02cc65f..2108c13 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckMessage.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/HealthCheckMessage.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,15 +31,18 @@
package org.onap.optf.cmso.service.rs.models;
-import java.io.Serializable;
-import java.util.ArrayList;
-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 java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+/**
+ * The Class HealthCheckMessage.
+ */
@ApiModel
public class HealthCheckMessage implements Serializable {
private static final long serialVersionUID = 1L;
@@ -52,50 +55,111 @@ public class HealthCheckMessage implements Serializable {
private List<HealthCheckComponent> components = new ArrayList<HealthCheckComponent>();
+ /**
+ * Gets the healthy.
+ *
+ * @return the healthy
+ */
public Boolean getHealthy() {
return healthy;
}
+ /**
+ * Sets the healthy.
+ *
+ * @param healthy the new healthy
+ */
public void setHealthy(Boolean healthy) {
this.healthy = healthy;
}
+ /**
+ * Gets the builds the info.
+ *
+ * @return the builds the info
+ */
public String getBuildInfo() {
return buildInfo;
}
+ /**
+ * Sets the builds the info.
+ *
+ * @param buildInfo the new builds the info
+ */
public void setBuildInfo(String buildInfo) {
this.buildInfo = buildInfo;
}
+ /**
+ * Gets the current time.
+ *
+ * @return the current time
+ */
public String getCurrentTime() {
return currentTime;
}
+ /**
+ * Sets the current time.
+ *
+ * @param currentTime the new current time
+ */
public void setCurrentTime(String currentTime) {
this.currentTime = currentTime;
}
+ /**
+ * Gets the hostname.
+ *
+ * @return the hostname
+ */
public String getHostname() {
return hostname;
}
+ /**
+ * Sets the hostname.
+ *
+ * @param hostname the new hostname
+ */
public void setHostname(String hostname) {
this.hostname = hostname;
}
+ /**
+ * Gets the components.
+ *
+ * @return the components
+ */
public List<HealthCheckComponent> getComponents() {
return components;
}
+ /**
+ * Sets the components.
+ *
+ * @param components the new components
+ */
public void setComponents(List<HealthCheckComponent> components) {
this.components = components;
}
+ /**
+ * Adds the component.
+ *
+ * @param components the components
+ */
public void addComponent(HealthCheckComponent components) {
this.components.add(components);
}
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/ScheduleMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/ScheduleMessage.java
index a89e818..6fb422a 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/ScheduleMessage.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/ScheduleMessage.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,27 +31,37 @@
package org.onap.optf.cmso.service.rs.models;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
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;
+import java.util.Map;
/**
* The persistent class for the approval_types database table.
- *
+ *
*/
@ApiModel(value = "Schedule Request", description = "Request to schedule VNF change management workflow(s).")
public abstract class ScheduleMessage implements Serializable {
private static final long serialVersionUID = 1L;
private static EELFLogger log = EELFManager.getInstance().getLogger(ScheduleMessage.class);
+ /**
+ * Gets the scheduling info.
+ *
+ * @return the scheduling info
+ */
public abstract Object getSchedulingInfo();
+ /**
+ * Sets the scheduling info.
+ *
+ * @param info the new scheduling info
+ */
public abstract void setSchedulingInfo(Object info);
// public abstract void setSchedulingInfo(Object schedulingInfo);
@@ -71,46 +81,102 @@ public abstract class ScheduleMessage implements Serializable {
@ApiModelProperty(value = "Domain data as name value/pairs. (i.e. CallbackUrl, CallbackData, WorkflowName)")
private List<Map<String, String>> domainData;
+ /**
+ * Gets the domain.
+ *
+ * @return the domain
+ */
public String getDomain() {
return domain;
}
+ /**
+ * Sets the domain.
+ *
+ * @param domain the new domain
+ */
public void setDomain(String domain) {
this.domain = domain;
}
+ /**
+ * Gets the schedule id.
+ *
+ * @return the schedule id
+ */
public String getScheduleId() {
return scheduleId;
}
+ /**
+ * Sets the schedule id.
+ *
+ * @param scheduleId the new schedule id
+ */
public void setScheduleId(String scheduleId) {
this.scheduleId = scheduleId;
}
+ /**
+ * Gets the schedule name.
+ *
+ * @return the schedule name
+ */
public String getScheduleName() {
return scheduleName;
}
+ /**
+ * Sets the schedule name.
+ *
+ * @param scheduleName the new schedule name
+ */
public void setScheduleName(String scheduleName) {
this.scheduleName = scheduleName;
}
+ /**
+ * Gets the user id.
+ *
+ * @return the user id
+ */
public String getUserId() {
return userId;
}
+ /**
+ * Sets the user id.
+ *
+ * @param userId the new user id
+ */
public void setUserId(String userId) {
this.userId = userId;
}
+ /**
+ * Gets the domain data.
+ *
+ * @return the domain data
+ */
public List<Map<String, String>> getDomainData() {
return domainData;
}
+ /**
+ * Sets the domain data.
+ *
+ * @param domainData the domain data
+ */
public void setDomainData(List<Map<String, String>> domainData) {
this.domainData = domainData;
}
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/VnfDetailsMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/VnfDetailsMessage.java
index b1dde5d..4940c98 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/VnfDetailsMessage.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/VnfDetailsMessage.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,15 +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 Class VnfDetailsMessage.
+ */
@ApiModel(value = "VNF Details", description = "Details and scheduling criteria for the VNFs to be changed.")
public class VnfDetailsMessage implements Serializable {
private static final long serialVersionUID = 1L;
@@ -52,33 +55,70 @@ public class VnfDetailsMessage implements Serializable {
private List<String> node;
@ApiModelProperty(
- value = "Lists of desired change windows that the optimizer can select from. (Only 1 change window supported at this time)")
+ value = "Lists of desired change windows that the optimize"
+ + "r can select from. (Only 1 change window supported at this time)")
private List<ChangeWindowMessage> changeWindow;
+ /**
+ * Gets the group id.
+ *
+ * @return the group id
+ */
public String getGroupId() {
return groupId;
}
+ /**
+ * Sets the group id.
+ *
+ * @param groupId the new group id
+ */
public void setGroupId(String groupId) {
this.groupId = groupId;
}
+ /**
+ * Gets the node.
+ *
+ * @return the node
+ */
public List<String> getNode() {
return node;
}
+ /**
+ * Sets the node.
+ *
+ * @param node the new node
+ */
public void setNode(List<String> node) {
this.node = node;
}
+ /**
+ * Gets the change window.
+ *
+ * @return the change window
+ */
public List<ChangeWindowMessage> getChangeWindow() {
return changeWindow;
}
+ /**
+ * Sets the change window.
+ *
+ * @param changeWindow the new change window
+ */
public void setChangeWindow(List<ChangeWindowMessage> changeWindow) {
this.changeWindow = changeWindow;
}
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ChangeWindow.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ChangeWindow.java
index 7553c87..5aab6ac 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ChangeWindow.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ChangeWindow.java
@@ -1,79 +1,99 @@
/*
- * 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
+ * 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.
- *
- *
- * 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.service.rs.models.v2;
-import java.io.Serializable;
-import java.util.Date;
-
-import org.springframework.format.annotation.DateTimeFormat;
-
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.Date;
+import org.springframework.format.annotation.DateTimeFormat;
-@ApiModel(value = "Change Window",
- description = "Time window for which tickets are to returned")
+/**
+ * The Class ChangeWindow.
+ */
+@ApiModel(value = "Change Window", description = "Time window for which tickets are to returned")
public class ChangeWindow implements Serializable {
private static final long serialVersionUID = 1L;
private static EELFLogger log = EELFManager.getInstance().getLogger(ChangeWindow.class);
@ApiModelProperty(value = "Earliest time for which changes may begin.")
- @DateTimeFormat(pattern="yyyy-MM-dd'T'hh:mm:ss'Z'")
+ @DateTimeFormat(pattern = "yyyy-MM-dd'T'hh:mm:ss'Z'")
private Date startTime;
@ApiModelProperty(value = "Latest time by which all changes must be completed.")
- @DateTimeFormat(pattern="yyyy-MM-dd'T'hh:mm:ss'Z'")
+ @DateTimeFormat(pattern = "yyyy-MM-dd'T'hh:mm:ss'Z'")
private Date endTime;
+ /**
+ * Gets the start time.
+ *
+ * @return the start time
+ */
public Date getStartTime() {
return startTime;
}
+ /**
+ * Sets the start time.
+ *
+ * @param startTime the new start time
+ */
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
+ /**
+ * Gets the end time.
+ *
+ * @return the end time
+ */
public Date getEndTime() {
return endTime;
}
+ /**
+ * Sets the end time.
+ *
+ * @param endTime the new end time
+ */
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {