2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.adapters.vnfrest;
24 import javax.xml.bind.annotation.XmlRootElement;
25 import org.onap.so.entity.MsoRequest;
26 import org.onap.so.openstack.beans.VnfRollback;
27 import com.fasterxml.jackson.annotation.JsonRootName;
29 @JsonRootName("VfModuleRollback")
30 @XmlRootElement(name = "VfModuleRollback")
31 public class VfModuleRollback {
33 private String vfModuleId;
34 private String vfModuleStackId;
35 private boolean vfModuleCreated = false;
36 private String tenantId;
37 private String cloudOwner;
38 private String cloudSiteId;
39 private MsoRequest msoRequest;
40 private String messageId;
41 private String mode = "HEAT"; // default
43 public VfModuleRollback() {}
45 public VfModuleRollback(VnfRollback vrb, String vfModuleId, String vfModuleStackId, String messageId) {
46 this.vnfId = vrb.getVnfId();
47 this.vfModuleId = vfModuleId;
48 this.vfModuleStackId = vfModuleStackId;
49 this.vfModuleCreated = vrb.getVnfCreated();
50 this.tenantId = vrb.getTenantId();
51 this.cloudOwner = vrb.getCloudOwner();
52 this.cloudSiteId = vrb.getCloudSiteId();
53 this.msoRequest = vrb.getMsoRequest();
54 this.messageId = messageId;
55 this.mode = vrb.getMode();
58 public VfModuleRollback(String vnfId, String vfModuleId, String vfModuleStackId, boolean vfModuleCreated,
59 String tenantId, String cloudOwner, String cloudSiteId, MsoRequest msoRequest, String messageId) {
62 this.vfModuleId = vfModuleId;
63 this.vfModuleStackId = vfModuleStackId;
64 this.vfModuleCreated = vfModuleCreated;
65 this.tenantId = tenantId;
66 this.cloudOwner = cloudOwner;
67 this.cloudSiteId = cloudSiteId;
68 this.msoRequest = msoRequest;
69 this.messageId = messageId;
72 public String getVnfId() {
76 public void setVnfId(String vnfId) {
80 public String getVfModuleId() {
84 public void setVfModuleId(String vfModuleId) {
85 this.vfModuleId = vfModuleId;
88 public String getVfModuleStackId() {
89 return vfModuleStackId;
92 public void setVfModuleStackId(String vfModuleStackId) {
93 this.vfModuleStackId = vfModuleStackId;
96 public boolean isVfModuleCreated() {
97 return vfModuleCreated;
100 public void setVfModuleCreated(boolean vfModuleCreated) {
101 this.vfModuleCreated = vfModuleCreated;
104 public String getTenantId() {
108 public void setTenantId(String tenantId) {
109 this.tenantId = tenantId;
112 public String getCloudSiteId() {
116 public void setCloudSiteId(String cloudSiteId) {
117 this.cloudSiteId = cloudSiteId;
120 public String getCloudOwner() {
124 public void setCloudOwner(String cloudOwner) {
125 this.cloudOwner = cloudOwner;
128 public MsoRequest getMsoRequest() {
132 public void setMsoRequest(MsoRequest msoRequest) {
133 this.msoRequest = msoRequest;
136 public String getMessageId() {
140 public void setMessageId(String messageId) {
141 this.messageId = messageId;
144 public String getMode() {
148 public void setMode(String mode) {