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.openecomp.mso.openstack.beans;
23 import org.openecomp.mso.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
47 public VnfRollback() {}
49 public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
50 boolean tenantCreated, boolean vnfCreated,
51 MsoRequest msoRequest,
52 String volumeGroupName, String volumeGroupId, String requestType, String modelCustomizationUuid) {
55 this.tenantId = tenantId;
56 this.cloudSiteId = cloudSiteId;
57 this.tenantCreated = tenantCreated;
58 this.vnfCreated = vnfCreated;
59 this.msoRequest = msoRequest;
60 this.volumeGroupName = volumeGroupName;
61 this.volumeGroupId = volumeGroupId;
62 this.requestType = requestType;
63 this.modelCustomizationUuid = modelCustomizationUuid;
66 public String getVnfId() {
69 public void setVnfId(String vnfId) {
72 public String getTenantId() {
76 public void setTenantId(String tenantId) {
77 this.tenantId = tenantId;
79 public String getCloudSiteId() {
82 public void setCloudSiteId(String cloudId) {
83 this.cloudSiteId = cloudId;
85 public boolean getTenantCreated() {
88 public void setTenantCreated(boolean tenantCreated) {
89 this.tenantCreated = tenantCreated;
91 public boolean getVnfCreated() {
94 public void setVnfCreated(boolean vnfCreated) {
95 this.vnfCreated = vnfCreated;
97 public MsoRequest getMsoRequest() {
100 public void setMsoRequest (MsoRequest msoRequest) {
101 this.msoRequest = msoRequest;
103 public String getVolumeGroupName() {
104 return this.volumeGroupName;
106 public void setVolumeGroupName(String volumeGroupName) {
107 this.volumeGroupName = volumeGroupName;
109 public String getVolumeGroupId() {
110 return this.volumeGroupId;
112 public void setVolumeGroupId(String volumeGroupId) {
113 this.volumeGroupId = volumeGroupId;
115 public String getRequestType() {
116 return this.requestType;
118 public void setRequestType(String requestType) {
119 this.requestType = requestType;
121 public String getVolumeGroupHeatStackId() {
122 return this.volumeGroupHeatStackId;
124 public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
125 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
128 public String getBaseGroupHeatStackId() {
129 return this.baseGroupHeatStackId;
131 public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
132 this.baseGroupHeatStackId = baseGroupHeatStackId;
135 public boolean isBase() {
138 public void setIsBase(boolean isBase) {
139 this.isBase = isBase;
141 public String getVfModuleStackId() {
142 return this.vfModuleStackId;
144 public void setVfModuleStackId(String vfModuleStackId) {
145 this.vfModuleStackId = vfModuleStackId;
147 public String getModelCustomizationUuid() {
148 return this.modelCustomizationUuid;
150 public void setModelCustomizationUuid(String modelCustomizationUuid) {
151 this.modelCustomizationUuid = modelCustomizationUuid;
154 public String toString() {
155 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
156 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
157 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
158 + ", modelCustomizationUuid=" + this.modelCustomizationUuid;