Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapter-utils / src / main / java / org / onap / so / openstack / beans / VnfRollback.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  */
20
21 package org.onap.so.openstack.beans;
22
23 import org.onap.so.entity.MsoRequest;
24 import org.springframework.stereotype.Component;
25
26 /**
27  * Javabean representing the rollback criteria following a "Create VNF" operation. This structure can be passed back to
28  * the "Rollback VNF" operation to undo the effects of the create.
29  *
30  *
31  */
32 @Component
33 public class VnfRollback {
34     private String vnfId;
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";
50
51     public VnfRollback() {}
52
53     /**
54      * For backwards compatibility... orchestration mode defaults to HEAT
55      *
56      * @param vnfId
57      * @param tenantId
58      * @param cloudSiteId
59      * @param cloudOwner
60      * @param tenantCreated
61      * @param vnfCreated
62      * @param msoRequest
63      * @param volumeGroupName
64      * @param volumeGroupId
65      * @param requestType
66      * @param modelCustomizationUuid
67      */
68     public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
69             boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
70             String modelCustomizationUuid) {
71         super();
72         this.vnfId = vnfId;
73         this.tenantId = tenantId;
74         this.cloudSiteId = cloudSiteId;
75         this.cloudOwner = cloudOwner;
76         this.tenantCreated = tenantCreated;
77         this.vnfCreated = vnfCreated;
78         this.msoRequest = msoRequest;
79         this.volumeGroupName = volumeGroupName;
80         this.volumeGroupId = volumeGroupId;
81         this.requestType = requestType;
82         this.modelCustomizationUuid = modelCustomizationUuid;
83     }
84
85     /**
86      * For backwards compatibility... orchestration mode defaults to HEAT
87      *
88      * @param vnfId
89      * @param tenantId
90      * @param cloudSiteId
91      * @param cloudOwner
92      * @param tenantCreated
93      * @param vnfCreated
94      * @param msoRequest
95      * @param volumeGroupName
96      * @param volumeGroupId
97      * @param requestType
98      * @param modelCustomizationUuid
99      */
100     public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
101             boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
102             String modelCustomizationUuid, String orchestrationMode) {
103         super();
104         this.vnfId = vnfId;
105         this.tenantId = tenantId;
106         this.cloudSiteId = cloudSiteId;
107         this.cloudOwner = cloudOwner;
108         this.tenantCreated = tenantCreated;
109         this.vnfCreated = vnfCreated;
110         this.msoRequest = msoRequest;
111         this.volumeGroupName = volumeGroupName;
112         this.volumeGroupId = volumeGroupId;
113         this.requestType = requestType;
114         this.modelCustomizationUuid = modelCustomizationUuid;
115         this.mode = orchestrationMode;
116     }
117
118     public String getVnfId() {
119         return vnfId;
120     }
121
122     public void setVnfId(String vnfId) {
123         this.vnfId = vnfId;
124     }
125
126     public String getTenantId() {
127         return tenantId;
128     }
129
130     public void setTenantId(String tenantId) {
131         this.tenantId = tenantId;
132     }
133
134     public String getCloudSiteId() {
135         return cloudSiteId;
136     }
137
138     public void setCloudSiteId(String cloudId) {
139         this.cloudSiteId = cloudId;
140     }
141
142     public String getCloudOwner() {
143         return cloudOwner;
144     }
145
146     public void setCloudOwner(String cloudOwner) {
147         this.cloudOwner = cloudOwner;
148     }
149
150     public boolean getTenantCreated() {
151         return tenantCreated;
152     }
153
154     public void setTenantCreated(boolean tenantCreated) {
155         this.tenantCreated = tenantCreated;
156     }
157
158     public boolean getVnfCreated() {
159         return vnfCreated;
160     }
161
162     public void setVnfCreated(boolean vnfCreated) {
163         this.vnfCreated = vnfCreated;
164     }
165
166     public MsoRequest getMsoRequest() {
167         return msoRequest;
168     }
169
170     public void setMsoRequest(MsoRequest msoRequest) {
171         this.msoRequest = msoRequest;
172     }
173
174     public String getVolumeGroupName() {
175         return this.volumeGroupName;
176     }
177
178     public void setVolumeGroupName(String volumeGroupName) {
179         this.volumeGroupName = volumeGroupName;
180     }
181
182     public String getVolumeGroupId() {
183         return this.volumeGroupId;
184     }
185
186     public void setVolumeGroupId(String volumeGroupId) {
187         this.volumeGroupId = volumeGroupId;
188     }
189
190     public String getRequestType() {
191         return this.requestType;
192     }
193
194     public void setRequestType(String requestType) {
195         this.requestType = requestType;
196     }
197
198     public String getVolumeGroupHeatStackId() {
199         return this.volumeGroupHeatStackId;
200     }
201
202     public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
203         this.volumeGroupHeatStackId = volumeGroupHeatStackId;
204     }
205
206     public String getBaseGroupHeatStackId() {
207         return this.baseGroupHeatStackId;
208     }
209
210     public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
211         this.baseGroupHeatStackId = baseGroupHeatStackId;
212     }
213
214     public boolean isBase() {
215         return this.isBase;
216     }
217
218     public void setIsBase(boolean isBase) {
219         this.isBase = isBase;
220     }
221
222     public String getVfModuleStackId() {
223         return this.vfModuleStackId;
224     }
225
226     public void setVfModuleStackId(String vfModuleStackId) {
227         this.vfModuleStackId = vfModuleStackId;
228     }
229
230     public String getModelCustomizationUuid() {
231         return this.modelCustomizationUuid;
232     }
233
234     public void setModelCustomizationUuid(String modelCustomizationUuid) {
235         this.modelCustomizationUuid = modelCustomizationUuid;
236     }
237
238     public String getMode() {
239         return this.mode;
240     }
241
242     public void setMode(String mode) {
243         this.mode = mode;
244     }
245
246     @Override
247     public String toString() {
248         return "VnfRollback: cloud=" + cloudSiteId + ", cloudOwner=" + cloudOwner + ", tenant=" + tenantId + ", vnf="
249                 + vnfId + ", tenantCreated=" + tenantCreated + ", vnfCreated=" + vnfCreated + ", requestType = "
250                 + requestType + ", modelCustomizationUuid=" + this.modelCustomizationUuid + ", mode=" + mode;
251     }
252 }