Merge "Bug 4354 - neutron tenant_id doens't contain '-'(dash)"
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / INeutronSecurityRuleCRUD.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.  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.neutron.spi;
10
11 import java.util.List;
12
13 /**
14  * This interface defines the methods for CRUD of NB OpenStack Security Rule objects
15  */
16
17 public interface INeutronSecurityRuleCRUD
18     extends INeutronCRUD<NeutronSecurityRule> {
19     /**
20      * Applications call this interface method to determine if a particular
21      * Security Rule object exists
22      *
23      * @param uuid UUID of theSecurity Rule object
24      * @return boolean
25      */
26
27     boolean neutronSecurityRuleExists(String uuid);
28
29     /**
30      * Applications call this interface method to return if a particular
31      * Security Rule object exists
32      *
33      * @param uuid UUID of the security rule object
34      * @return {@link org.opendaylight.neutron.spi.NeutronSecurityRule}
35      * OpenStackSecurity Rule class
36      */
37
38     NeutronSecurityRule getNeutronSecurityRule(String uuid);
39
40     /**
41      * Applications call this interface method to return all Security Rule objects
42      *
43      * @return List of OpenStack SecurityRules objects
44      */
45
46     List<NeutronSecurityRule> getAllNeutronSecurityRules();
47
48     /**
49      * Applications call this interface method to add a Security Rule object to the
50      * concurrent map
51      *
52      * @param input OpenStack security rule object
53      * @return boolean on whether the object was added or not
54      */
55
56     boolean addNeutronSecurityRule(NeutronSecurityRule input);
57
58     /**
59      * Applications call this interface method to remove a Neutron Security Rule object to the
60      * concurrent map
61      *
62      * @param uuid identifier for the security rule object
63      * @return boolean on whether the object was removed or not
64      */
65
66     boolean removeNeutronSecurityRule(String uuid);
67
68     /**
69      * Applications call this interface method to edit aSecurity Rule object
70      *
71      * @param uuid  identifier of the security rule object
72      * @param delta OpenStackSecurity Rule object containing changes to apply
73      * @return boolean on whether the object was updated or not
74      */
75
76     boolean updateNeutronSecurityRule(String uuid, NeutronSecurityRule delta);
77
78     /**
79      * Applications call this interface method to see if a MAC address is in use
80      *
81      * @param uuid identifier of the security rule object
82      * @return boolean on whether the macAddress is already associated with a
83      * port or not
84      */
85
86     boolean neutronSecurityRuleInUse(String uuid);
87
88 }