Merge "Factor common code"
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / translator / iaware / INeutronSecurityRuleAware.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.iaware;
10
11 import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronSecurityRule;
12
13 /**
14  * This interface defines the methods required to be aware of Neutron Security Rules
15  */
16
17 public interface INeutronSecurityRuleAware {
18
19     /**
20      * Services provide this interface method to indicate if the specified security rule can be created
21      *
22      * @param securityRule instance of proposed new Neutron Security Rule object
23      * @return integer
24      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
25      * results in the create operation being interrupted and the returned status value reflected in the
26      * HTTP response.
27      */
28     int canCreateNeutronSecurityRule(NeutronSecurityRule securityRule);
29
30     /**
31      * Services provide this interface method for taking action after a security rule has been created
32      *
33      * @param securityRule instance of new Neutron Security Rule object
34      */
35     void neutronSecurityRuleCreated(NeutronSecurityRule securityRule);
36
37     /**
38      * Services provide this interface method to indicate if the specified security rule can be changed using the specified
39      * delta
40      *
41      * @param delta    updates to the security rule object using patch semantics
42      * @param original instance of the Neutron Security Rule object to be updated
43      * @return integer
44      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
45      * results in the update operation being interrupted and the returned status value reflected in the
46      * HTTP response.
47      */
48     int canUpdateNeutronSecurityRule(NeutronSecurityRule delta, NeutronSecurityRule original);
49
50     /**
51      * Services provide this interface method for taking action after a security rule has been updated
52      *
53      * @param securityRule instance of modified Neutron Security Rule object
54      */
55     void neutronSecurityRuleUpdated(NeutronSecurityRule securityRule);
56
57     /**
58      * Services provide this interface method to indicate if the specified security rule can be deleted
59      *
60      * @param securityRule instance of the Neutron Security Rule object to be deleted
61      * @return integer
62      * the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
63      * results in the delete operation being interrupted and the returned status value reflected in the
64      * HTTP response.
65      */
66     int canDeleteNeutronSecurityRule(NeutronSecurityRule securityRule);
67
68     /**
69      * Services provide this interface method for taking action after a security rule has been deleted
70      *
71      * @param securityRule instance of deleted Neutron Security Rule object
72      */
73     void neutronSecurityRuleDeleted(NeutronSecurityRule securityRule);
74 }