Merge branch 'topic/master/neutron-yang-migration' to branch 'master'
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / translator / iaware / INeutronRouterAware.java
1 /*
2  * Copyright (c) 2013, 2015 IBM Corporation 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.NeutronRouter;
12 import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronRouter_Interface;
13
14 /**
15  * This interface defines the methods a service that wishes to be aware of Neutron Routers needs to implement
16  *
17  */
18
19 public interface INeutronRouterAware {
20
21     /**
22      * Services provide this interface method to indicate if the specified router can be created
23      *
24      * @param router
25      *            instance of proposed new Neutron Router object
26      * @return integer
27      *            the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
28      *            results in the create operation being interrupted and the returned status value reflected in the
29      *            HTTP response.
30      */
31     int canCreateRouter(NeutronRouter router);
32
33     /**
34      * Services provide this interface method for taking action after a router has been created
35      *
36      * @param router
37      *            instance of new Neutron Router object
38      */
39     void neutronRouterCreated(NeutronRouter router);
40
41     /**
42      * Services provide this interface method to indicate if the specified router can be changed using the specified
43      * delta
44      *
45      * @param delta
46      *            updates to the router object using patch semantics
47      * @param original
48      *            instance of the Neutron Router object to be updated
49      * @return integer
50      *            the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
51      *            results in the update operation being interrupted and the returned status value reflected in the
52      *            HTTP response.
53      */
54     int canUpdateRouter(NeutronRouter delta, NeutronRouter original);
55
56     /**
57      * Services provide this interface method for taking action after a router has been updated
58      *
59      * @param router
60      *            instance of modified Neutron Router object
61      */
62     void neutronRouterUpdated(NeutronRouter router);
63
64     /**
65      * Services provide this interface method to indicate if the specified router can be deleted
66      *
67      * @param router
68      *            instance of the Neutron Router object to be deleted
69      * @return integer
70      *            the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
71      *            results in the delete operation being interrupted and the returned status value reflected in the
72      *            HTTP response.
73      */
74     int canDeleteRouter(NeutronRouter router);
75
76     /**
77      * Services provide this interface method for taking action after a router has been deleted
78      *
79      * @param router
80      *            instance of deleted Router Network object
81      */
82     void neutronRouterDeleted(NeutronRouter router);
83
84     /**
85      * Services provide this interface method to indicate if the
86      * specified interface can be attached to the specified router
87      *
88      * @param router
89      *            instance of the base Neutron Router object
90      * @param routerInterface
91      *            instance of the NeutronRouter_Interface to be attached to the router
92      * @return integer
93      *            the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
94      *            results in the attach operation being interrupted and the returned status value reflected in the
95      *            HTTP response.
96      */
97     int canAttachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface);
98
99     /**
100      * Services provide this interface method for taking action
101      * after an interface has been added to a router
102      *
103      * @param router
104      *            instance of the base Neutron Router object
105      * @param routerInterface
106      *            instance of the NeutronRouter_Interface being attached to the router
107      */
108     void neutronRouterInterfaceAttached(NeutronRouter router, NeutronRouter_Interface routerInterface);
109
110     /**
111      * Services provide this interface method to indicate if the
112      * specified interface can be detached from the specified router
113      *
114      * @param router
115      *            instance of the base Neutron Router object
116      * @param routerInterface
117      *            instance of the NeutronRouter_Interface to be detached to the router
118      * @return integer
119      *            the return value is understood to be a HTTP status code.  A return value outside of 200 through 299
120      *            results in the detach operation being interrupted and the returned status value reflected in the
121      *            HTTP response.
122      */
123     int canDetachInterface(NeutronRouter router, NeutronRouter_Interface routerInterface);
124
125     /**
126      * Services provide this interface method for taking action after an interface has been removed from a router
127      *
128      * @param router
129      *            instance of the base Neutron Router object
130      * @param routerInterface
131      *            instance of the NeutronRouter_Interface being detached from the router
132      */
133     void neutronRouterInterfaceDetached(NeutronRouter router, NeutronRouter_Interface routerInterface);
134 }