summaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java200
1 files changed, 200 insertions, 0 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
new file mode 100644
index 0000000000..eb514cd565
--- /dev/null
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/beans/Subnet.java
@@ -0,0 +1,200 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * OPENECOMP - MSO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.openstack.beans;
+
+
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+public class Subnet {
+
+ private String subnetName;
+
+ private String neutronId;
+
+ private String subnetId; // value from aai
+
+ private String cidr; //Only field required
+
+ private String gatewayIp="";
+
+ private String ipVersion="4";
+
+ private Boolean enableDHCP=false;
+
+ private List<String> hostRoutes;
+
+ private List<Pool> allocationPools;
+
+ private List<String> dnsNameServers;
+
+ public Subnet () {
+ }
+
+ public String getSubnetName() {
+ return subnetName;
+ }
+
+ public void setSubnetName(String subnetName) {
+ this.subnetName = subnetName;
+ }
+
+ public List<Pool> getAllocationPools() {
+ return allocationPools;
+ }
+
+ /**
+ * @return the cidr
+ */
+ public String getCidr() {
+ return cidr;
+ }
+
+ /**
+ * @return the dnsNames
+ */
+ public List<String> getDnsNameServers() {
+ return dnsNameServers;
+ }
+
+
+ public Boolean getEnableDHCP() {
+ return enableDHCP;
+ }
+
+ /**
+ * @return the gw
+ */
+ public String getGatewayIp() {
+ return gatewayIp;
+ }
+
+ /**
+ * @return the hostRoutes
+ */
+ public List<String> getHostRoutes() {
+ return hostRoutes;
+ }
+
+ /**
+ * @return the NeutronId
+ */
+ @XmlTransient
+ public String getNeutronId() {
+ return neutronId;
+ }
+
+ /**
+ * @return the ipversion
+ */
+ public String getIpVersion() {
+ return ipVersion;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getSubnetId() {
+ return subnetId;
+ }
+
+ public void setAllocationPools(List<Pool> allocationPools) {
+ this.allocationPools = allocationPools;
+ }
+
+ /**
+ * @param cidr
+ * the cidr to set
+ */
+ public void setCidr(String cidr) {
+ this.cidr = cidr;
+ }
+
+ /**
+ * @param dnsNames
+ * the dnsNames to set
+ */
+ public void setDnsNameServers(List<String> dnsNameServers) {
+ this.dnsNameServers = dnsNameServers;
+ }
+
+ /**
+ * @param enableDHCP
+ * the enableDHCP to set
+ */
+ public void setEnableDHCP(Boolean enableDHCP) {
+ this.enableDHCP = enableDHCP;
+ }
+
+ /**
+ * @param gw
+ * the gw to set
+ */
+ public void setGatewayIp(String gatewayIp) {
+ this.gatewayIp = gatewayIp;
+ }
+
+ /**
+ * @param hostRoutes
+ * the hostRoutes to set
+ */
+ public void setHostRoutes(List<String> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ /**
+ * @param neutronId
+ * the id to set
+ */
+ public void setNeutronId(String neutronId) {
+ this.neutronId = neutronId;
+ }
+
+ /**
+ * @param ipversion
+ * the ipversion to set
+ */
+ public void setIpVersion(String ipVersion) {
+ this.ipVersion = ipVersion;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Subnet [subnetName=" + subnetName + ", neutronId=" + neutronId
+ + ", subnetId=" + subnetId + ", cidr=" + cidr + ", gatewayIp="
+ + gatewayIp + ", ipVersion=" + ipVersion + ", enableDHCP="
+ + enableDHCP + ", hostRoutes=" + hostRoutes
+ + ", allocationPools=" + allocationPools + ", dnsNameServers="
+ + dnsNameServers + "]";
+ }
+
+}