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