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.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
16 * This cache stores the VLAN assignments used for tenant separation within a vSwitch
17 * An assignment consists of a VLAN ID and a tenant network ID.
19 public interface VlanConfigurationCache {
22 * Assigns a free VLAN ID for the given tenant network
23 * @param node an Open vSwitch {@link Node}
24 * @param networkId the Neutron Network ID
25 * @return a VLAN ID or 0 in case of an error
27 public Integer assignInternalVlan (Node node, String networkId);
30 * Recovers an assigned VLAN ID when it is no longer required
31 * @param node an Open vSwitch {@link Node}
32 * @param networkId the Neutron Network ID
33 * @return the reclaimed VLAN ID or 0 in case of an error
35 public Integer reclaimInternalVlan (Node node, String networkId);
38 * Returns a VLAN ID assigned to a given tenant network
39 * @param node an Open vSwitch {@link Node}
40 * @param networkId the Neutron Network ID
41 * @return the VLAN ID or 0 in case of an error
43 public Integer getInternalVlan (Node node, String networkId);