Initial push of Neutron interface
[controller.git] / opendaylight / northbound / networkconfiguration / neutron / src / main / java / org / opendaylight / controller / networkconfig / neutron / northbound / NeutronRouterRequest.java
diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronRouterRequest.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronRouterRequest.java
new file mode 100644 (file)
index 0000000..1fcc9a9
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+ * Copyright IBM Corporation, 2013.  All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+\r
+package org.opendaylight.controller.networkconfig.neutron.northbound;\r
+\r
+import java.util.List;\r
+\r
+import javax.xml.bind.annotation.XmlAccessType;\r
+import javax.xml.bind.annotation.XmlAccessorType;\r
+import javax.xml.bind.annotation.XmlElement;\r
+import javax.xml.bind.annotation.XmlRootElement;\r
+\r
+import org.opendaylight.controller.networkconfig.neutron.NeutronRouter;\r
+\r
+\r
+@XmlRootElement\r
+@XmlAccessorType(XmlAccessType.NONE)\r
+\r
+public class NeutronRouterRequest {\r
+    // See OpenStack Network API v2.0 Reference for description of\r
+    // annotated attributes\r
+\r
+    @XmlElement(name="router")\r
+    NeutronRouter singletonRouter;\r
+\r
+    @XmlElement(name="routers")\r
+    List<NeutronRouter> bulkRequest;\r
+\r
+    NeutronRouterRequest() {\r
+    }\r
+\r
+    NeutronRouterRequest(List<NeutronRouter> bulk) {\r
+        bulkRequest = bulk;\r
+        singletonRouter = null;\r
+    }\r
+\r
+    NeutronRouterRequest(NeutronRouter router) {\r
+        singletonRouter = router;\r
+    }\r
+\r
+    public List<NeutronRouter> getBulk() {\r
+        return bulkRequest;\r
+    }\r
+\r
+    public NeutronRouter getSingleton() {\r
+        return singletonRouter;\r
+    }\r
+\r
+    public boolean isSingleton() {\r
+        return (singletonRouter != null);\r
+    }\r
+}\r