Merge "Reorder modifiers"
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / 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.openecomp.mso.openstack.beans;
22
23 import org.openecomp.mso.entity.MsoRequest;
24 /**
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.
28  *
29  *
30  */
31 public class VnfRollback {
32         private String vnfId;
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";
47
48         public VnfRollback() {}
49
50         /**
51          * For backwards compatibility... orchestration mode defaults to HEAT
52          * 
53          * @param vnfId
54          * @param tenantId
55          * @param cloudSiteId
56          * @param tenantCreated
57          * @param vnfCreated
58          * @param msoRequest
59          * @param volumeGroupName
60          * @param volumeGroupId
61          * @param requestType
62          * @param modelCustomizationUuid
63          */
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) {
68                 super();
69                 this.vnfId = vnfId;
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;
79         }
80
81         /**
82          * For backwards compatibility... orchestration mode defaults to HEAT
83          * 
84          * @param vnfId
85          * @param tenantId
86          * @param cloudSiteId
87          * @param tenantCreated
88          * @param vnfCreated
89          * @param msoRequest
90          * @param volumeGroupName
91          * @param volumeGroupId
92          * @param requestType
93          * @param modelCustomizationUuid
94          */
95         public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
96                         boolean tenantCreated, boolean vnfCreated,
97                         MsoRequest msoRequest, String volumeGroupName, String volumeGroupId,
98                         String requestType, String modelCustomizationUuid, String orchestrationMode) {
99                 super();
100                 this.vnfId = vnfId;
101                 this.tenantId = tenantId;
102                 this.cloudSiteId = cloudSiteId;
103                 this.tenantCreated = tenantCreated;
104                 this.vnfCreated = vnfCreated;
105                 this.msoRequest = msoRequest;
106                 this.volumeGroupName = volumeGroupName;
107                 this.volumeGroupId = volumeGroupId;
108                 this.requestType = requestType;
109                 this.modelCustomizationUuid = modelCustomizationUuid;
110                 this.mode = orchestrationMode;
111         }
112
113         public String getVnfId() {
114                 return vnfId;
115         }
116         public void setVnfId(String vnfId) {
117                 this.vnfId = vnfId;
118         }
119         public String getTenantId() {
120                 return tenantId;
121         }
122
123         public void setTenantId(String tenantId) {
124                 this.tenantId = tenantId;
125         }
126         public String getCloudSiteId() {
127                 return cloudSiteId;
128         }
129         public void setCloudSiteId(String cloudId) {
130                 this.cloudSiteId = cloudId;
131         }
132         public boolean getTenantCreated() {
133                 return tenantCreated;
134         }
135         public void setTenantCreated(boolean tenantCreated) {
136                 this.tenantCreated = tenantCreated;
137         }
138         public boolean getVnfCreated() {
139                 return vnfCreated;
140         }
141         public void setVnfCreated(boolean vnfCreated) {
142                 this.vnfCreated = vnfCreated;
143         }
144         public MsoRequest getMsoRequest() {
145                 return msoRequest;
146         }
147         public void setMsoRequest (MsoRequest msoRequest) {
148                 this.msoRequest = msoRequest;
149         }
150         public String getVolumeGroupName() {
151                 return this.volumeGroupName;
152         }
153         public void setVolumeGroupName(String volumeGroupName) {
154                 this.volumeGroupName = volumeGroupName;
155         }
156         public String getVolumeGroupId() {
157                 return this.volumeGroupId;
158         }
159         public void setVolumeGroupId(String volumeGroupId) {
160                 this.volumeGroupId = volumeGroupId;
161         }
162         public String getRequestType() {
163                 return this.requestType;
164         }
165         public void setRequestType(String requestType) {
166                 this.requestType = requestType;
167         }
168         public String getVolumeGroupHeatStackId() {
169                 return this.volumeGroupHeatStackId;
170         }
171         public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
172                 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
173         }
174
175         public String getBaseGroupHeatStackId() {
176                 return this.baseGroupHeatStackId;
177         }
178         public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
179                 this.baseGroupHeatStackId = baseGroupHeatStackId;
180         }
181
182         public boolean isBase() {
183                 return this.isBase;
184         }
185         public void setIsBase(boolean isBase) {
186                 this.isBase = isBase;
187         }
188         public String getVfModuleStackId() {
189                 return this.vfModuleStackId;
190         }
191         public void setVfModuleStackId(String vfModuleStackId) {
192                 this.vfModuleStackId = vfModuleStackId;
193         }
194         public String getModelCustomizationUuid() {
195                 return this.modelCustomizationUuid;
196         }
197         public void setModelCustomizationUuid(String modelCustomizationUuid) {
198                 this.modelCustomizationUuid = modelCustomizationUuid;
199         }
200         public String getMode() {
201                 return this.mode;
202         }
203         public void setMode(String mode) {
204                 this.mode = mode;
205         }
206         @Override
207     public String toString() {
208                 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
209                                 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
210                                 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
211                                 + ", modelCustomizationUuid=" + this.modelCustomizationUuid
212                                 + ", mode=" + mode;
213         }
214 }