X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnorthbound%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronSecurityRuleRequest.java;fp=opendaylight%2Fnorthbound%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2Fnorthbound%2FNeutronSecurityRuleRequest.java;h=b805bd63bc065f3f43e0ec7d2898a12d1d944267;hb=e21c4dbc23761ee73360dabbd196428167388c05;hp=0000000000000000000000000000000000000000;hpb=a31a4448ea6665317f4af41ae26d804829418c04;p=controller.git diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityRuleRequest.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityRuleRequest.java new file mode 100644 index 0000000000..b805bd63bc --- /dev/null +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronSecurityRuleRequest.java @@ -0,0 +1,59 @@ +/* + * 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.NeutronSecurityRule; + +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 NeutronSecurityRuleRequest { + /** + * See OpenStack Network API v2.0 Reference for a + * description of annotated attributes and operations + */ + + @XmlElement(name="security_group_rule") + NeutronSecurityRule singletonSecurityRule; + + @XmlElement(name="security_group_rules") + List bulkRequest; + + NeutronSecurityRuleRequest() { + } + + NeutronSecurityRuleRequest(List bulk) { + bulkRequest = bulk; + singletonSecurityRule = null; + } + + NeutronSecurityRuleRequest(NeutronSecurityRule rule) { + singletonSecurityRule = rule; + } + + public NeutronSecurityRule getSingleton() { + return singletonSecurityRule; + } + + public boolean isSingleton() { + return (singletonSecurityRule != null); + } + public List getBulk() { + return bulkRequest; + } + +} \ No newline at end of file