Merge "Factor common code"
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / translator / crud / INeutronSecurityGroupCRUD.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.ovsdb.openstack.netvirt.translator.crud;
10
11 import java.util.List;
12
13 import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronSecurityGroup;
14
15 /**
16  * This interface defines the methods for CRUD of NB OpenStack Security Group objects
17  */
18
19 public interface INeutronSecurityGroupCRUD {
20     /**
21      * Applications call this interface method to determine if a particular
22      * Security Group object exists
23      *
24      * @param uuid UUID of the Security Group object
25      * @return boolean
26      */
27
28     boolean neutronSecurityGroupExists(String uuid);
29
30     /**
31      * Applications call this interface method to return if a particular
32      * Security Group object exists
33      *
34      * @param uuid UUID of the Security Group object
35      * @return {@link org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronSecurityGroup}
36      * OpenStack Security Group class
37      */
38
39     NeutronSecurityGroup getNeutronSecurityGroup(String uuid);
40
41     /**
42      * Applications call this interface method to return all Security Group objects
43      *
44      * @return List of OpenStackSecurity Groups objects
45      */
46
47     List<NeutronSecurityGroup> getAllNeutronSecurityGroups();
48
49     /**
50      * Applications call this interface method to add a Security Group object to the
51      * concurrent map
52      *
53      * @param input OpenStackSecurity Group object
54      * @return boolean on whether the object was added or not
55      */
56
57     boolean addNeutronSecurityGroup(NeutronSecurityGroup input);
58
59     /**
60      * Applications call this interface method to remove a Neutron Security Group object to the
61      * concurrent map
62      *
63      * @param uuid identifier for the security group object
64      * @return boolean on whether the object was removed or not
65      */
66
67     boolean removeNeutronSecurityGroup(String uuid);
68
69     /**
70      * Applications call this interface method to edit a Security Group object
71      *
72      * @param uuid  identifier of the security group object
73      * @param delta OpenStackSecurity Group object containing changes to apply
74      * @return boolean on whether the object was updated or not
75      */
76
77     boolean updateNeutronSecurityGroup(String uuid, NeutronSecurityGroup delta);
78
79     /**
80      * Applications call this interface method to see if a MAC address is in use
81      *
82      * @param uuid identifier of the security group object
83      * @return boolean on whether the Security Groups is already in use
84      */
85
86     boolean neutronSecurityGroupInUse(String uuid);
87
88 }