Initial OpenECOMP MSO commit
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / openstack / beans / VnfRollback.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * OPENECOMP - MSO
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
46         public VnfRollback() {}
47         
48         public VnfRollback(String vnfId, String tenantId, String cloudSiteId,
49                         boolean tenantCreated, boolean vnfCreated,
50                         MsoRequest msoRequest,
51                         String volumeGroupName, String volumeGroupId, String requestType) {
52                 super();
53                 this.vnfId = vnfId;
54                 this.tenantId = tenantId;
55                 this.cloudSiteId = cloudSiteId;
56                 this.tenantCreated = tenantCreated;
57                 this.vnfCreated = vnfCreated;
58                 this.msoRequest = msoRequest;
59                 this.volumeGroupName = volumeGroupName;
60                 this.volumeGroupId = volumeGroupId;
61                 this.requestType = requestType;
62         }
63
64         public String getVnfId() {
65                 return vnfId;
66         }
67         public void setVnfId(String vnfId) {
68                 this.vnfId = vnfId;
69         }
70         public String getTenantId() {
71                 return tenantId;
72         }
73
74         public void setTenantId(String tenantId) {
75                 this.tenantId = tenantId;
76         }
77         public String getCloudSiteId() {
78                 return cloudSiteId;
79         }
80         public void setCloudSiteId(String cloudId) {
81                 this.cloudSiteId = cloudId;
82         }
83         public boolean getTenantCreated() {
84                 return tenantCreated;
85         }
86         public void setTenantCreated(boolean tenantCreated) {
87                 this.tenantCreated = tenantCreated;
88         }
89         public boolean getVnfCreated() {
90                 return vnfCreated;
91         }
92         public void setVnfCreated(boolean vnfCreated) {
93                 this.vnfCreated = vnfCreated;
94         }
95         public MsoRequest getMsoRequest() {
96                 return msoRequest;
97         }
98         public void setMsoRequest (MsoRequest msoRequest) {
99                 this.msoRequest = msoRequest;
100         }
101         public String getVolumeGroupName() {
102                 return this.volumeGroupName;
103         }
104         public void setVolumeGroupName(String volumeGroupName) {
105                 this.volumeGroupName = volumeGroupName;
106         }
107         public String getVolumeGroupId() {
108                 return this.volumeGroupId;
109         }
110         public void setVolumeGroupId(String volumeGroupId) {
111                 this.volumeGroupId = volumeGroupId;
112         }
113         public String getRequestType() {
114                 return this.requestType;
115         }
116         public void setRequestType(String requestType) {
117                 this.requestType = requestType;
118         }
119         public String getVolumeGroupHeatStackId() {
120                 return this.volumeGroupHeatStackId;
121         }
122         public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
123                 this.volumeGroupHeatStackId = volumeGroupHeatStackId;
124         }
125         
126         public String getBaseGroupHeatStackId() {
127                 return this.baseGroupHeatStackId;
128         }
129         public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
130                 this.baseGroupHeatStackId = baseGroupHeatStackId;
131         }
132         
133         public boolean isBase() {
134                 return this.isBase;
135         }
136         public void setIsBase(boolean isBase) {
137                 this.isBase = isBase;
138         }
139         public String getVfModuleStackId() {
140                 return this.vfModuleStackId;
141         }
142         public void setVfModuleStackId(String vfModuleStackId) {
143                 this.vfModuleStackId = vfModuleStackId;
144         }
145
146         @Override
147     public String toString() {
148                 return "VnfRollback: cloud=" + cloudSiteId + ", tenant=" + tenantId +
149                                 ", vnf=" + vnfId + ", tenantCreated=" + tenantCreated +
150                                 ", vnfCreated=" + vnfCreated + ", requestType = " + requestType;
151         }
152 }