--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Dave Tucker, Flavio Fernandes
+ */
+
+package org.opendaylight.ovsdb.openstack.netvirt.api;
+
+import java.net.InetAddress;
+import java.net.InterfaceAddress;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * A Router that is Multi-Tenant Aware
+ * Each tenant has a Unique Identifier which is used to isolate interfaces/routes
+ */
+public interface MultiTenantAwareRouter {
+
+ void addInterface(UUID tenantId, String interfaceName, Set<InterfaceAddress> addresses);
+
+ void addInterface(UUID tenantId, String interfaceName, String macAddress, Set<InterfaceAddress> addresses);
+
+ void updateInterface(UUID tenantId, String interfaceName, Set<InterfaceAddress> addresses);
+
+ void updateInterface(UUID tenantId, String interfaceName, String macAddress, Set<InterfaceAddress> addresses);
+
+ void removeInterface(UUID tenantId, String interfaceName);
+
+ void addRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop);
+
+ void addRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop, Integer priority);
+
+ void removeRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop);
+
+ void removeRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop, Integer priority);
+
+ void addDefaultRoute(UUID tenantId, InetAddress nextHop);
+
+ void addDefaultRoute(UUID tenantId, InetAddress nextHop, Integer priority);
+
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Dave Tucker, Flavio Fernandes
+ */
+
+package org.opendaylight.ovsdb.openstack.netvirt.api;
+
+import java.net.InetAddress;
+import java.net.InterfaceAddress;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * A MultiTenantForwardingProvider provides Multi-Tenant L3 Forwarding
+ */
+public interface MultiTenantRouterForwardingProvider {
+
+ void addStaticArpEntry(UUID tenantId, String macAddress, InetAddress ipAddress);
+
+ void addIpRewriteRule(UUID tenantId, InetAddress matchAddress, InetAddress rewriteAddress);
+
+ void addRouterInterface(UUID tenantId, String macAddress, Set<InterfaceAddress> addresses);
+
+ void addForwardingTableEntry(UUID tenantId, InetAddress ipAddress, String macAddress);
+
+ void addDefaultRouteEntry(UUID tenantId, String macAddress, InetAddress nextHop);
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Dave Tucker, Flavio Fernandes
+ */
+
+package org.opendaylight.ovsdb.openstack.netvirt.api;
+
+import java.net.InetAddress;
+import java.net.InterfaceAddress;
+import java.util.Set;
+
+/**
+ * A Router
+ */
+public interface Router {
+
+ void addInterface(String interfaceName, Set<InterfaceAddress> addresses);
+
+ void addInterface(String interfaceName, String macAddress, Set<InterfaceAddress> addresses);
+
+ void updateInterface(String interfaceName, Set<InterfaceAddress> addresses);
+
+ void updateInterface(String interfaceName, String macAddress, Set<InterfaceAddress> addresses);
+
+ void removeInterface(String interfaceName);
+
+ void addRoute(InterfaceAddress destination, InetAddress nextHop);
+
+ void addRoute(InterfaceAddress destination, InetAddress nextHop, Integer priority);
+
+ void removeRoute(InterfaceAddress destination, InetAddress nextHop);
+
+ void removeRoute(InterfaceAddress destination, InetAddress nextHop, Integer priority);
+
+ void addDefaultRoute(InetAddress nextHop);
+
+ void addDefaultRoute(InetAddress nextHop, Integer priority);
+
+ void addNatRule(InetAddress matchAddress, InetAddress rewriteAddress);
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Authors : Dave Tucker, Flavio Fernandes
+ */
+
+package org.opendaylight.ovsdb.openstack.netvirt.impl;
+
+import org.opendaylight.ovsdb.openstack.netvirt.api.MultiTenantAwareRouter;
+
+import java.net.InetAddress;
+import java.net.InterfaceAddress;
+import java.util.Set;
+import java.util.UUID;
+
+/**
+ * OpenStack router implements the MultiTenantAwareRouter interfaces
+ * It provides routing functionality for multiple tenants in an OpenStack cloud
+ */
+public class OpenstackRouter implements MultiTenantAwareRouter {
+
+
+ @Override
+ public void addInterface(UUID tenantId, String interfaceName, Set<InterfaceAddress> addresses) {
+
+ }
+
+ @Override
+ public void addInterface(UUID tenantId, String interfaceName, String macAddress, Set<InterfaceAddress> addresses) {
+
+ }
+
+ @Override
+ public void updateInterface(UUID tenantId, String interfaceName, Set<InterfaceAddress> addresses) {
+
+ }
+
+ @Override
+ public void updateInterface(UUID tenantId, String interfaceName, String macAddress, Set<InterfaceAddress> addresses) {
+
+ }
+
+ @Override
+ public void removeInterface(UUID tenantId, String interfaceName) {
+
+ }
+
+ @Override
+ public void addRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop) {
+
+ }
+
+ @Override
+ public void addRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop, Integer priority) {
+
+ }
+
+ @Override
+ public void removeRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop) {
+
+ }
+
+ @Override
+ public void removeRoute(UUID tenantId, InterfaceAddress destination, InetAddress nextHop, Integer priority) {
+
+ }
+
+ @Override
+ public void addDefaultRoute(UUID tenantId, InetAddress nextHop) {
+
+ }
+
+ @Override
+ public void addDefaultRoute(UUID tenantId, InetAddress nextHop, Integer priority) {
+
+ }
+}