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.openstack.beans;
23 import org.onap.so.entity.MsoRequest;
24 import org.springframework.stereotype.Component;
27 * Javabean representing the rollback criteria following a "Create VNF" operation. This structure can be passed back to
28 * the "Rollback VNF" operation to undo the effects of the create.
33 public class VnfRollback {
35 private String tenantId;
36 private String cloudSiteId;
37 private String cloudOwner;
38 private boolean tenantCreated = false;
39 private boolean vnfCreated = false;
40 private MsoRequest msoRequest;
41 private String volumeGroupName;
42 private String volumeGroupId;
43 private String requestType;
44 private String volumeGroupHeatStackId;
45 private String baseGroupHeatStackId;
46 private boolean isBase = false;
47 private String vfModuleStackId;
48 private String modelCustomizationUuid; // NOTE: this is the vfModule's modelCustomizationUuid
49 private String mode = "HEAT";
51 public VnfRollback() {}
54 * For backwards compatibility... orchestration mode defaults to HEAT
60 * @param tenantCreated
63 * @param volumeGroupName
64 * @param volumeGroupId
66 * @param modelCustomizationUuid
68 public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
69 boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
70 String modelCustomizationUuid) {
73 this.tenantId = tenantId;
74 this.cloudSiteId = cloudSiteId;
75 this.cloudOwner = cloudOwner;
76 this.tenantCreated = tenantCreated;
77 this.vnfCreated = vnfCreated;
78 this.msoRequest = msoRequest;
79 this.volumeGroupName = volumeGroupName;
80 this.volumeGroupId = volumeGroupId;
81 this.requestType = requestType;
82 this.modelCustomizationUuid = modelCustomizationUuid;
86 * For backwards compatibility... orchestration mode defaults to HEAT
92 * @param tenantCreated
95 * @param volumeGroupName
96 * @param volumeGroupId
98 * @param modelCustomizationUuid
100 public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
101 boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
102 String modelCustomizationUuid, String orchestrationMode) {
105 this.tenantId = tenantId;
106 this.cloudSiteId = cloudSiteId;
107 this.cloudOwner = cloudOwner;
108 this.tenantCreated = tenantCreated;
109 this.vnfCreated = vnfCreated;
110 this.msoRequest = msoRequest;
111 this.volumeGroupName = volumeGroupName;
112 this.volumeGroupId = volumeGroupId;
113 this.requestType = requestType;
114 this.modelCustomizationUuid = modelCustomizationUuid;
115 this.mode = orchestrationMode;
118 public String getVnfId() {
122 public void setVnfId(String vnfId) {
126 public String getTenantId() {
130 public void setTenantId(String tenantId) {
131 this.tenantId = tenantId;
134 public String getCloudSiteId() {
138 public void setCloudSiteId(String cloudId) {
139 this.cloudSiteId = cloudId;
142 public String getCloudOwner() {
146 public void setCloudOwner(String cloudOwner) {
147 this.cloudOwner = cloudOwner;
150 public boolean getTenantCreated() {
151 return tenantCreated;
154 public void setTenantCreated(boolean tenantCreated) {
155 this.tenantCreated = tenantCreated;
158 public boolean getVnfCreated() {
162 public void setVnfCreated(boolean vnfCreated) {
163 this.vnfCreated = vnfCreated;
166 public MsoRequest getMsoRequest() {
170 public void setMsoRequest(MsoRequest msoRequest) {
171 this.msoRequest = msoRequest;
174 public String getVolumeGroupName() {
175 return this.volumeGroupName;
178 public void setVolumeGroupName(String volumeGroupName) {
179 this.volumeGroupName = volumeGroupName;
182 public String getVolumeGroupId() {
183 return this.volumeGroupId;
186 public void setVolumeGroupId(String volumeGroupId) {
187 this.volumeGroupId = volumeGroupId;
190 public String getRequestType() {
191 return this.requestType;
194 public void setRequestType(String requestType) {
195 this.requestType = requestType;
198 public String getVolumeGroupHeatStackId() {
199 return this.volumeGroupHeatStackId;
202 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
203 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
206 public String getBaseGroupHeatStackId() {
207 return this.baseGroupHeatStackId;
210 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
211 this.baseGroupHeatStackId = baseGroupHeatStackId;
214 public boolean isBase() {
218 public void setIsBase(boolean isBase) {
219 this.isBase = isBase;
222 public String getVfModuleStackId() {
223 return this.vfModuleStackId;
226 public void setVfModuleStackId(String vfModuleStackId) {
227 this.vfModuleStackId = vfModuleStackId;
230 public String getModelCustomizationUuid() {
231 return this.modelCustomizationUuid;
234 public void setModelCustomizationUuid(String modelCustomizationUuid) {
235 this.modelCustomizationUuid = modelCustomizationUuid;
238 public String getMode() {
242 public void setMode(String mode) {
247 public String toString() {
248 return "VnfRollback: cloud=" + cloudSiteId + ", cloudOwner=" + cloudOwner + ", tenant=" + tenantId + ", vnf="
249 + vnfId + ", tenantCreated=" + tenantCreated + ", vnfCreated=" + vnfCreated + ", requestType = "
250 + requestType + ", modelCustomizationUuid=" + this.modelCustomizationUuid + ", mode=" + mode;