summaryrefslogtreecommitdiffstats
path: root/quantum-model/src/main/java/com/woorea/openstack/quantum
diff options
context:
space:
mode:
authorChrisC <cc697w@intl.att.com>2017-01-31 13:57:24 +0100
committerChrisC <cc697w@intl.att.com>2017-01-31 14:55:11 +0100
commit2e984294ac28c6f2ede290c38164c5d536ccaf4a (patch)
tree5eba5a929b7a961c98749fa69e03cfea58e1a724 /quantum-model/src/main/java/com/woorea/openstack/quantum
parent86c0f28c8ed469486b64d6422dc53e3a7bcc8adb (diff)
Initial OpenECOMP MSO OpenStack SDK lib commit
Change-Id: Ieaacb2b2c0dcc469669880e73f0cda9fa59a6c5a Signed-off-by: ChrisC <cc697w@intl.att.com>
Diffstat (limited to 'quantum-model/src/main/java/com/woorea/openstack/quantum')
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java24
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/HostRoute.java27
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java321
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java9
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java38
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/NeutronError.java69
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Pool.java40
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java373
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java12
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java40
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java77
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java28
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java75
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java19
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java38
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Segment.java79
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java264
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java34
-rw-r--r--quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java36
19 files changed, 1603 insertions, 0 deletions
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java
new file mode 100644
index 0000000..2a7766f
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java
@@ -0,0 +1,24 @@
+package com.woorea.openstack.quantum.model;
+
+import java.util.List;
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class GatewayInfo implements Serializable {
+
+ @JsonProperty("network_id")
+ private String networkId;
+
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ public void setNetworkId(String id) {
+ this.networkId = id;
+ }
+
+ @Override public String toString() {
+ return "[networkId=" + networkId + "]";
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/HostRoute.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/HostRoute.java
new file mode 100644
index 0000000..979add3
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/HostRoute.java
@@ -0,0 +1,27 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+public class HostRoute implements Serializable {
+
+ private String destination;
+ private String nexthop;
+
+ public String getDestination() {
+ return destination;
+ }
+ public void setDestination(String destination) {
+ this.destination = destination;
+ }
+
+ public String getNexthop() {
+ return nexthop;
+ }
+ public void setNexthop(String nexthop) {
+ this.nexthop = nexthop;
+ }
+
+ @Override public String toString() {
+ return "[destination=" + destination + ", nexthop=" + nexthop + "]";
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java
new file mode 100644
index 0000000..f880619
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java
@@ -0,0 +1,321 @@
+package com.woorea.openstack.quantum.model;
+
+/*
+ * Modifications copyright (c) 2017 AT&T Intellectual Property
+ */
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+/**
+ * Network Extension supporting both Provider networks and Multi-Provider networks.
+ * The attributes for both of these network extensions are included.
+ * It is the responsibility of users to populate only one or the other. It is
+ * also critical that the Mapper is set for serialization inclusion.NON_NULL, or
+ * both would be sent to Openstack which would cause an error.
+ *
+ */
+@SuppressWarnings("serial")
+@JsonRootName("network")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Network implements Serializable {
+
+ private String status;
+
+ private List<String> subnets;
+
+ private String name;
+
+ @JsonProperty("admin_state_up")
+ private Boolean adminStateUp;
+
+ @JsonProperty("tenant_id")
+ private String tenantId;
+
+ @JsonProperty("provider:physical_network")
+ private String providerPhysicalNetwork;
+
+ @JsonProperty("provider:network_type")
+ private String providerNetworkType;
+
+ @JsonProperty("provider:segmentation_id")
+ private Integer providerSegmentationId;
+
+ @JsonProperty("router:external")
+ private String routerExternal;
+
+ private String id;
+
+ private String shared;
+
+ private List<Segment> segments;
+
+ /**
+ * @return the status
+ */
+ @JsonIgnore
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * @param status
+ * the status to set
+ */
+ @JsonProperty
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ /**
+ * @return the subnets
+ */
+ @JsonIgnore
+ public List<String> getSubnets() {
+ return subnets;
+ }
+
+ /**
+ * @param subnets
+ * the subnets to set
+ */
+ @JsonProperty
+ public void setSubnets(List<String> subnets) {
+ this.subnets = subnets;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the providerPhyNet
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public String getProviderPhyNet() {
+ return getProviderPhysicalNetwork();
+ }
+
+ /**
+ * @param providerPhyNet
+ * the providerPhyNet to set
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public void setProviderPhyNet(String providerPhyNet) {
+ setProviderPhysicalNetwork(providerPhyNet);
+ }
+
+ /**
+ * @return the adminStateUp
+ */
+ @JsonIgnore
+ public boolean isAdminStateUp() {
+ return adminStateUp;
+ }
+
+ public Boolean getAdminStateUp() {
+ return adminStateUp;
+ }
+
+ /**
+ * @param adminStateUp
+ * the adminStateUp to set
+ */
+ public void setAdminStateUp(Boolean adminStateUp) {
+ this.adminStateUp = adminStateUp;
+ }
+
+ /**
+ * @return the tenantId
+ */
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ /**
+ * @param tenantId
+ * the tenantId to set
+ */
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ /**
+ * @return the netType
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public String getNetType() {
+ return getProviderNetworkType();
+ }
+
+ /**
+ * @param netType
+ * the netType to set
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public void setNetType(String netType) {
+ setProviderNetworkType(netType);
+ }
+
+ /**
+ * @return the routerExternal
+ */
+ public String getRouterExternal() {
+ return routerExternal;
+ }
+
+ /**
+ * @param routerExternal
+ * the routerExternal to set
+ */
+ public void setRouterExternal(String routerExternal) {
+ this.routerExternal = routerExternal;
+ }
+
+ /**
+ * @return the id
+ */
+ @JsonIgnore
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * the id to set
+ */
+ @JsonProperty
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the shared
+ */
+ public String getShared() {
+ return shared;
+ }
+
+ /**
+ * @param shared
+ * the shared to set
+ */
+ public void setShared(String shared) {
+ this.shared = shared;
+ }
+
+ /**
+ * @return the providerSegID
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public String getProviderSegID() {
+ return getProviderSegmentationId() == null ? null : Integer.toString(getProviderSegmentationId());
+ }
+
+ /**
+ * @param providerSegID
+ * the providerSegID to set
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public void setProviderSegID(String providerSegID) {
+ setProviderSegmentationId(providerSegID == null ? null : Integer.parseInt(providerSegID));
+ }
+
+ public String getProviderNetworkType() {
+ return providerNetworkType;
+ }
+
+ public void setProviderNetworkType(String providerNetworkType) {
+ this.providerNetworkType = providerNetworkType;
+ }
+
+ public String getProviderPhysicalNetwork() {
+ return providerPhysicalNetwork;
+ }
+
+ public void setProviderPhysicalNetwork(String providerPhysicalNetwork) {
+ this.providerPhysicalNetwork = providerPhysicalNetwork;
+ }
+
+ public Integer getProviderSegmentationId() {
+ return providerSegmentationId;
+ }
+
+ public void setProviderSegmentationId(Integer providerSegmentationId) {
+ this.providerSegmentationId = providerSegmentationId;
+ }
+
+ public List<Segment> getSegments() {
+ return segments;
+ }
+
+ public void setSegments(List<Segment> segments) {
+ this.segments = segments;
+ }
+
+ /**
+ * Function to detect and return the network type
+ */
+ public enum NetworkType { BASIC, PROVIDER, MULTI_PROVIDER };
+
+ @JsonIgnore
+ public NetworkType getNetworkType () {
+ if (segments != null)
+ return NetworkType.MULTI_PROVIDER;
+ else if (providerNetworkType != null)
+ return NetworkType.PROVIDER;
+ else
+ return NetworkType.BASIC;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuffer buf = new StringBuffer("Network [id=" + id + ", name=" + name + ", subnets="
+ + subnets + ", status=" + status + ", admin_state_up=" + adminStateUp + ", tenant_id=" +
+ tenantId + ", shared=" + shared + ", router:external=" + routerExternal);
+ if (getNetworkType() == NetworkType.PROVIDER)
+ buf.append (", provider:physical_network=" + providerPhysicalNetwork +
+ ", provider:network_type=" + providerNetworkType +
+ ", provider:segmentation_id=" + providerSegmentationId);
+ if (getNetworkType() == NetworkType.MULTI_PROVIDER) {
+ buf.append (", segments: ");
+ for (Segment s : segments)
+ buf.append (s.toString()).append(" ");
+ }
+ buf.append ("]");
+ return buf.toString();
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java
new file mode 100644
index 0000000..507e39b
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java
@@ -0,0 +1,9 @@
+package com.woorea.openstack.quantum.model;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@SuppressWarnings("serial")
+@JsonRootName("network")
+@Deprecated
+public class NetworkForCreate extends Network {
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java
new file mode 100644
index 0000000..a4fd330
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java
@@ -0,0 +1,38 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Networks implements Iterable<Network>, Serializable{
+
+ @JsonProperty("networks")
+ private List<Network> list;
+
+ /**
+ * @return the list
+ */
+ public List<Network> getList() {
+ return list;
+ }
+
+
+ /**
+ * @param list the list to set
+ */
+ public void setList(List<Network> list) {
+ this.list = list;
+ }
+
+
+ public String toString() {
+ return "Networks [list=" + list + "]";
+ }
+
+
+ public Iterator<Network> iterator() {
+ return list.iterator();
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NeutronError.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NeutronError.java
new file mode 100644
index 0000000..3fbd390
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NeutronError.java
@@ -0,0 +1,69 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright © 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============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
+
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("NeutronError")
+public class NeutronError implements Serializable {
+
+ private String type;
+
+ private String message;
+
+ private String detail;
+
+ /**
+ * @return the code
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * @return the message
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * @return the title
+ */
+ public String getDetail() {
+ return detail;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "NeutronError [type=" + type + ", title=" + detail + ", message="
+ + message + "]";
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Pool.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Pool.java
new file mode 100644
index 0000000..d25bafe
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Pool.java
@@ -0,0 +1,40 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+public class Pool implements Serializable{
+
+ private String start;
+ private String end;
+
+ /**
+ * @return the start
+ */
+ public String getStart() {
+ return start;
+ }
+ /**
+ * @param start the start to set
+ */
+ public void setStart(String start) {
+ this.start = start;
+ }
+ /**
+ * @return the end
+ */
+ public String getEnd() {
+ return end;
+ }
+ /**
+ * @param end the end to set
+ */
+ public void setEnd(String end) {
+ this.end = end;
+ }
+
+ @Override
+ public String toString() {
+ return "Allocation_pool [start=" + start + ", end=" + end + "]";
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java
new file mode 100644
index 0000000..8ca74f1
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java
@@ -0,0 +1,373 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.annotate.JsonUnwrapped;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@SuppressWarnings("serial")
+@JsonRootName("port")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Port implements Serializable {
+
+ public static final class Ip implements Serializable {
+
+ @JsonProperty("ip_address")
+ private String address;
+
+ @JsonProperty("subnet_id")
+ private String subnetId;
+
+ /**
+ * @return the address
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * @param address
+ * the address to set
+ */
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ /**
+ * @return the subnetId
+ */
+ public String getSubnetId() {
+ return subnetId;
+ }
+
+ /**
+ * @param subnetId
+ * the subnetId to set
+ */
+ public void setSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ }
+
+ @Override
+ public String toString() {
+ return "ip_addresses [ip_address=" + address + ", subnet_id=" + subnetId + "]";
+ }
+
+ }
+
+ public static final class Binding {
+
+ /**
+ * The host on which the port will be allocated.
+ */
+ @JsonProperty("binding:host_id")
+ private String hostId;
+
+ /**
+ * The vif type for the specific port.
+ */
+ @JsonProperty("binding:vif_type")
+ private String vifType;
+
+ /**
+ * The type of vnic that this port should be attached to
+ */
+ @JsonProperty("binding:vnic_type")
+ private String vnicType;
+
+ /**
+ * A map containing additional information needed by the interface driver
+ */
+ @JsonProperty("binding:vif_details")
+ private Map<String, String> vifDetails;
+
+ /**
+ * A map to enable applications running on the specific host to pass and receive vif port specific information
+ * to the plugin.
+ */
+ @JsonProperty("binding:profile")
+ private Map<String, String> profile;
+
+ public String getHostId() {
+ return hostId;
+ }
+
+ public void setHostId(String hostId) {
+ this.hostId = hostId;
+ }
+
+ public String getVifType() {
+ return vifType;
+ }
+
+ public void setVifType(String vifType) {
+ this.vifType = vifType;
+ }
+
+ public String getVnicType() {
+ return vnicType;
+ }
+
+ public void setVnicType(String vnicType) {
+ this.vnicType = vnicType;
+ }
+
+ public Map<String, String> getVifDetails() {
+ return vifDetails;
+ }
+
+ public void setVifDetails(Map<String, String> vifDetails) {
+ this.vifDetails = vifDetails;
+ }
+
+ public Map<String, String> getProfile() {
+ return profile;
+ }
+
+ public void setProfile(Map<String, String> profile) {
+ this.profile = profile;
+ }
+
+ @Override
+ public String toString() {
+ return "Binding [hostId=" + hostId
+ + ", vifType=" + vifType +
+ ", vnicType=" + vnicType +
+ ", vifDetails=" + vifDetails +
+ ", profile=" + profile + "]";
+ }
+ }
+
+ @JsonProperty("admin_state_up")
+ private Boolean adminStateUp;
+
+ @JsonProperty("device_id")
+ private String deviceId;
+
+ @JsonProperty("device_owner")
+ private String deviceOwner;
+
+ @JsonProperty("fixed_ips")
+ private List<Ip> list;
+
+ private String id;
+
+ @JsonProperty("mac_address")
+ private String macAddress;
+
+ private String name;
+
+ @JsonProperty("network_id")
+ private String networkId;
+
+ private String status;
+
+ @JsonProperty("tenant_id")
+ private String tenantId;
+
+ @JsonProperty("security_groups")
+ private List<String> securityGroups;
+
+ @JsonUnwrapped
+ private Binding binding;
+
+ /**
+ * @return the adminStateUp
+ */
+ public Boolean getAdminStateUp() {
+ return adminStateUp;
+ }
+
+ /**
+ * @param adminStateUp
+ * the adminStateUp to set
+ */
+ public void setAdminStateUp(Boolean adminStateUp) {
+ this.adminStateUp = adminStateUp;
+ }
+
+ /**
+ * @return the deviceId
+ */
+ public String getDeviceId() {
+ return deviceId;
+ }
+
+ /**
+ * @param deviceId
+ * the deviceId to set
+ */
+ public void setDeviceId(String deviceId) {
+ this.deviceId = deviceId;
+ }
+
+ /**
+ * @return the deviceOwner
+ */
+ public String getDeviceOwner() {
+ return deviceOwner;
+ }
+
+ /**
+ * @param deviceOwner
+ * the deviceOwner to set
+ */
+ public void setDeviceOwner(String deviceOwner) {
+ this.deviceOwner = deviceOwner;
+ }
+
+ /**
+ * @return the list
+ */
+ public List<Ip> getList() {
+ return list;
+ }
+
+ /**
+ * @param list
+ * the list to set
+ */
+ public void setList(List<Ip> list) {
+ this.list = list;
+ }
+
+ /**
+ * @return the id
+ */
+ @JsonIgnore
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * the id to set
+ */
+ @JsonProperty
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /**
+ * @return the macAddress
+ */
+ public String getMacAddress() {
+ return macAddress;
+ }
+
+ /**
+ * @param macAddress
+ * the macAddress to set
+ */
+ public void setMacAddress(String macAddress) {
+ this.macAddress = macAddress;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the networkId
+ */
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ /**
+ * @param networkId
+ * the networkId to set
+ */
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ /**
+ * @return the status
+ */
+ @JsonIgnore
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * @param status
+ * the status to set
+ */
+ @JsonProperty
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ /**
+ * @return the tenantId
+ */
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ /**
+ * @param tenantId
+ * the tenantId to set
+ */
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ /**
+ * @return the associated security group IDs
+ */
+ public List<String> getSecurityGroups() {
+ return securityGroups;
+ }
+
+ /**
+ * @param securityGroups
+ * IDs of security groups to associate to the port
+ */
+ public void setSecurityGroups(List<String> securityGroups) {
+ this.securityGroups = securityGroups;
+ }
+
+ /**
+ * @return the binding of the port
+ */
+ public Binding getBinding() {
+ return binding;
+ }
+
+ /**
+ * @param binding
+ * The port bindings by which the port is bind to network on host
+ */
+ public void setBinding(Binding binding) {
+ this.binding = binding;
+ }
+
+ @Override
+ public String toString() {
+ return "Port [id=" + id + ", name=" + name + ", mac_address="
+ + macAddress + ", admin_state_up=" + adminStateUp + ", device_id=" + deviceId
+ + ", device_owner=" + deviceOwner + ", fixed_ips=" + list
+ + ", network_id=" + networkId + ", status=" + status
+ + ", tenant_id=" + tenantId
+ + ", securityGroups=" + securityGroups
+ + ", binding=" + binding + "]";
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java
new file mode 100644
index 0000000..3c1af50
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java
@@ -0,0 +1,12 @@
+package com.woorea.openstack.quantum.model;
+
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+/**
+ * @deprecated Please use {@link Port} directly.
+ */
+@SuppressWarnings("serial")
+@JsonRootName("port")
+@Deprecated
+public class PortForCreate extends Port {
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java
new file mode 100644
index 0000000..5f10d35
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java
@@ -0,0 +1,40 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+@SuppressWarnings("serial")
+public class Ports implements Iterable<Port>, Serializable {
+
+ @JsonProperty("ports")
+ private List<Port> list;
+
+ /**
+ * @return the list
+ */
+ public List<Port> getList() {
+ return list;
+ }
+
+ /**
+ * @param list
+ * the list to set
+ */
+ public void setList(List<Port> list) {
+ this.list = list;
+ }
+
+ @Override
+ public Iterator<Port> iterator() {
+ return list.iterator();
+ }
+
+ @Override
+ public String toString() {
+ return "Ports [list=" + list + "]";
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java
new file mode 100644
index 0000000..a94afd5
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java
@@ -0,0 +1,77 @@
+package com.woorea.openstack.quantum.model;
+
+import java.util.List;
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("router")
+public class Router implements Serializable {
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonProperty("external_gateway_info")
+ private GatewayInfo externalGatewayInfo;
+
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("admin_state_up")
+ private String admin_state_up;
+
+ @JsonProperty("tenant_id")
+ private String tenantId;
+
+ @JsonProperty("id")
+ private String id;
+
+ @JsonProperty("routes")
+ private List<HostRoute> routes;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public List<HostRoute> getRoutes() {
+ return routes;
+ }
+ public void setRoutes(List<HostRoute> routes) {
+ this.routes = routes;
+ }
+ public String getAdmin_state_up() {
+ return admin_state_up;
+ }
+ public void setAdmin_state_up(String admin_state_up) {
+ this.admin_state_up = admin_state_up;
+ }
+ public String getStatus() {
+ return status;
+ }
+ public void setStatus(String status) {
+ this.status = status;
+ }
+ public GatewayInfo getExternalGatewayInfo() {
+ return externalGatewayInfo;
+ }
+ public void setExternalGatewayInfo(GatewayInfo externalGatewayInfo) {
+ this.externalGatewayInfo = externalGatewayInfo;
+ }
+ public String getTenantId() {
+ return tenantId;
+ }
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java
new file mode 100644
index 0000000..62ec302
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java
@@ -0,0 +1,28 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class RouterForAddInterface implements Serializable {
+
+ @JsonProperty("subnet_id")
+ String subnetId;
+ String routerId;
+
+ public String getSubnetId() {
+ return subnetId;
+ }
+
+ public void setSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ }
+
+ public String getRouterId() {
+ return routerId;
+ }
+
+ public void setRouterId(String routerId) {
+ this.routerId = routerId;
+ }
+ }
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java
new file mode 100644
index 0000000..b8c9291
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java
@@ -0,0 +1,75 @@
+package com.woorea.openstack.quantum.model;
+
+import java.util.List;
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@JsonRootName("router")
+public class RouterForCreate implements Serializable {
+
+ @JsonProperty("name")
+ private String name;
+
+ private List<HostRoute> routes;
+
+ @JsonProperty("admin_state_up")
+ private String admin_state_up;
+
+ @JsonProperty("status")
+ private String status;
+
+ @JsonProperty("external_gateway_info")
+ private GatewayInfo externalGatewayInfo;
+
+ @JsonProperty("tenant_id")
+ private String tenantId;
+
+ @JsonProperty("id")
+ private String id;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public List<HostRoute> getRoutes() {
+ return routes;
+ }
+ public void setRoutes(List<HostRoute> routes) {
+ this.routes = routes;
+ }
+ public String getAdmin_state_up() {
+ return admin_state_up;
+ }
+ public void setAdmin_state_up(String admin_state_up) {
+ this.admin_state_up = admin_state_up;
+ }
+ public String getStatus() {
+ return status;
+ }
+ public void setStatus(String status) {
+ this.status = status;
+ }
+ public GatewayInfo getExternalGatewayInfo() {
+ return externalGatewayInfo;
+ }
+ public void setExternalGatewayInfo(GatewayInfo externalGatewayInfo) {
+ this.externalGatewayInfo = externalGatewayInfo;
+ }
+ public String getTenantId() {
+ return tenantId;
+ }
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java
new file mode 100644
index 0000000..2d7551f
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java
@@ -0,0 +1,19 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+public class RouterInterface implements Serializable {
+
+ @JsonProperty("subnet_id")
+ String subnetId;
+ @JsonProperty("port_id")
+ String portId;
+ @JsonProperty("tenant_id")
+ String tenantId;
+ @JsonProperty("id")
+ String id;
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java
new file mode 100644
index 0000000..e2a56b2
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java
@@ -0,0 +1,38 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Routers implements Iterable<Router>, Serializable{
+
+ @JsonProperty("routers")
+ private List<Router> list;
+
+ /**
+ * @return the list
+ */
+ public List<Router> getList() {
+ return list;
+ }
+
+
+ /**
+ * @param list the list to set
+ */
+ public void setList(List<Router> list) {
+ this.list = list;
+ }
+
+
+ public String toString() {
+ return "Routers [list=" + list + "]";
+ }
+
+
+ public Iterator<Router> iterator() {
+ return list.iterator();
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Segment.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Segment.java
new file mode 100644
index 0000000..de78967
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Segment.java
@@ -0,0 +1,79 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright © 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============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
+
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+@SuppressWarnings("serial")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Segment implements Serializable {
+
+ @JsonProperty("provider:physical_network")
+ private String providerPhysicalNetwork;
+
+ @JsonProperty("provider:network_type")
+ private String providerNetworkType;
+
+ @JsonProperty("provider:segmentation_id")
+ private Integer providerSegmentationId;
+
+ public String getProviderNetworkType() {
+ return providerNetworkType;
+ }
+
+ public void setProviderNetworkType(String providerNetworkType) {
+ this.providerNetworkType = providerNetworkType;
+ }
+
+ public String getProviderPhysicalNetwork() {
+ return providerPhysicalNetwork;
+ }
+
+ public void setProviderPhysicalNetwork(String providerPhysicalNetwork) {
+ this.providerPhysicalNetwork = providerPhysicalNetwork;
+ }
+
+ public Integer getProviderSegmentationId() {
+ return providerSegmentationId;
+ }
+
+ public void setProviderSegmentationId(Integer providerSegmentationId) {
+ this.providerSegmentationId = providerSegmentationId;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "Segment [ provider:physical_network=" + providerPhysicalNetwork +
+ ", provider:network_type=" + providerNetworkType +
+ ", provider:segmentation_id=" + providerSegmentationId + "]";
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java
new file mode 100644
index 0000000..7301514
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java
@@ -0,0 +1,264 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonCreator;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+import org.codehaus.jackson.annotate.JsonValue;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+@SuppressWarnings("serial")
+@JsonRootName("subnet")
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class Subnet implements Serializable {
+
+ private String name;
+
+ @JsonProperty("enable_dhcp")
+ private Boolean enableDHCP;
+
+ @JsonProperty("network_id")
+ private String networkId;
+
+ @JsonProperty("tenant_id")
+ private String tenantId;
+
+ @JsonProperty("dns_nameservers")
+ private List<String> dnsNames;
+
+ @JsonProperty("allocation_pools")
+ private List<Pool> list;
+
+ @JsonProperty("host_routes")
+ private List<String> hostRoutes;
+
+ @JsonProperty("ip_version")
+ private IpVersion ipversion;
+
+ @JsonProperty("gateway_ip")
+ private String gw;
+
+ private String cidr;
+
+ private String id;
+
+ public static enum IpVersion implements Serializable {
+ IPV4(4),
+ IPV6(6);
+ private int code;
+
+ IpVersion(int code) {
+ this.code = code;
+ }
+
+ @JsonValue
+ public int code() {
+ return code;
+ }
+
+ @JsonCreator
+ public static IpVersion valueOf(int value) {
+ for (IpVersion ipVersion : IpVersion.values()) {
+ if (ipVersion.code() == value) {
+ return ipVersion;
+ }
+ }
+ return IPV4;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(code);
+ }
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name
+ * the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the enableDHCP
+ */
+ @JsonIgnore
+ public boolean isEnableDHCP() {
+ return enableDHCP;
+ }
+
+ public Boolean getEnableDHCP() {
+ return enableDHCP;
+ }
+
+ /**
+ * @param enableDHCP
+ * the enableDHCP to set
+ */
+ public void setEnableDHCP(Boolean enableDHCP) {
+ this.enableDHCP = enableDHCP;
+ }
+
+ /**
+ * @return the networkId
+ */
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ /**
+ * @param networkId
+ * the networkId to set
+ */
+ public void setNetworkId(String networkId) {
+ this.networkId = networkId;
+ }
+
+ /**
+ * @return the tenantId
+ */
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ /**
+ * @param tenantId
+ * the tenantId to set
+ */
+ public void setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ }
+
+ /**
+ * @return the dnsNames
+ */
+ public List<String> getDnsNames() {
+ return dnsNames;
+ }
+
+ /**
+ * @param dnsNames
+ * the dnsNames to set
+ */
+ public void setDnsNames(List<String> dnsNames) {
+ this.dnsNames = dnsNames;
+ }
+
+ /**
+ * @return the list
+ */
+ public List<Pool> getList() {
+ return list;
+ }
+
+ /**
+ * @param list
+ * the list to set
+ */
+ public void setList(List<Pool> list) {
+ this.list = list;
+ }
+
+ /**
+ * @return the hostRoutes
+ */
+ public List<String> getHostRoutes() {
+ return hostRoutes;
+ }
+
+ /**
+ * @param hostRoutes
+ * the hostRoutes to set
+ */
+ public void setHostRoutes(List<String> hostRoutes) {
+ this.hostRoutes = hostRoutes;
+ }
+
+ /**
+ * @return the ipversion
+ */
+ public IpVersion getIpversion() {
+ return ipversion;
+ }
+
+ /**
+ * @param ipversion
+ * the ipversion to set
+ */
+ public void setIpversion(IpVersion ipversion) {
+ this.ipversion = ipversion;
+ }
+
+ /**
+ * @return the gw
+ */
+ public String getGw() {
+ return gw;
+ }
+
+ /**
+ * @param gw
+ * the gw to set
+ */
+ public void setGw(String gw) {
+ this.gw = gw;
+ }
+
+ /**
+ * @return the cidr
+ */
+ public String getCidr() {
+ return cidr;
+ }
+
+ /**
+ * @param cidr
+ * the cidr to set
+ */
+ public void setCidr(String cidr) {
+ this.cidr = cidr;
+ }
+
+ /**
+ * @return the id
+ */
+ @JsonIgnore
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @param id
+ * the id to set
+ */
+ @JsonProperty
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "Subnet [id=" + id + ", name=" + name + ", network_id="
+ + networkId + ", tenant_id=" + tenantId + ", allocation_pools=" + list
+ + ", gateway_ip=" + gw + ", ip_version=" + ipversion
+ + ", cidr=" + cidr + ", enable_dhcp=" + enableDHCP + ", dns_nameservers="
+ + dnsNames + ", host_routes=" + hostRoutes + "]";
+ }
+
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java
new file mode 100644
index 0000000..2c07ab2
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java
@@ -0,0 +1,34 @@
+package com.woorea.openstack.quantum.model;
+
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.map.annotate.JsonRootName;
+
+/**
+ * Please use {@link Subnet} directly.
+ */
+@SuppressWarnings("serial")
+@JsonRootName("subnet")
+@Deprecated
+public class SubnetForCreate extends Subnet {
+
+ /**
+ * @return the ipVersion
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public int getIpVersion() {
+ return getIpversion().code();
+ }
+
+ /**
+ * @param ipVersion
+ * the ipVersion to set
+ * @deprecated
+ */
+ @Deprecated
+ @JsonIgnore
+ public void setIpVersion(int ipVersion) {
+ setIpversion(IpVersion.valueOf(ipVersion));
+ }
+}
diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java
new file mode 100644
index 0000000..e9b21f4
--- /dev/null
+++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java
@@ -0,0 +1,36 @@
+package com.woorea.openstack.quantum.model;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonProperty;
+
+public class Subnets implements Serializable, Iterable<Subnet> {
+
+ @JsonProperty("subnets")
+ private List<Subnet> list;
+
+ /**
+ * @return the list
+ */
+ public List<Subnet> getList() {
+ return list;
+ }
+
+ /**
+ * @param list the list to set
+ */
+ public void setList(List<Subnet> list) {
+ this.list = list;
+ }
+
+ public String toString() {
+ return "Subnets [list=" + list + "]";
+ }
+
+ public Iterator<Subnet> iterator() {
+ return list.iterator();
+ }
+
+}