2 * Copyright (C) 2014 Red Hat, Inc.
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
9 package org.opendaylight.ovsdb.openstack.netvirt.api;
11 import org.opendaylight.neutron.spi.NeutronNetwork;
12 import org.opendaylight.neutron.spi.NeutronPort;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
14 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
17 * Open vSwitch isolates Tenant Networks using VLANs on the Integration Bridge
18 * This class manages the provisioning of these VLANs
21 * @author Sam Hague (shague@redhat.com)
23 public interface TenantNetworkManager {
26 * Get the VLAN assigned to the provided Network
27 * @param node the {@link Node} to query
28 * @param networkId the Neutron Network ID
29 * @return the assigned VLAN ID or 0 in case of an error
31 public int getInternalVlan(Node node, String networkId);
34 * Reclaim the assigned VLAN for the given Network
35 * @param node the {@link Node} to query
36 * @param network the Neutron Network ID
38 public void reclaimInternalVlan(Node node, NeutronNetwork network);
41 * Configures the VLAN for a Tenant Network
42 * @param node the {@link Node} to configure
43 * @param tp the termination point
44 * @param network the Neutron Network ID
46 public void programInternalVlan(Node node, OvsdbTerminationPointAugmentation tp, NeutronNetwork network);
49 * Check is the given network is present on a Node
50 * @param node the {@link Node} to query
51 * @param segmentationId the Neutron Segementation ID
52 * @return True or False
54 public boolean isTenantNetworkPresentInNode(Node node, String segmentationId);
57 * Get the Neutron Network ID for a given Segmentation ID
59 public String getNetworkId (String segmentationId);
62 * Network Created Callback
64 public int networkCreated (Node node, String networkId);
67 * Network Deleted Callback
69 public void networkDeleted(String id);
70 NeutronNetwork getTenantNetwork(OvsdbTerminationPointAugmentation terminationPointAugmentation);
71 public NeutronPort getTenantPort(OvsdbTerminationPointAugmentation terminationPointAugmentation);