Avoid comparing objects using ==
[netvirt.git] / elanmanager / api / src / main / java / org / opendaylight / netvirt / elanmanager / api / IElanBridgeManager.java
1 /*
2  * Copyright (c) 2016 Hewlett Packard Enterprise, Co. 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 java.math.BigInteger;
12 import java.util.Map;
13 import java.util.Optional;
14
15 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
16
17 public interface IElanBridgeManager {
18
19     /**
20      * Get integration bridge node with dpId.
21      *
22      * @param dpId
23      *            datapath id
24      * @return integration bridge {@code Node} or null if not found
25      */
26     Node getBridgeNode(BigInteger dpId);
27
28     /**
29      * Extract OpenvSwitch other-config to key value map.
30      *
31      * @param node
32      *            OVSDB node
33      * @param key
34      *            key to extract from other-config
35      * @return key-value Map or empty map if key was not found
36      */
37     Map<String, String> getOpenvswitchOtherConfigMap(Node node, String key);
38
39     /**
40      * Extract multi key-value into Map.
41      *
42      * @param multiKeyValueStr
43      *            multi key-value formatted using colon key-value
44      *            separator and comma multi-value separator
45      * @return Map containing key value pairs or empty map if no key value pairs
46      *         where found
47      */
48     Map<String, String> getMultiValueMap(String multiKeyValueStr);
49
50     /**
51      * Get the integration bridge DPN id from the manager node UUID.
52      *
53      * @param managerNodeId
54      *            node-id of the OVSDB node managing br-int
55      * @return Optional containing the dp-id or empty Optional if not found
56      */
57     Optional<BigInteger> getDpIdFromManagerNodeId(String managerNodeId);
58
59 }