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;
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;
86 * @param tenantCreated
89 * @param volumeGroupName
90 * @param volumeGroupId
92 * @param modelCustomizationUuid
94 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
95 boolean tenantCreated, boolean vnfCreated,
96 MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
97 String requestType, String modelCustomizationUuid, String orchestrationMode) {
100 this.tenantId = tenantId;
101 this.cloudSiteId = cloudSiteId;
102 this.tenantCreated = tenantCreated;
103 this.vnfCreated = vnfCreated;
104 this.msoRequest = msoRequest;
105 this.volumeGroupName = volumeGroupName;
106 this.volumeGroupId = volumeGroupId;
107 this.requestType = requestType;
108 this.modelCustomizationUuid = modelCustomizationUuid;
109 this.mode = orchestrationMode;
112 public String getVnfId() {
115 public void setVnfId(String vnfId) {
118 public String getTenantId() {
122 public void setTenantId(String tenantId) {
123 this.tenantId = tenantId;
125 public String getCloudSiteId() {
128 public void setCloudSiteId(String cloudId) {
129 this.cloudSiteId = cloudId;
131 public boolean getTenantCreated() {
132 return tenantCreated;
134 public void setTenantCreated(boolean tenantCreated) {
135 this.tenantCreated = tenantCreated;
137 public boolean getVnfCreated() {
140 public void setVnfCreated(boolean vnfCreated) {
141 this.vnfCreated = vnfCreated;
143 public MsoRequest getMsoRequest() {
146 public void setMsoRequest (MsoRequest msoRequest) {
147 this.msoRequest = msoRequest;
149 public String getVolumeGroupName() {
150 return this.volumeGroupName;
152 public void setVolumeGroupName(String volumeGroupName) {
153 this.volumeGroupName = volumeGroupName;
155 public String getVolumeGroupId() {
156 return this.volumeGroupId;
158 public void setVolumeGroupId(String volumeGroupId) {
159 this.volumeGroupId = volumeGroupId;
161 public String getRequestType() {
162 return this.requestType;
164 public void setRequestType(String requestType) {
165 this.requestType = requestType;
167 public String getVolumeGroupHeatStackId() {
168 return this.volumeGroupHeatStackId;
170 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
171 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
174 public String getBaseGroupHeatStackId() {
175 return this.baseGroupHeatStackId;
177 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
178 this.baseGroupHeatStackId = baseGroupHeatStackId;
181 public boolean isBase() {
184 public void setIsBase(boolean isBase) {
185 this.isBase = isBase;
187 public String getVfModuleStackId() {
188 return this.vfModuleStackId;
190 public void setVfModuleStackId(String vfModuleStackId) {
191 this.vfModuleStackId = vfModuleStackId;
193 public String getModelCustomizationUuid() {
194 return this.modelCustomizationUuid;
196 public void setModelCustomizationUuid(String modelCustomizationUuid) {
197 this.modelCustomizationUuid = modelCustomizationUuid;
199 public String getMode() {
202 public void setMode(String mode) {
206 public String toString() {
207 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
208 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
209 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
210 + ", modelCustomizationUuid=" + this.modelCustomizationUuid