2 * Copyright IBM Corporation, 2013. All rights reserved.
\r
4 * This program and the accompanying materials are made available under the
\r
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
\r
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
\r
9 package org.opendaylight.controller.networkconfig.neutron.northbound;
\r
11 import java.util.List;
\r
13 import javax.xml.bind.annotation.XmlAccessType;
\r
14 import javax.xml.bind.annotation.XmlAccessorType;
\r
15 import javax.xml.bind.annotation.XmlElement;
\r
16 import javax.xml.bind.annotation.XmlRootElement;
\r
18 import org.opendaylight.controller.networkconfig.neutron.NeutronPort;
\r
21 @XmlAccessorType(XmlAccessType.NONE)
\r
22 public class NeutronPortRequest {
\r
23 // See OpenStack Network API v2.0 Reference for description of
\r
24 // annotated attributes
\r
26 @XmlElement(name="port")
\r
27 NeutronPort singletonPort;
\r
29 @XmlElement(name="ports")
\r
30 List<NeutronPort> bulkRequest;
\r
32 NeutronPortRequest() {
\r
35 NeutronPortRequest(List<NeutronPort> bulk) {
\r
37 singletonPort = null;
\r
40 NeutronPortRequest(NeutronPort port) {
\r
41 singletonPort = port;
\r
44 public NeutronPort getSingleton() {
\r
45 return singletonPort;
\r
48 public boolean isSingleton() {
\r
49 return (singletonPort != null);
\r
52 public List<NeutronPort> getBulk() {
\r