e95c564f271718128d1a715974f72347ff63efa7
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / NetworkRollback.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
24 import java.io.Serializable;
25 import java.util.List;
26
27 import org.onap.so.entity.MsoRequest;
28
29 import com.fasterxml.jackson.annotation.JsonInclude;
30 import com.fasterxml.jackson.annotation.JsonInclude.Include;
31
32 /**
33  * Javabean representing the rollback criteria following a "Create Network"
34  * or "Update Network" operation.  This structure can be passed back to the
35  * "Rollback Network" operation to undo the effects of the create/update.
36  *
37  * Once a network is created, the only possible update through MSO is to
38  * the set of VLANs supported by the network.  The vlans attribute of the
39  * rollback object contains the previous VLANs before update.
40  *
41  *
42  */
43 @JsonInclude(Include.NON_EMPTY)
44 public class NetworkRollback implements Serializable{
45         /**
46          * 
47          */
48         private static final long serialVersionUID = 11949663223019185L;
49         private String networkId;
50         private String neutronNetworkId;
51         private String networkStackId;
52         private String tenantId;
53         private String cloudId;
54         private String networkType;
55         private String modelCustomizationUuid;
56         private boolean networkCreated = false;
57         // Previous values for updates
58         private String networkName = null;
59         private String physicalNetwork = null;
60         private List<Integer> vlans = null;
61         private MsoRequest msoRequest;
62
63         public String getNetworkId() {
64                 return networkId;
65         }
66         public void setNetworkId(String networkId) {
67                 this.networkId = networkId;
68         }
69
70         public String getNeutronNetworkId() {
71                 return neutronNetworkId;
72         }
73         public void setNeutronNetworkId(String neutronNetworkId) {
74                 this.neutronNetworkId = neutronNetworkId;
75         }
76
77         public String getNetworkStackId() {
78                 return networkStackId;
79         }
80         public void setNetworkStackId(String networkStackId) {
81                 this.networkStackId = networkStackId;
82         }
83         public String getTenantId() {
84                 return tenantId;
85         }
86         public void setTenantId(String tenantId) {
87                 this.tenantId = tenantId;
88         }
89
90         public String getCloudId() {
91                 return cloudId;
92         }
93         public void setCloudId(String cloudId) {
94                 this.cloudId = cloudId;
95         }
96
97         public String getNetworkType() {
98                 return networkType;
99         }
100         public void setNetworkType(String networkType) {
101                 this.networkType = networkType;
102         }
103
104         public String getModelCustomizationUuid() {
105                 return this.modelCustomizationUuid;
106         }
107
108         public void setModelCustomizationUuid(String modelCustomizationUuid) {
109                 this.modelCustomizationUuid = modelCustomizationUuid;
110         }
111
112         public boolean getNetworkCreated() {
113                 return networkCreated;
114         }
115         public void setNetworkCreated(boolean networkCreated) {
116                 this.networkCreated = networkCreated;
117         }
118
119         public String getNetworkName() {
120                 return networkName;
121         }
122         public void setNetworkName(String networkName) {
123                 this.networkName = networkName;
124         }
125
126         public String getPhysicalNetwork() {
127                 return physicalNetwork;
128         }
129         public void setPhysicalNetwork(String physicalNetwork) {
130                 this.physicalNetwork = physicalNetwork;
131         }
132
133         public List<Integer> getVlans () {
134                 return vlans;
135         }
136         public void setVlans (List<Integer> vlans) {
137                 this.vlans = vlans;
138         }
139
140         public MsoRequest getMsoRequest() {
141                 return msoRequest;
142         }
143         public void setMsoRequest (MsoRequest msoRequest) {
144                 this.msoRequest = msoRequest;
145         }
146
147         @Override
148         public String toString() {
149                 return "NetworkRollback [networkId=" + networkId
150                                 + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
151                                 + networkStackId + ", tenantId=" + tenantId + ", cloudId="
152                                 + cloudId + ", networkType=" + networkType
153                                 + ", networkCreated=" + networkCreated + ", networkName=" + networkName
154                                 + ", physicalNetwork=" + physicalNetwork + "]";
155         }
156
157 }