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
8 * Authors : Dave Tucker
11 package org.opendaylight.ovsdb.openstack.netvirt.api;
13 import java.util.List;
14 import org.opendaylight.neutron.spi.NeutronNetwork;
15 import org.opendaylight.neutron.spi.NeutronPort;
16 import org.opendaylight.ovsdb.schema.openvswitch.Interface;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.ovsdb.port._interface.attributes.InterfaceExternalIds;
19 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
22 * Open vSwitch isolates Tenant Networks using VLANs on the Integration Bridge
23 * This class manages the provisioning of these VLANs
25 public interface TenantNetworkManager {
28 * Get the VLAN assigned to the provided Network
29 * @param node the {Node} to query
30 * @param networkId the Neutron Network ID
31 * @return the assigned VLAN ID or 0 in case of an error
33 public int getInternalVlan(Node node, String networkId);
36 * Reclaim the assigned VLAN for the given Network
37 * @param node the {Node} to query
38 * @param network the Neutron Network ID
40 public void reclaimInternalVlan(Node node, NeutronNetwork network);
43 * Configures the VLAN for a Tenant Network
44 * @param node the {Node} to configure
45 * @param tp the termination point
46 * @param network the Neutron Network ID
48 public void programInternalVlan(Node node, OvsdbTerminationPointAugmentation tp, NeutronNetwork network);
51 * Check is the given network is present on a Node
52 * @param node the {Node} to query
53 * @param segmentationId the Neutron Segementation ID
54 * @return True or False
56 public boolean isTenantNetworkPresentInNode(Node node, String segmentationId);
59 * Get the Neutron Network ID for a given Segmentation ID
61 public String getNetworkId (String segmentationId);
64 * Network Created Callback
66 public int networkCreated (Node node, String networkId);
69 * Network Deleted Callback
71 public void networkDeleted(String id);
73 NeutronNetwork getTenantNetwork(OvsdbTerminationPointAugmentation terminationPointAugmentation);
74 public NeutronPort getTenantPort(OvsdbTerminationPointAugmentation terminationPointAugmentation);