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 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,
69 boolean tenantCreated, boolean vnfCreated,
70 MsoRequest msoRequest,
71 String volumeGroupName, String volumeGroupId, String requestType, String modelCustomizationUuid) {
74 this.tenantId = tenantId;
75 this.cloudSiteId = cloudSiteId;
76 this.cloudOwner = cloudOwner;
77 this.tenantCreated = tenantCreated;
78 this.vnfCreated = vnfCreated;
79 this.msoRequest = msoRequest;
80 this.volumeGroupName = volumeGroupName;
81 this.volumeGroupId = volumeGroupId;
82 this.requestType = requestType;
83 this.modelCustomizationUuid = modelCustomizationUuid;
87 * For backwards compatibility... orchestration mode defaults to HEAT
93 * @param tenantCreated
96 * @param volumeGroupName
97 * @param volumeGroupId
99 * @param modelCustomizationUuid
101 public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId,
102 boolean tenantCreated, boolean vnfCreated,
103 MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
104 String requestType, String modelCustomizationUuid, String orchestrationMode) {
107 this.tenantId = tenantId;
108 this.cloudSiteId = cloudSiteId;
109 this.cloudOwner = cloudOwner;
110 this.tenantCreated = tenantCreated;
111 this.vnfCreated = vnfCreated;
112 this.msoRequest = msoRequest;
113 this.volumeGroupName = volumeGroupName;
114 this.volumeGroupId = volumeGroupId;
115 this.requestType = requestType;
116 this.modelCustomizationUuid = modelCustomizationUuid;
117 this.mode = orchestrationMode;
120 public String getVnfId() {
123 public void setVnfId(String vnfId) {
126 public String getTenantId() {
130 public void setTenantId(String tenantId) {
131 this.tenantId = tenantId;
133 public String getCloudSiteId() {
136 public void setCloudSiteId(String cloudId) {
137 this.cloudSiteId = cloudId;
139 public String getCloudOwner() {
142 public void setCloudOwner(String cloudOwner) {
143 this.cloudOwner = cloudOwner;
145 public boolean getTenantCreated() {
146 return tenantCreated;
148 public void setTenantCreated(boolean tenantCreated) {
149 this.tenantCreated = tenantCreated;
151 public boolean getVnfCreated() {
154 public void setVnfCreated(boolean vnfCreated) {
155 this.vnfCreated = vnfCreated;
157 public MsoRequest getMsoRequest() {
160 public void setMsoRequest (MsoRequest msoRequest) {
161 this.msoRequest = msoRequest;
163 public String getVolumeGroupName() {
164 return this.volumeGroupName;
166 public void setVolumeGroupName(String volumeGroupName) {
167 this.volumeGroupName = volumeGroupName;
169 public String getVolumeGroupId() {
170 return this.volumeGroupId;
172 public void setVolumeGroupId(String volumeGroupId) {
173 this.volumeGroupId = volumeGroupId;
175 public String getRequestType() {
176 return this.requestType;
178 public void setRequestType(String requestType) {
179 this.requestType = requestType;
181 public String getVolumeGroupHeatStackId() {
182 return this.volumeGroupHeatStackId;
184 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
185 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
188 public String getBaseGroupHeatStackId() {
189 return this.baseGroupHeatStackId;
191 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
192 this.baseGroupHeatStackId = baseGroupHeatStackId;
195 public boolean isBase() {
198 public void setIsBase(boolean isBase) {
199 this.isBase = isBase;
201 public String getVfModuleStackId() {
202 return this.vfModuleStackId;
204 public void setVfModuleStackId(String vfModuleStackId) {
205 this.vfModuleStackId = vfModuleStackId;
207 public String getModelCustomizationUuid() {
208 return this.modelCustomizationUuid;
210 public void setModelCustomizationUuid(String modelCustomizationUuid) {
211 this.modelCustomizationUuid = modelCustomizationUuid;
213 public String getMode() {
216 public void setMode(String mode) {
220 public String toString() {
221 return "VnfRollback: cloud=" + cloudSiteId + ", cloudOwner=" + cloudOwner + ", tenant=" + tenantId +
222 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
223 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
224 + ", modelCustomizationUuid=" + this.modelCustomizationUuid