X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronSubnetRequest.java;h=57a724c1cc60936b3a15ed80ba0c1b9bc6d53288;hp=ab91399879e97ebc97fc0b44dbf318e0eb2c6784;hb=c1362c86eb19e92e6c64d10099a45deb499c6db1;hpb=e40d69673c2529d99069a8a0bafb152a1c11c41a diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetRequest.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetRequest.java index ab91399879..57a724c1cc 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetRequest.java +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSubnetRequest.java @@ -1,56 +1,68 @@ -/* - * Copyright IBM Corporation, 2013. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ - -package org.opendaylight.controller.networkconfig.neutron.northbound; - -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - -import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) - -public class NeutronSubnetRequest { - // See OpenStack Network API v2.0 Reference for description of - // annotated attributes - - @XmlElement(name="subnet") - NeutronSubnet singletonSubnet; - - @XmlElement(name="subnets") - List bulkRequest; - - NeutronSubnetRequest() { - } - - NeutronSubnetRequest(List bulk) { - bulkRequest = bulk; - singletonSubnet = null; - } - - NeutronSubnetRequest(NeutronSubnet subnet) { - singletonSubnet = subnet; - } - - public NeutronSubnet getSingleton() { - return singletonSubnet; - } - - public List getBulk() { - return bulkRequest; - } - - public boolean isSingleton() { - return (singletonSubnet != null); - } -} +/* + * Copyright IBM Corporation, 2013. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.controller.networkconfig.neutron.northbound; + +import java.util.List; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import org.opendaylight.controller.networkconfig.neutron.NeutronSubnet; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.NONE) + +public class NeutronSubnetRequest implements INeutronRequest { + // See OpenStack Network API v2.0 Reference for description of + // annotated attributes + + @XmlElement(name="subnet") + NeutronSubnet singletonSubnet; + + @XmlElement(name="subnets") + List bulkRequest; + + @XmlElement(name="subnets_links") + List links; + + NeutronSubnetRequest() { + } + + public NeutronSubnetRequest(List bulkRequest, List links) { + this.bulkRequest = bulkRequest; + this.links = links; + this.singletonSubnet = null; + } + + NeutronSubnetRequest(List bulk) { + bulkRequest = bulk; + singletonSubnet = null; + links = null; + } + + NeutronSubnetRequest(NeutronSubnet subnet) { + singletonSubnet = subnet; + bulkRequest = null; + links = null; + } + + public NeutronSubnet getSingleton() { + return singletonSubnet; + } + + public List getBulk() { + return bulkRequest; + } + + public boolean isSingleton() { + return (singletonSubnet != null); + } +}