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;
26 * Javabean representing the rollback criteria following a "Create VNF"
27 * operation. This structure can be passed back to the "Rollback VNF"
28 * operation to undo the effects of the create.
33 public class VnfRollback {
35 private String tenantId;
36 private String cloudSiteId;
37 private boolean tenantCreated = false;
38 private boolean vnfCreated = false;
39 private MsoRequest msoRequest;
40 private String volumeGroupName;
41 private String volumeGroupId;
42 private String requestType;
43 private String volumeGroupHeatStackId;
44 private String baseGroupHeatStackId;
45 private boolean isBase = false;
46 private String vfModuleStackId;
47 private String modelCustomizationUuid; //NOTE: this is the vfModule's modelCustomizationUuid
48 private String mode = "HEAT";
50 public VnfRollback() {}
53 * For backwards compatibility... orchestration mode defaults to HEAT
58 * @param tenantCreated
61 * @param volumeGroupName
62 * @param volumeGroupId
64 * @param modelCustomizationUuid
66 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
67 boolean tenantCreated, boolean vnfCreated,
68 MsoRequest msoRequest,
69 String volumeGroupName, String volumeGroupId, String requestType, String modelCustomizationUuid) {
72 this.tenantId = tenantId;
73 this.cloudSiteId = cloudSiteId;
74 this.tenantCreated = tenantCreated;
75 this.vnfCreated = vnfCreated;
76 this.msoRequest = msoRequest;
77 this.volumeGroupName = volumeGroupName;
78 this.volumeGroupId = volumeGroupId;
79 this.requestType = requestType;
80 this.modelCustomizationUuid = modelCustomizationUuid;
84 * For backwards compatibility... orchestration mode defaults to HEAT
89 * @param tenantCreated
92 * @param volumeGroupName
93 * @param volumeGroupId
95 * @param modelCustomizationUuid
97 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
98 boolean tenantCreated, boolean vnfCreated,
99 MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
100 String requestType, String modelCustomizationUuid, String orchestrationMode) {
103 this.tenantId = tenantId;
104 this.cloudSiteId = cloudSiteId;
105 this.tenantCreated = tenantCreated;
106 this.vnfCreated = vnfCreated;
107 this.msoRequest = msoRequest;
108 this.volumeGroupName = volumeGroupName;
109 this.volumeGroupId = volumeGroupId;
110 this.requestType = requestType;
111 this.modelCustomizationUuid = modelCustomizationUuid;
112 this.mode = orchestrationMode;
115 public String getVnfId() {
118 public void setVnfId(String vnfId) {
121 public String getTenantId() {
125 public void setTenantId(String tenantId) {
126 this.tenantId = tenantId;
128 public String getCloudSiteId() {
131 public void setCloudSiteId(String cloudId) {
132 this.cloudSiteId = cloudId;
134 public boolean getTenantCreated() {
135 return tenantCreated;
137 public void setTenantCreated(boolean tenantCreated) {
138 this.tenantCreated = tenantCreated;
140 public boolean getVnfCreated() {
143 public void setVnfCreated(boolean vnfCreated) {
144 this.vnfCreated = vnfCreated;
146 public MsoRequest getMsoRequest() {
149 public void setMsoRequest (MsoRequest msoRequest) {
150 this.msoRequest = msoRequest;
152 public String getVolumeGroupName() {
153 return this.volumeGroupName;
155 public void setVolumeGroupName(String volumeGroupName) {
156 this.volumeGroupName = volumeGroupName;
158 public String getVolumeGroupId() {
159 return this.volumeGroupId;
161 public void setVolumeGroupId(String volumeGroupId) {
162 this.volumeGroupId = volumeGroupId;
164 public String getRequestType() {
165 return this.requestType;
167 public void setRequestType(String requestType) {
168 this.requestType = requestType;
170 public String getVolumeGroupHeatStackId() {
171 return this.volumeGroupHeatStackId;
173 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
174 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
177 public String getBaseGroupHeatStackId() {
178 return this.baseGroupHeatStackId;
180 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
181 this.baseGroupHeatStackId = baseGroupHeatStackId;
184 public boolean isBase() {
187 public void setIsBase(boolean isBase) {
188 this.isBase = isBase;
190 public String getVfModuleStackId() {
191 return this.vfModuleStackId;
193 public void setVfModuleStackId(String vfModuleStackId) {
194 this.vfModuleStackId = vfModuleStackId;
196 public String getModelCustomizationUuid() {
197 return this.modelCustomizationUuid;
199 public void setModelCustomizationUuid(String modelCustomizationUuid) {
200 this.modelCustomizationUuid = modelCustomizationUuid;
202 public String getMode() {
205 public void setMode(String mode) {
209 public String toString() {
210 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
211 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
212 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
213 + ", modelCustomizationUuid=" + this.modelCustomizationUuid