6110fa50739e00f16ddbbade6c58ebafa1ab6e34
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / NetworkInfo.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
25 import java.util.ArrayList;
26 import java.util.List;
27
28 /*
29  * This Java bean class relays Network details (including status) to ActiveVOS processes.
30  *
31  * This bean is returned by all Network-specific adapter operations (create, query, delete)
32  */
33
34 public class NetworkInfo {
35         // Set defaults for everything
36         private String name = "";
37         private String id = "";
38         private NetworkStatus status = NetworkStatus.UNKNOWN;
39         private String provider = "";
40         private List<Integer> vlans = new ArrayList<>();
41         private List<String> subnets = new ArrayList<>();
42         private String shared = "";
43
44         public NetworkInfo () {
45         }
46
47         public NetworkInfo (String name, NetworkStatus status) {
48                 this.name = name;
49                 this.id = name; // Don't have an ID, so just use name
50                 this.status = status;
51         }
52
53         public String getName() {
54                 return name;
55         }
56
57         public void setName (String name) {
58                 this.name = name;
59         }
60
61         public String getId() {
62                 return id;
63         }
64
65         public void setId (String id) {
66                 this.id = id;
67         }
68
69         public NetworkStatus getStatus() {
70                 return status;
71         }
72
73         public void setStatus (NetworkStatus status) {
74                 this.status = status;
75         }
76
77         public String getProvider() {
78                 return provider;
79         }
80
81         public void setProvider (String provider) {
82                 this.provider = provider;
83         }
84
85         public List<Integer> getVlans () {
86                 return vlans;
87         }
88
89         public void setVlans (List<Integer> vlans) {
90                 this.vlans = vlans;
91         }
92
93         public List<String> getSubnets () {
94                 return subnets;
95         }
96
97         public void setSubnets (List<String> subnets) {
98                 this.subnets = subnets;
99         }
100
101         public String getShared() {
102                 return shared;
103         }
104
105         public void setShared(String shared) {
106                 this.shared = shared;
107         }
108
109         @Override
110         public String toString() {
111                 return "NetworkInfo{" + "name='" + name + '\'' +
112                         ", id='" + id + '\'' +
113                         ", status=" + status +
114                         ", provider='" + provider + '\'' +
115                         ", vlans=" + vlans +
116                         ", subnets=" + subnets +
117                         '}';
118         }
119 }
120