Refactor OVSDB Neutron Code
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / api / NetworkingProvider.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.
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  *  Authors : Dave Tucker
9  */
10
11 package org.opendaylight.ovsdb.openstack.netvirt.api;
12
13 import org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;
14 import org.opendaylight.controller.sal.core.Node;
15 import org.opendaylight.controller.sal.utils.Status;
16 import org.opendaylight.ovsdb.schema.openvswitch.Interface;
17
18 /**
19  * The NetworkingProvider interface is implemented by Neutron Networking Providers
20  */
21 public interface NetworkingProvider {
22
23     /**
24      * Return true if the provider supports per-tenant or "static" tunneling
25      */
26     public boolean hasPerTenantTunneling();
27
28     /**
29      * Handle Interface Update Callback Method
30      */
31     public Status handleInterfaceUpdate(String tunnelType, String tunnelKey);
32
33     /**
34      * Handle Interface Update Callback Method
35      */
36     public Status handleInterfaceUpdate(NeutronNetwork network, Node source, Interface intf);
37
38     /**
39      * Handle Interface Delete Callback Method
40      */
41     public Status handleInterfaceDelete(String tunnelType, NeutronNetwork network, Node source, Interface intf, boolean isLastInstanceOnNode);
42
43     /**
44      * Initialize the Flow rules given the OVSDB node.
45      * This method provides a set of common functionalities to initialize the Flow rules of an OVSDB node
46      * that are Openflow Version specific. Hence we have this method in addition to the following
47      * Openflow Node specific initialization method.
48      */
49     public void initializeFlowRules(Node node);
50
51     /**
52      * Initialize the Flow rules for a given OpenFlow node
53      */
54     public void initializeOFFlowRules(Node openflowNode);
55
56 }