2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.openstack.beans;
25 import java.io.Serializable;
26 import java.util.List;
28 import javax.xml.bind.annotation.XmlTransient;
30 public class Subnet implements Serializable {
35 private static final long serialVersionUID = -530027355187604839L;
37 private String subnetName;
39 private String neutronId;
41 private String subnetId; // value from aai
43 private String cidr; //Only field required
45 private String gatewayIp;
47 private String ipVersion="4";
49 private Boolean enableDHCP=false;
51 private Boolean addrFromStart=true;
53 private List<HostRoute> hostRoutes;
55 private List<Pool> allocationPools;
57 private List<String> dnsNameServers;
62 public String getSubnetName() {
66 public void setSubnetName(String subnetName) {
67 this.subnetName = subnetName;
70 public List<Pool> getAllocationPools() {
71 return allocationPools;
77 public String getCidr() {
82 * @return the dnsNames
84 public List<String> getDnsNameServers() {
85 return dnsNameServers;
89 public Boolean getEnableDHCP() {
93 public Boolean getAddrFromStart() {
97 public void setAddrFromStart(Boolean addrFromStart) {
98 this.addrFromStart = addrFromStart;
104 public String getGatewayIp() {
109 * @return the hostRoutes
111 public List<HostRoute> getHostRoutes() {
116 * @return the NeutronId
119 public String getNeutronId() {
124 * @return the ipversion
126 public String getIpVersion() {
133 public String getSubnetId() {
137 public void setAllocationPools(List<Pool> allocationPools) {
138 this.allocationPools = allocationPools;
145 public void setCidr(String cidr) {
151 * the dnsNames to set
153 public void setDnsNameServers(List<String> dnsNameServers) {
154 this.dnsNameServers = dnsNameServers;
159 * the enableDHCP to set
161 public void setEnableDHCP(Boolean enableDHCP) {
162 this.enableDHCP = enableDHCP;
169 public void setGatewayIp(String gatewayIp) {
170 this.gatewayIp = gatewayIp;
175 * the hostRoutes to set
177 public void setHostRoutes(List<HostRoute> hostRoutes) {
178 this.hostRoutes = hostRoutes;
185 public void setNeutronId(String neutronId) {
186 this.neutronId = neutronId;
191 * the ipversion to set
193 public void setIpVersion(String ipVersion) {
194 this.ipVersion = ipVersion;
201 public void setSubnetId(String subnetId) {
202 this.subnetId = subnetId;
206 public String toString() {
207 return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId + ", subnetId=" + subnetId + ", cidr="
208 + cidr + ", gatewayIp=" + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP=" + enableDHCP
209 + ", addrFromStart=" + addrFromStart + ", hostRoutes=" + hostRoutes + ", allocationPools="
210 + allocationPools + ", dnsNameServers=" + dnsNameServers + "]";