aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-service
diff options
context:
space:
mode:
authorShankaranarayanan Puzhavakath Narayanan <snarayanan@research.att.com>2019-03-26 14:06:21 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-26 14:06:21 +0000
commit8ab4b896fc044b8bcb9cc7adc56a67ccc2fcf484 (patch)
tree707641819efcf5a179015c7057363e061352a871 /cmso-service
parent09f5cd3695d8cd0ee202839e13bde2f6896ea57e (diff)
parentff8eb8600bbd26106b1ddc070c8bc7bfce575a3e (diff)
Merge "Commit 15 for Create Optimized Sched API"
Diffstat (limited to 'cmso-service')
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ElementInfo.java122
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/NameValue.java138
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/OptimizedScheduleMessage.java155
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/PolicyInfo.java88
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/SchedulingData.java169
-rw-r--r--cmso-service/src/main/java/org/onap/optf/cmso/so/bean/MsoOrchestrationQueryResponse.java6
6 files changed, 417 insertions, 261 deletions
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ElementInfo.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ElementInfo.java
index 35649ea..57619a9 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ElementInfo.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/ElementInfo.java
@@ -1,46 +1,49 @@
-/*******************************************************************************
- *
- * Copyright © 2019 AT&T Intellectual Property.
- *
- * 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.v2;
+/**
+ * *****************************************************************************
+ *
+ * <p>
+ * Copyright © 2019 AT&T Intellectual Property.
+ *
+ * <p>
+ * 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
+ *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * <p>
+ * 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.
+ *
+ * <p>
+ * 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
+ *
+ * <p>
+ * https://creativecommons.org/licenses/by/4.0/
+ *
+ * <p>
+ * 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.
+ * ****************************************************************************
+ */
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
+package org.onap.optf.cmso.service.rs.models.v2;
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.ArrayList;
+import java.util.List;
@ApiModel(value = "Optimizer Element", description = "Element to be scheduled.")
public class ElementInfo implements Serializable {
@@ -56,32 +59,43 @@ public class ElementInfo implements Serializable {
@ApiModelProperty(value = "Request for be scheduled.")
public Object request;
- public String getElementId() {
- return elementId;
- }
+ @ApiModelProperty(value = "VNF group identifier.")
+ public String groupId;
- public void setElementId(String elementId) {
- this.elementId = elementId;
- }
+ public String getElementId() {
+ return elementId;
+ }
+ public void setElementId(String elementId) {
+ this.elementId = elementId;
+ }
- public List<NameValue> getElementData() {
- return elementData;
- }
+ public List<NameValue> getElementData() {
+ return elementData;
+ }
- public void setElementData(List<NameValue> elementData) {
- this.elementData = elementData;
- }
+ public void setElementData(List<NameValue> elementData) {
+ this.elementData = elementData;
+ }
- public Object getRequest() {
- return request;
- }
+ public Object getRequest() {
+ return request;
+ }
- public void setRequest(Object request) {
- this.request = request;
- }
+ public void setRequest(Object request) {
+ this.request = request;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
- public String toString() {
+ @Override
+ public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.writeValueAsString(this);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/NameValue.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/NameValue.java
index 9b71f76..1bd0d3c 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/NameValue.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/NameValue.java
@@ -1,91 +1,119 @@
/*
- * Copyright © 2017-2019 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-2019 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 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;
-@ApiModel(value = "Name Value Data",
- description = "Instance of a name/value")
+/**
+ * The Class NameValue.
+ */
+@ApiModel(value = "Name Value Data", description = "Instance of a name/value")
public class NameValue implements Serializable {
private static final long serialVersionUID = 1L;
private static EELFLogger log = EELFManager.getInstance().getLogger(NameValue.class);
- public NameValue()
- {
-
+ /**
+ * Instantiates a new name value.
+ */
+ public NameValue() {
+
}
- public NameValue(String name, Object value)
- {
- this.name = name;
- this.value = value;
+ /**
+ * Instantiates a new name value.
+ *
+ * @param name the name
+ * @param value the value
+ */
+ public NameValue(String name, Object value) {
+ this.name = name;
+ this.value = value;
}
-
+
@ApiModelProperty(value = "Name.")
private String name;
@ApiModelProperty(value = "Value.")
private Object value;
-
-
+
+
+ /**
+ * Gets the name.
+ *
+ * @return the name
+ */
public String getName() {
- return name;
- }
+ return name;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ /**
+ * Sets the name.
+ *
+ * @param name the new name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
- public Object getValue() {
- return value;
- }
+ /**
+ * Gets the value.
+ *
+ * @return the value
+ */
+ public Object getValue() {
+ return value;
+ }
- public void setValue(Object value) {
- this.value = value;
- }
+ /**
+ * Sets the value.
+ *
+ * @param value the new value
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
- public String toString() {
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
+ public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.writeValueAsString(this);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/OptimizedScheduleMessage.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/OptimizedScheduleMessage.java
index 797379c..ac7037a 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/OptimizedScheduleMessage.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/OptimizedScheduleMessage.java
@@ -1,58 +1,49 @@
/*
- * 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.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 = "Optimized Schedule Request", description = "Request to schedule VNF change management workflow(s).")
-public abstract class OptimizedScheduleMessage implements Serializable {
+public class OptimizedScheduleMessage implements Serializable {
private static final long serialVersionUID = 1L;
private static EELFLogger log = EELFManager.getInstance().getLogger(OptimizedScheduleMessage.class);
- // public abstract void setSchedulingInfo(Object schedulingInfo);
-
@ApiModelProperty(value = "Schedule domain : ChangeManagement")
private String domain;
@@ -70,56 +61,122 @@ public abstract class OptimizedScheduleMessage implements Serializable {
@ApiModelProperty(value = "Scheduling data.")
private SchedulingData schedulingData;
-
+
+ /**
+ * 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 common data.
+ *
+ * @return the common data
+ */
public List<NameValue> getCommonData() {
- return commonData;
- }
+ return commonData;
+ }
- public void setCommonData(List<NameValue> commonData) {
- this.commonData = commonData;
- }
+ /**
+ * Sets the common data.
+ *
+ * @param commonData the new common data
+ */
+ public void setCommonData(List<NameValue> commonData) {
+ this.commonData = commonData;
+ }
- public SchedulingData getSchedulingData() {
- return schedulingData;
- }
+ /**
+ * Gets the scheduling data.
+ *
+ * @return the scheduling data
+ */
+ public SchedulingData getSchedulingData() {
+ return schedulingData;
+ }
- public void setSchedulingData(SchedulingData schedulingData) {
- this.schedulingData = schedulingData;
- }
+ /**
+ * Sets the scheduling data.
+ *
+ * @param schedulingData the new scheduling data
+ */
+ public void setSchedulingData(SchedulingData schedulingData) {
+ this.schedulingData = schedulingData;
+ }
- public String toString() {
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
+ public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.writeValueAsString(this);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/PolicyInfo.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/PolicyInfo.java
index c6a291c..1bf47c0 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/PolicyInfo.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/PolicyInfo.java
@@ -1,46 +1,41 @@
/*******************************************************************************
- *
- * Copyright © 2019 AT&T Intellectual Property.
- *
- * 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.
+ *
+ * Copyright © 2019 AT&T Intellectual Property.
+ *
+ * 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.v2;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
+package org.onap.optf.cmso.service.rs.models.v2;
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.ArrayList;
+import java.util.List;
@ApiModel(value = "Supported Policy Information", description = "Policy Information returned from get policies API.")
public class PolicyInfo implements Serializable {
@@ -53,24 +48,25 @@ public class PolicyInfo implements Serializable {
@ApiModelProperty(value = "Named values to modify/override policy attributes.")
public List<NameValue> policyModifiers = new ArrayList<>();
- public String getPolicyName() {
- return policyName;
- }
+ public String getPolicyName() {
+ return policyName;
+ }
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
+ public void setPolicyName(String policyName) {
+ this.policyName = policyName;
+ }
- public List<NameValue> getPolicyModifiers() {
- return policyModifiers;
- }
+ public List<NameValue> getPolicyModifiers() {
+ return policyModifiers;
+ }
- public void setPolicyModifiers(List<NameValue> policyModifiers) {
- this.policyModifiers = policyModifiers;
- }
+ public void setPolicyModifiers(List<NameValue> policyModifiers) {
+ this.policyModifiers = policyModifiers;
+ }
- public String toString() {
+ @Override
+ public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
return mapper.writeValueAsString(this);
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/SchedulingData.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/SchedulingData.java
index e17f1d2..e1e0d91 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/SchedulingData.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/models/v2/SchedulingData.java
@@ -1,51 +1,44 @@
/*
- * 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.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 io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.ArrayList;
+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 SchedulingData implements Serializable {
@@ -56,7 +49,9 @@ public class SchedulingData implements Serializable {
@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.")
+ @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")
@@ -64,13 +59,19 @@ public class SchedulingData implements Serializable {
@ApiModelProperty(value = "Lists of desired change windows to schedule the elements.")
private List<ChangeWindow> changeWindows = new ArrayList<>();
-
+
@ApiModelProperty(value = "List of the policies to control optimization.")
private List<PolicyInfo> policies = new ArrayList<>();
@ApiModelProperty(value = "Lists of the VNFs to be changed and the desired change windows")
private List<ElementInfo> elements;
+ /**
+ * To string.
+ *
+ * @return the string
+ */
+ @Override
public String toString() {
ObjectMapper mapper = new ObjectMapper();
try {
@@ -81,52 +82,112 @@ public class SchedulingData implements Serializable {
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;
}
- public List<ChangeWindow> getChangeWindows() {
- return changeWindows;
- }
+ /**
+ * Gets the change windows.
+ *
+ * @return the change windows
+ */
+ public List<ChangeWindow> getChangeWindows() {
+ return changeWindows;
+ }
- public void setChangeWindows(List<ChangeWindow> changeWindows) {
- this.changeWindows = changeWindows;
- }
+ /**
+ * Sets the change windows.
+ *
+ * @param changeWindows the new change windows
+ */
+ public void setChangeWindows(List<ChangeWindow> changeWindows) {
+ this.changeWindows = changeWindows;
+ }
- public List<PolicyInfo> getPolicies() {
- return policies;
- }
+ /**
+ * Gets the policies.
+ *
+ * @return the policies
+ */
+ public List<PolicyInfo> getPolicies() {
+ return policies;
+ }
- public void setPolicies(List<PolicyInfo> policies) {
- this.policies = policies;
- }
+ /**
+ * Sets the policies.
+ *
+ * @param policies the new policies
+ */
+ public void setPolicies(List<PolicyInfo> policies) {
+ this.policies = policies;
+ }
- public List<ElementInfo> getElements() {
- return elements;
- }
+ /**
+ * Gets the elements.
+ *
+ * @return the elements
+ */
+ public List<ElementInfo> getElements() {
+ return elements;
+ }
- public void setElements(List<ElementInfo> elements) {
- this.elements = elements;
- }
+ /**
+ * Sets the elements.
+ *
+ * @param elements the new elements
+ */
+ public void setElements(List<ElementInfo> elements) {
+ this.elements = elements;
+ }
}
diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/so/bean/MsoOrchestrationQueryResponse.java b/cmso-service/src/main/java/org/onap/optf/cmso/so/bean/MsoOrchestrationQueryResponse.java
index 2e46be0..1d4070e 100644
--- a/cmso-service/src/main/java/org/onap/optf/cmso/so/bean/MsoOrchestrationQueryResponse.java
+++ b/cmso-service/src/main/java/org/onap/optf/cmso/so/bean/MsoOrchestrationQueryResponse.java
@@ -1,6 +1,6 @@
/*
- * 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.
@@ -32,7 +32,7 @@
package org.onap.optf.cmso.so.bean;
public class MsoOrchestrationQueryResponse {
- public enum MSO_STATUS {
+ public enum MsoStatus {
UNKNOWN, COMPLETE, FAILED, IN_PROGRESS,
}