Initial OpenECOMP MSO commit
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / openstack / beans / NetworkRollback.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
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 boolean networkCreated = false;
47         // Previous values for updates
48         private String networkName = null;
49         private String physicalNetwork = null;
50         private List<Integer> vlans = null;
51         private MsoRequest msoRequest;
52
53         public String getNetworkId() {
54                 return networkId;
55         }
56         public void setNetworkId(String networkId) {
57                 this.networkId = networkId;
58         }
59
60         public String getNeutronNetworkId() {
61                 return neutronNetworkId;
62         }
63         public void setNeutronNetworkId(String neutronNetworkId) {
64                 this.neutronNetworkId = neutronNetworkId;
65         }
66         
67         public String getNetworkStackId() {
68                 return networkStackId;
69         }
70         public void setNetworkStackId(String networkStackId) {
71                 this.networkStackId = networkStackId;
72         }
73         public String getTenantId() {
74                 return tenantId;
75         }
76         public void setTenantId(String tenantId) {
77                 this.tenantId = tenantId;
78         }
79
80         public String getCloudId() {
81                 return cloudId;
82         }
83         public void setCloudId(String cloudId) {
84                 this.cloudId = cloudId;
85         }
86
87         public String getNetworkType() {
88                 return networkType;
89         }
90         public void setNetworkType(String networkType) {
91                 this.networkType = networkType;
92         }
93
94         public boolean getNetworkCreated() {
95                 return networkCreated;
96         }
97         public void setNetworkCreated(boolean networkCreated) {
98                 this.networkCreated = networkCreated;
99         }
100
101         public String getNetworkName() {
102                 return networkName;
103         }
104         public void setNetworkName(String networkName) {
105                 this.networkName = networkName;
106         }
107
108         public String getPhysicalNetwork() {
109                 return physicalNetwork;
110         }
111         public void setPhysicalNetwork(String physicalNetwork) {
112                 this.physicalNetwork = physicalNetwork;
113         }
114
115         public List<Integer> getVlans () {
116                 return vlans;
117         }
118         public void setVlans (List<Integer> vlans) {
119                 this.vlans = vlans;
120         }
121
122         public MsoRequest getMsoRequest() {
123                 return msoRequest;
124         }
125         public void setMsoRequest (MsoRequest msoRequest) {
126                 this.msoRequest = msoRequest;
127         }
128         
129         @Override
130         public String toString() {
131                 return "NetworkRollback [networkId=" + networkId
132                                 + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
133                                 + networkStackId + ", tenantId=" + tenantId + ", cloudId="
134                                 + cloudId + ", networkType=" + networkType
135                                 + ", networkCreated=" + networkCreated + ", networkName=" + networkName
136                                 + ", physicalNetwork=" + physicalNetwork + "]";
137         }
138     
139 }