Fix context chain initialization and SLAVE change
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceInfo.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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.openflowplugin.api.openflow.device;
10
11 import java.math.BigInteger;
12 import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
16 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
17
18 /**
19  * API defining basic device information.
20  */
21 public interface DeviceInfo extends XidSequencer {
22
23     /**
24      * Getter.
25      * @return id of encapsulated node
26      */
27     NodeId getNodeId();
28
29     /**
30      * Getter.
31      * @return {@link Node} instance identifier
32      */
33     KeyedInstanceIdentifier<Node, NodeKey> getNodeInstanceIdentifier();
34
35     /**
36      * Getter.
37      * @return version
38      */
39     short getVersion();
40
41     /**
42      * Getter.
43      * @return datapathId
44      */
45     BigInteger getDatapathId();
46
47     /**
48      * Getter.
49      * @return clustering service identifier
50      */
51     ServiceGroupIdentifier getServiceIdentifier();
52
53     /**
54      * Many uses in log, this will make code more readable.
55      * @return string representation of nodeId
56      */
57     @Deprecated
58     default String getLOGValue() {
59         return getNodeId().getValue();
60     }
61
62 }