2 * Copyright (C) 2014 Red Hat, Inc. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.neutron.spi;
11 import java.util.List;
14 * This interface defines the methods for CRUD of NB OpenStack Security Group objects
17 public interface INeutronSecurityGroupCRUD {
19 * Applications call this interface method to determine if a particular
20 * Security Group object exists
22 * @param uuid UUID of the Security Group object
26 boolean neutronSecurityGroupExists(String uuid);
29 * Applications call this interface method to return if a particular
30 * Security Group object exists
32 * @param uuid UUID of the Security Group object
33 * @return {@link org.opendaylight.neutron.spi.NeutronSecurityGroup}
34 * OpenStack Security Group class
37 NeutronSecurityGroup getNeutronSecurityGroup(String uuid);
40 * Applications call this interface method to return all Security Group objects
42 * @return List of OpenStackSecurity Groups objects
45 List<NeutronSecurityGroup> getAllNeutronSecurityGroups();
48 * Applications call this interface method to add a Security Group object to the
51 * @param input OpenStackSecurity Group object
52 * @return boolean on whether the object was added or not
55 boolean addNeutronSecurityGroup(NeutronSecurityGroup input);
58 * Applications call this interface method to remove a Neutron Security Group object to the
61 * @param uuid identifier for the security group object
62 * @return boolean on whether the object was removed or not
65 boolean removeNeutronSecurityGroup(String uuid);
68 * Applications call this interface method to edit a Security Group object
70 * @param uuid identifier of the security group object
71 * @param delta OpenStackSecurity Group object containing changes to apply
72 * @return boolean on whether the object was updated or not
75 boolean updateNeutronSecurityGroup(String uuid, NeutronSecurityGroup delta);
78 * Applications call this interface method to see if a MAC address is in use
80 * @param uuid identifier of the security group object
81 * @return boolean on whether the Security Groups is already in use
84 boolean neutronSecurityGroupInUse(String uuid);