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.openecomp.mso.openstack.beans;
23 import org.openecomp.mso.entity.MsoRequest;
25 * Javabean representing the rollback criteria following a "Create VNF"
26 * operation. This structure can be passed back to the "Rollback VNF"
27 * operation to undo the effects of the create.
31 public class VnfRollback {
33 private String tenantId;
34 private String cloudSiteId;
35 private boolean tenantCreated = false;
36 private boolean vnfCreated = false;
37 private MsoRequest msoRequest;
38 private String volumeGroupName;
39 private String volumeGroupId;
40 private String requestType;
41 private String volumeGroupHeatStackId;
42 private String baseGroupHeatStackId;
43 private boolean isBase = false;
44 private String vfModuleStackId;
45 private String modelCustomizationUuid; //NOTE: this is the vfModule's modelCustomizationUuid
46 private String mode = "HEAT";
48 public VnfRollback() {}
51 * For backwards compatibility... orchestration mode defaults to HEAT
56 * @param tenantCreated
59 * @param volumeGroupName
60 * @param volumeGroupId
62 * @param modelCustomizationUuid
64 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
65 boolean tenantCreated, boolean vnfCreated,
66 MsoRequest msoRequest,
67 String volumeGroupName, String volumeGroupId, String requestType, String modelCustomizationUuid) {
70 this.tenantId = tenantId;
71 this.cloudSiteId = cloudSiteId;
72 this.tenantCreated = tenantCreated;
73 this.vnfCreated = vnfCreated;
74 this.msoRequest = msoRequest;
75 this.volumeGroupName = volumeGroupName;
76 this.volumeGroupId = volumeGroupId;
77 this.requestType = requestType;
78 this.modelCustomizationUuid = modelCustomizationUuid;
82 * For backwards compatibility... orchestration mode defaults to HEAT
87 * @param tenantCreated
90 * @param volumeGroupName
91 * @param volumeGroupId
93 * @param modelCustomizationUuid
95 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
96 boolean tenantCreated, boolean vnfCreated,
97 MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
98 String requestType, String modelCustomizationUuid, String orchestrationMode) {
101 this.tenantId = tenantId;
102 this.cloudSiteId = cloudSiteId;
103 this.tenantCreated = tenantCreated;
104 this.vnfCreated = vnfCreated;
105 this.msoRequest = msoRequest;
106 this.volumeGroupName = volumeGroupName;
107 this.volumeGroupId = volumeGroupId;
108 this.requestType = requestType;
109 this.modelCustomizationUuid = modelCustomizationUuid;
110 this.mode = orchestrationMode;
113 public String getVnfId() {
116 public void setVnfId(String vnfId) {
119 public String getTenantId() {
123 public void setTenantId(String tenantId) {
124 this.tenantId = tenantId;
126 public String getCloudSiteId() {
129 public void setCloudSiteId(String cloudId) {
130 this.cloudSiteId = cloudId;
132 public boolean getTenantCreated() {
133 return tenantCreated;
135 public void setTenantCreated(boolean tenantCreated) {
136 this.tenantCreated = tenantCreated;
138 public boolean getVnfCreated() {
141 public void setVnfCreated(boolean vnfCreated) {
142 this.vnfCreated = vnfCreated;
144 public MsoRequest getMsoRequest() {
147 public void setMsoRequest (MsoRequest msoRequest) {
148 this.msoRequest = msoRequest;
150 public String getVolumeGroupName() {
151 return this.volumeGroupName;
153 public void setVolumeGroupName(String volumeGroupName) {
154 this.volumeGroupName = volumeGroupName;
156 public String getVolumeGroupId() {
157 return this.volumeGroupId;
159 public void setVolumeGroupId(String volumeGroupId) {
160 this.volumeGroupId = volumeGroupId;
162 public String getRequestType() {
163 return this.requestType;
165 public void setRequestType(String requestType) {
166 this.requestType = requestType;
168 public String getVolumeGroupHeatStackId() {
169 return this.volumeGroupHeatStackId;
171 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
172 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
175 public String getBaseGroupHeatStackId() {
176 return this.baseGroupHeatStackId;
178 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
179 this.baseGroupHeatStackId = baseGroupHeatStackId;
182 public boolean isBase() {
185 public void setIsBase(boolean isBase) {
186 this.isBase = isBase;
188 public String getVfModuleStackId() {
189 return this.vfModuleStackId;
191 public void setVfModuleStackId(String vfModuleStackId) {
192 this.vfModuleStackId = vfModuleStackId;
194 public String getModelCustomizationUuid() {
195 return this.modelCustomizationUuid;
197 public void setModelCustomizationUuid(String modelCustomizationUuid) {
198 this.modelCustomizationUuid = modelCustomizationUuid;
200 public String getMode() {
203 public void setMode(String mode) {
207 public String toString() {
208 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
209 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
210 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
211 + ", modelCustomizationUuid=" + this.modelCustomizationUuid