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;
26 * Javabean representing the rollback criteria following a "Create VNF" operation. This structure can be passed back to
27 * the "Rollback VNF" operation to undo the effects of the create.
31 public class VnfRollback {
33 private String tenantId;
34 private String cloudOwner;
35 private String cloudSiteId;
36 private boolean tenantCreated = false;
37 private boolean vnfCreated = false;
38 private MsoRequest msoRequest;
39 private String volumeGroupName;
40 private String volumeGroupId;
41 private String requestType;
42 private String volumeGroupHeatStackId;
43 private String baseGroupHeatStackId;
44 private boolean isBase = false;
45 private String vfModuleStackId;
46 private String modelCustomizationUuid; // NOTE: this is the vfModule's modelCustomizationUuid
47 private String mode = "HEAT";
49 public VnfRollback() {}
52 * 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 cloudOwner, String cloudSiteId, boolean tenantCreated,
67 boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
68 String modelCustomizationUuid) {
71 this.tenantId = tenantId;
72 this.cloudOwner = cloudOwner;
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;
89 * @param tenantCreated
92 * @param volumeGroupName
93 * @param volumeGroupId
95 * @param modelCustomizationUuid
97 public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
98 boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
99 String modelCustomizationUuid, String orchestrationMode) {
102 this.tenantId = tenantId;
103 this.cloudOwner = cloudOwner;
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() {
119 public void setVnfId(String vnfId) {
123 public String getTenantId() {
127 public void setTenantId(String tenantId) {
128 this.tenantId = tenantId;
131 public String getCloudSiteId() {
135 public void setCloudSiteId(String cloudId) {
136 this.cloudSiteId = cloudId;
139 public String getCloudOwner() {
143 public void setCloudOwner(String cloudOwner) {
144 this.cloudOwner = cloudOwner;
147 public boolean getTenantCreated() {
148 return tenantCreated;
151 public void setTenantCreated(boolean tenantCreated) {
152 this.tenantCreated = tenantCreated;
155 public boolean getVnfCreated() {
159 public void setVnfCreated(boolean vnfCreated) {
160 this.vnfCreated = vnfCreated;
163 public MsoRequest getMsoRequest() {
167 public void setMsoRequest(MsoRequest msoRequest) {
168 this.msoRequest = msoRequest;
171 public String getVolumeGroupName() {
172 return this.volumeGroupName;
175 public void setVolumeGroupName(String volumeGroupName) {
176 this.volumeGroupName = volumeGroupName;
179 public String getVolumeGroupId() {
180 return this.volumeGroupId;
183 public void setVolumeGroupId(String volumeGroupId) {
184 this.volumeGroupId = volumeGroupId;
187 public String getRequestType() {
188 return this.requestType;
191 public void setRequestType(String requestType) {
192 this.requestType = requestType;
195 public String getVolumeGroupHeatStackId() {
196 return this.volumeGroupHeatStackId;
199 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
200 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
203 public String getBaseGroupHeatStackId() {
204 return this.baseGroupHeatStackId;
207 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
208 this.baseGroupHeatStackId = baseGroupHeatStackId;
211 public boolean isBase() {
215 public void setIsBase(boolean isBase) {
216 this.isBase = isBase;
219 public String getVfModuleStackId() {
220 return this.vfModuleStackId;
223 public void setVfModuleStackId(String vfModuleStackId) {
224 this.vfModuleStackId = vfModuleStackId;
227 public String getModelCustomizationUuid() {
228 return this.modelCustomizationUuid;
231 public void setModelCustomizationUuid(String modelCustomizationUuid) {
232 this.modelCustomizationUuid = modelCustomizationUuid;
235 public String getMode() {
239 public void setMode(String mode) {
244 public String toString() {
245 return "VnfRollback: owner=" + cloudOwner + ", cloud=" + cloudSiteId + ", tenant=" + tenantId + ", vnf=" + vnfId
246 + ", tenantCreated=" + tenantCreated + ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
247 + ", modelCustomizationUuid=" + this.modelCustomizationUuid + ", mode=" + mode;