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;
27 import javax.xml.bind.annotation.XmlTransient;
29 public class Subnet implements Serializable {
34 private static final long serialVersionUID = -530027355187604839L;
36 private String subnetName;
38 private String neutronId;
40 private String subnetId; // value from aai
42 private String cidr; // Only field required
44 private String gatewayIp;
46 private String ipVersion = "4";
48 private Boolean enableDHCP = false;
50 private Boolean addrFromStart = true;
52 private List<HostRoute> hostRoutes;
54 private List<Pool> allocationPools;
56 private List<String> dnsNameServers;
58 private Integer subnetSequence;
60 public Integer getSubnetSequence() {
61 return subnetSequence;
64 public void setSubnetSequence(Integer subnetSequence) {
65 this.subnetSequence = subnetSequence;
70 public String getSubnetName() {
74 public void setSubnetName(String subnetName) {
75 this.subnetName = subnetName;
78 public List<Pool> getAllocationPools() {
79 return allocationPools;
85 public String getCidr() {
90 * @return the dnsNames
92 public List<String> getDnsNameServers() {
93 return dnsNameServers;
97 public Boolean getEnableDHCP() {
101 public Boolean getAddrFromStart() {
102 return addrFromStart;
105 public void setAddrFromStart(Boolean addrFromStart) {
106 this.addrFromStart = addrFromStart;
112 public String getGatewayIp() {
117 * @return the hostRoutes
119 public List<HostRoute> getHostRoutes() {
124 * @return the NeutronId
127 public String getNeutronId() {
132 * @return the ipversion
134 public String getIpVersion() {
141 public String getSubnetId() {
145 public void setAllocationPools(List<Pool> allocationPools) {
146 this.allocationPools = allocationPools;
150 * @param cidr the cidr to set
152 public void setCidr(String cidr) {
157 * @param dnsNames the dnsNames to set
159 public void setDnsNameServers(List<String> dnsNameServers) {
160 this.dnsNameServers = dnsNameServers;
164 * @param enableDHCP the enableDHCP to set
166 public void setEnableDHCP(Boolean enableDHCP) {
167 this.enableDHCP = enableDHCP;
171 * @param gw the gw to set
173 public void setGatewayIp(String gatewayIp) {
174 this.gatewayIp = gatewayIp;
178 * @param hostRoutes the hostRoutes to set
180 public void setHostRoutes(List<HostRoute> hostRoutes) {
181 this.hostRoutes = hostRoutes;
185 * @param neutronId the id to set
187 public void setNeutronId(String neutronId) {
188 this.neutronId = neutronId;
192 * @param ipversion the ipversion to set
194 public void setIpVersion(String ipVersion) {
195 this.ipVersion = ipVersion;
199 * @param name the name to set
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 + "]";