--- /dev/null
+/*\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.NeutronPort;\r
+\r
+@XmlRootElement\r
+@XmlAccessorType(XmlAccessType.NONE)\r
+public class NeutronPortRequest {\r
+ // See OpenStack Network API v2.0 Reference for description of\r
+ // annotated attributes\r
+\r
+ @XmlElement(name="port")\r
+ NeutronPort singletonPort;\r
+\r
+ @XmlElement(name="ports")\r
+ List<NeutronPort> bulkRequest;\r
+\r
+ NeutronPortRequest() {\r
+ }\r
+\r
+ NeutronPortRequest(List<NeutronPort> bulk) {\r
+ bulkRequest = bulk;\r
+ singletonPort = null;\r
+ }\r
+\r
+ NeutronPortRequest(NeutronPort port) {\r
+ singletonPort = port;\r
+ }\r
+\r
+ public NeutronPort getSingleton() {\r
+ return singletonPort;\r
+ }\r
+\r
+ public boolean isSingleton() {\r
+ return (singletonPort != null);\r
+ }\r
+\r
+ public List<NeutronPort> getBulk() {\r
+ return bulkRequest;\r
+ }\r
+}\r