7325efdd610014a5cb6f807f8538b0bbfed80035
[netvirt.git] / vpnservice / elanmanager / elanmanager-api / src / main / java / org / opendaylight / netvirt / elanmanager / api / IElanService.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.netvirt.elanmanager.api;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry;
13 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
14 import org.opendaylight.netvirt.elanmanager.exceptions.MacNotFoundException;
15
16 import java.util.Collection;
17 import java.util.List;
18
19 public interface IElanService {
20     boolean createElanInstance(String elanInstanceName, long MacTimeout, String description);
21     void updateElanInstance(String elanInstanceName, long newMacTimout, String newDescription);
22     boolean deleteElanInstance(String elanInstanceName);
23
24     void addElanInterface(String elanInstanceName, String interfaceName, List<String> staticMacAddresses,
25                           String description);
26     void updateElanInterface(String elanInstanceName, String interfaceName, List<String> updatedStaticMacAddresses,
27                              String newDescription);
28     void deleteElanInterface(String elanInstanceName, String interfaceName);
29
30     void addStaticMacAddress(String elanInstanceName, String interfaceName, String macAddress);
31     void deleteStaticMacAddress(String elanInstanceName, String interfaceName, String macAddress) throws MacNotFoundException;
32     Collection<MacEntry> getElanMacTable(String elanInstanceName);
33     void flushMACTable(String elanInstanceName);
34     ElanInstance getElanInstance(String elanInstanceName);
35     List<ElanInstance> getElanInstances();
36     List<String> getElanInterfaces(String elanInstanceName);
37
38     void createExternalElanNetwork(ElanInstance elanInstance);
39
40     void createExternalElanNetworks(Node node);
41
42 }