Fix problem with ParentNodes
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceState.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 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.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
15 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
16
17 /**
18  * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
19  */
20 public interface DeviceState {
21
22     /**
23      * @return id of encapsulated node
24      */
25     NodeId getNodeId();
26
27     /**
28      * @return {@link Node} instance identifier
29      */
30     KeyedInstanceIdentifier<Node, NodeKey> getNodeInstanceIdentifier();
31
32     /**
33      * @return the features of corresponding switch
34      */
35     GetFeaturesOutput getFeatures();
36
37     /**
38      * @return true if this session is valid
39      */
40     boolean isValid();
41
42     /**
43      * @param valid the valid to set
44      */
45     void setValid(boolean valid);
46
47     /**
48      * Return node current OF protocol version
49      *
50      * @return
51      */
52     short getVersion();
53
54     /**
55      * Return true if we have relevant meter information
56      * from device
57      * @return
58      */
59     boolean isMetersAvailable();
60
61     /**
62      * We already have information about meters
63      */
64     void meterIsAvailable();
65
66     /**
67      * Return true if we have relevant group information
68      * from device
69      * @return
70      */
71     boolean isGroupAvailable();
72
73     /**
74      * We already have information about groups
75      */
76     void groupIsAvailable();
77
78 }