eb514cd5652ddf328c206a597f11b085b1952767
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / openstack / beans / Subnet.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
25 import java.util.List;
26
27 import javax.xml.bind.annotation.XmlTransient;
28
29 public class Subnet {
30
31         private String subnetName; 
32         
33         private String neutronId;
34
35         private String subnetId; // value from aai
36
37     private String cidr; //Only field required
38
39     private String gatewayIp="";
40
41     private String ipVersion="4";
42
43     private Boolean enableDHCP=false;
44
45     private List<String> hostRoutes;
46
47     private List<Pool> allocationPools;
48
49     private List<String> dnsNameServers;
50
51     public Subnet () {
52     }
53
54         public String getSubnetName() {
55                 return subnetName;
56         }
57
58         public void setSubnetName(String subnetName) {
59                 this.subnetName = subnetName;
60         }
61
62         public List<Pool> getAllocationPools() {
63                 return allocationPools;
64         }
65
66         /**
67      * @return the cidr
68      */
69     public String getCidr() {
70         return cidr;
71     }
72
73     /**
74      * @return the dnsNames
75      */
76     public List<String> getDnsNameServers() {
77         return dnsNameServers;
78     }
79
80
81     public Boolean getEnableDHCP() {
82         return enableDHCP;
83     }
84
85     /**
86      * @return the gw
87      */
88     public String getGatewayIp() {
89         return gatewayIp;
90     }
91
92     /**
93      * @return the hostRoutes
94      */
95     public List<String> getHostRoutes() {
96         return hostRoutes;
97     }
98
99     /**
100      * @return the NeutronId
101      */
102     @XmlTransient
103     public String getNeutronId() {
104         return neutronId;
105     }
106
107     /**
108      * @return the ipversion
109      */
110     public String getIpVersion() {
111         return ipVersion;
112     }
113
114     /**
115      * @return the name
116      */
117     public String getSubnetId() {
118         return subnetId;
119     }
120
121     public void setAllocationPools(List<Pool> allocationPools) {
122                 this.allocationPools = allocationPools;
123         }
124
125     /**
126      * @param cidr
127      *            the cidr to set
128      */
129     public void setCidr(String cidr) {
130         this.cidr = cidr;
131     }
132
133     /**
134      * @param dnsNames
135      *            the dnsNames to set
136      */
137     public void setDnsNameServers(List<String> dnsNameServers) {
138         this.dnsNameServers = dnsNameServers;
139     }
140
141     /**
142      * @param enableDHCP
143      *            the enableDHCP to set
144      */
145     public void setEnableDHCP(Boolean enableDHCP) {
146         this.enableDHCP = enableDHCP;
147     }
148
149     /**
150      * @param gw
151      *            the gw to set
152      */
153     public void setGatewayIp(String gatewayIp) {
154         this.gatewayIp = gatewayIp;
155     }
156
157     /**
158      * @param hostRoutes
159      *            the hostRoutes to set
160      */
161     public void setHostRoutes(List<String> hostRoutes) {
162         this.hostRoutes = hostRoutes;
163     }
164
165     /**
166      * @param neutronId
167      *            the id to set
168      */
169     public void setNeutronId(String neutronId) {
170         this.neutronId = neutronId;
171     }
172
173     /**
174      * @param ipversion
175      *            the ipversion to set
176      */
177     public void setIpVersion(String ipVersion) {
178         this.ipVersion = ipVersion;
179     }
180
181     /**
182      * @param name
183      *            the name to set
184      */
185     public void setSubnetId(String subnetId) {
186         this.subnetId = subnetId;
187     }
188
189  
190         @Override
191         public String toString() {
192                 return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId
193                                 + ", subnetId=" + subnetId + ", cidr=" + cidr + ", gatewayIp="
194                                 + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP="
195                                 + enableDHCP + ", hostRoutes=" + hostRoutes
196                                 + ", allocationPools=" + allocationPools + ", dnsNameServers="
197                                 + dnsNameServers + "]";
198         }
199
200 }