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 org.opendaylight.controller.networkconfig.neutron.NeutronNetwork;
14 import org.opendaylight.controller.sal.core.Node;
15 import org.opendaylight.ovsdb.schema.openvswitch.Interface;
18 * Open vSwitch isolates Tenant Networks using VLANs on the Integration Bridge
19 * This class manages the provisioning of these VLANs
21 public interface TenantNetworkManager {
24 * Get the VLAN assigned to the provided Network
25 * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
26 * @param networkId the Neutron Network ID
27 * @return the assigned VLAN ID or 0 in case of an error
29 public int getInternalVlan(Node node, String networkId);
32 * Reclaim the assigned VLAN for the given Network
33 * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
34 * @param portUUID the UUID of the neutron Port
35 * @param network the Neutron Network ID
37 public void reclaimInternalVlan(Node node, String portUUID, NeutronNetwork network);
40 * Configures the VLAN for a Tenant Network
41 * @param node the {@link org.opendaylight.controller.sal.core.Node} to configure
42 * @param portUUID the UUID of the port to configure
43 * @param network the Neutron Network ID
45 public void programInternalVlan(Node node, String portUUID, NeutronNetwork network);
48 * Check is the given network is present on a Node
49 * @param node the {@link org.opendaylight.controller.sal.core.Node} to query
50 * @param segmentationId the Neutron Segementation ID
51 * @return True or False
53 public boolean isTenantNetworkPresentInNode(Node node, String segmentationId);
56 * Get the Neutron Network ID for a given Segmentation ID
58 public String getNetworkId (String segmentationId);
61 * Get the {@link org.opendaylight.controller.networkconfig.neutron.NeutronNetwork} for a given Interface
63 public NeutronNetwork getTenantNetwork(Interface intf);
66 * Network Created Callback
69 public void networkCreated (String networkId);
72 * Network Created Callback
74 public int networkCreated (Node node, String networkId);
77 * Network Deleted Callback
79 public void networkDeleted(String id);