Merge "Explictly cleanup all the bridges managed by the node"
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / NetworkingProvider.java
1 /*
2  * Copyright (c) 2014, 2015 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.api;
10
11 import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronNetwork;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
13 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
14 import org.osgi.framework.ServiceReference;
15
16 /**
17  * The NetworkingProvider interface is implemented by Neutron Networking Providers
18  */
19 public interface NetworkingProvider {
20
21     /**
22      * @return the name of the NetworkingProvider
23      */
24     String getName();
25
26     /**
27      * @return true if the provider supports Network Service Instances
28      */
29     boolean supportsServices();
30
31     /**
32      * @return true if the provider supports per-tenant or "static" tunneling
33      */
34     boolean hasPerTenantTunneling();
35
36     /**
37      * Handle Interface Update Callback Method
38      * @param network Neutron Network attached to the interface
39      * @param source Source node where interface is attached
40      * @param intf Termination point attached to the node
41      * @return true if interface update handled successfully
42      */
43     boolean handleInterfaceUpdate(NeutronNetwork network, Node source, OvsdbTerminationPointAugmentation intf);
44
45     /**
46      * Handle Interface Delete Callback Method
47      * @param tunnelType Type of the tunnel (e.g. vxlan)
48      * @param network Neutron Network associated with the removed interface
49      * @param source Source node where interface was attached
50      * @param intf Termination point associated to the deleted interface
51      * @param isLastInstanceOnNode is last interface attached to the node ?
52      * @return true if interface delete handled successfully
53      */
54     boolean handleInterfaceDelete(String tunnelType, NeutronNetwork network, Node source,
55                                   OvsdbTerminationPointAugmentation intf, boolean isLastInstanceOnNode);
56
57     /**
58      * Initialize the Flow rules given the OVSDB node.
59      * This method provides a set of common functionalities to initialize the Flow rules of an OVSDB node
60      * that are Openflow Version specific. Hence we have this method in addition to the following
61      * Openflow Node specific initialization method.
62      * @param node Node on which flow rules are going to be installed
63      */
64     void initializeFlowRules(Node node);
65
66     /**
67      * Initialize the Flow rules for a given OpenFlow node
68      * @param openflowNode Node on which flow rules are going to be installed
69      */
70     void initializeOFFlowRules(Node openflowNode);
71 }