2 * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
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.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
14 * This cache stores the VLAN assignments used for tenant separation within a vSwitch
15 * An assignment consists of a VLAN ID and a tenant network ID.
17 public interface VlanConfigurationCache {
20 * Assigns a free VLAN ID for the given tenant network
21 * @param node an Open vSwitch {@link Node}
22 * @param networkId the Neutron Network ID
23 * @return a VLAN ID or 0 in case of an error
25 Integer assignInternalVlan(Node node, String networkId);
28 * Recovers an assigned VLAN ID when it is no longer required
29 * @param node an Open vSwitch {@link Node}
30 * @param networkId the Neutron Network ID
31 * @return the reclaimed VLAN ID or 0 in case of an error
33 Integer reclaimInternalVlan(Node node, String networkId);
36 * Returns a VLAN ID assigned to a given tenant network
37 * @param node an Open vSwitch {@link Node}
38 * @param networkId the Neutron Network ID
39 * @return the VLAN ID or 0 in case of an error
41 Integer getInternalVlan(Node node, String networkId);