X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fnorthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronFirewallRequest.java;fp=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fnorthbound%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronFirewallRequest.java;h=11a7836b225a8ac10ce58816342ed1cf0c787221;hp=0000000000000000000000000000000000000000;hb=42c32160bfd41de57189bb246fec5ffb48ed8e9e;hpb=edf5bfcee83c750853253ccfd991ba7000f5f65b diff --git a/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFirewallRequest.java b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFirewallRequest.java new file mode 100644 index 0000000000..11a7836b22 --- /dev/null +++ b/opendaylight/networkconfiguration/neutron/northbound/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronFirewallRequest.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.NeutronFirewall; + +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 NeutronFirewallRequest { + /** + * See OpenStack Network API v2.0 Reference for description of + * http://docs.openstack.org/api/openstack-network/2.0/content/ + */ + + @XmlElement(name="firewall") + NeutronFirewall singletonFirewall; + + @XmlElement(name="firewalls") + List bulkRequest; + + NeutronFirewallRequest() { + } + + NeutronFirewallRequest(List bulk) { + bulkRequest = bulk; + singletonFirewall = null; + } + + NeutronFirewallRequest(NeutronFirewall group) { + singletonFirewall = group; + } + + public List getBulk() { + return bulkRequest; + } + + public NeutronFirewall getSingleton() { + return singletonFirewall; + } + + public boolean isSingleton() { + return (singletonFirewall != null); + } +} \ No newline at end of file