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