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%2FNeutronLoadBalancerRequest.java;fp=opendaylight%2Fnorthbound%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronLoadBalancerRequest.java;h=1cf4e7016dc63692335a39f8e1beb64aa4e4108c;hp=0000000000000000000000000000000000000000;hb=6bdfe303cd11f54a9e4a8e2d64b81ed5f5d0d257;hpb=75ab6ca68d3af902bb48fdbd01df03214ff20454 diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerRequest.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerRequest.java new file mode 100644 index 0000000000..1cf4e7016d --- /dev/null +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerRequest.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2014 Red Hat, Inc. + * + * 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 org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancer; + +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 java.util.List; + + +@XmlRootElement +@XmlAccessorType(XmlAccessType.NONE) + +public class NeutronLoadBalancerRequest { + /** + * See OpenStack Network API v2.0 Reference for description of + * http://docs.openstack.org/api/openstack-network/2.0/content/ + */ + + @XmlElement(name="loadbalancer") + NeutronLoadBalancer singletonLoadBalancer; + + @XmlElement(name="loadbalancers") + List bulkRequest; + + NeutronLoadBalancerRequest() { + } + + NeutronLoadBalancerRequest(List bulk) { + bulkRequest = bulk; + singletonLoadBalancer = null; + } + + NeutronLoadBalancerRequest(NeutronLoadBalancer group) { + singletonLoadBalancer = group; + } + + public List getBulk() { + return bulkRequest; + } + + public NeutronLoadBalancer getSingleton() { + return singletonLoadBalancer; + } + + public boolean isSingleton() { + return (singletonLoadBalancer != null); + } +} \ No newline at end of file