Moved OF10Provider and OF13Provider to its own Package to accomodate the upcoming...
[ovsdb.git] / openstack / net-virt-providers / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / providers / PipelineOrchestrator.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.providers;
12
13 import java.util.UUID;
14
15 /**
16  * A PipelineOrchestrator provides the necessary orchestration logic to allow multiple network services
17  * to share a common OpenFlow 1.3 based multi-table pipeline.
18  */
19 public interface PipelineOrchestrator {
20
21   enum ServiceDirection {
22     UNDEFINED,
23     INGRESS,
24     EGRESS
25   }
26
27   static final Integer PRE_NAT = 2;
28   static final Integer PRE_ACL = 7;
29   //ToDo: Add some sensible altitude constants
30
31   /**
32    * Register a new service in the pipeline
33    * @param altitude an integer representing the desired placement in the pipeline where 0 = lowest.
34    * @param direction whether the service is ingress, egress
35    * @return a unique service identifier
36    */
37   UUID registerService(Integer altitude, ServiceDirection direction);
38
39   /**
40    * Unregister a service from the pipeline
41    * This clears any assigned table IDs and registers
42    */
43   void unregisterService(UUID serviceID);
44
45   /**
46    * Get the OpenFlow Table ID
47    * @param serviceID unique service identifier
48    */
49   Integer getTableId(UUID serviceID);
50
51   /**
52    * Assign an OVS Register to a service
53    * @return the integer value of the assigned register
54    */
55   Integer assignRegister(UUID serviceID);
56
57 }