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%2FNeutronNetworkRequest.java;h=2001fb758af68801ef5f17d26cb13264438087df;hp=9d449380a5743548bdfb39a240655ada7fd8a59b;hb=e97ddfe57becc2916a7b325e6dfc42fe4057affa;hpb=e40d69673c2529d99069a8a0bafb152a1c11c41a diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworkRequest.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworkRequest.java index 9d449380a5..2001fb758a 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworkRequest.java +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronNetworkRequest.java @@ -1,55 +1,65 @@ -/* - * 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.NeutronNetwork; - -@XmlRootElement -@XmlAccessorType(XmlAccessType.NONE) -public class NeutronNetworkRequest { - // See OpenStack Network API v2.0 Reference for description of - // annotated attributes - - @XmlElement(name="network") - NeutronNetwork singletonNetwork; - - @XmlElement(name="networks") - List bulkRequest; - - NeutronNetworkRequest() { - } - - NeutronNetworkRequest(List bulk) { - bulkRequest = bulk; - singletonNetwork = null; - } - - NeutronNetworkRequest(NeutronNetwork net) { - singletonNetwork = net; - } - - public NeutronNetwork getSingleton() { - return singletonNetwork; - } - - public boolean isSingleton() { - return (singletonNetwork != null); - } - - public List getBulk() { - return bulkRequest; - } -} +/* + * 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.NeutronNetwork; + +@XmlRootElement +@XmlAccessorType(XmlAccessType.NONE) +public class NeutronNetworkRequest implements INeutronRequest { + // See OpenStack Network API v2.0 Reference for description of + // annotated attributes + + @XmlElement(name="network") + NeutronNetwork singletonNetwork; + + @XmlElement(name="networks") + List bulkRequest; + + @XmlElement(name="networks_links") + List links; + + NeutronNetworkRequest() { + } + + NeutronNetworkRequest(List bulkRequest, List links) { + this.bulkRequest = bulkRequest; + this.links = links; + this.singletonNetwork = null; + } + + NeutronNetworkRequest(List bulk) { + bulkRequest = bulk; + singletonNetwork = null; + } + + NeutronNetworkRequest(NeutronNetwork net) { + singletonNetwork = net; + } + + @Override + public NeutronNetwork getSingleton() { + return singletonNetwork; + } + + @Override + public boolean isSingleton() { + return (singletonNetwork != null); + } + + @Override + public List getBulk() { + return bulkRequest; + } +}