2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.openflowplugin.api.openflow.device;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PortGrouping;
14 import java.util.List;
19 * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
21 public interface DeviceState {
24 * @return id of encapsulated node
29 * @return the features of corresponding switch
31 GetFeaturesOutput getFeatures();
34 * @return true if this session is valid
39 * @param valid the valid to set
41 void setValid(boolean valid);
44 * Returns a map containing all OFPhysicalPorts of this switch.
46 * @return The Map of OFPhysicalPort
48 Map<Long, PortGrouping> getPhysicalPorts();
51 * Returns a map containing all bandwidths for all OFPorts of this switch.
53 * @return The Map of bandwidths for all OFPorts
55 Map<Long, Long> getPortsBandwidth();
58 * Returns a Set containing all port IDs of this switch.
60 * @return The Set of port ID
65 * Returns OFPhysicalPort of the specified portNumber of this switch.
67 * @param portNumber The port ID
68 * @return OFPhysicalPort for the specified PortNumber
70 PortGrouping getPhysicalPort(Long portNumber);
73 * Returns the bandwidth of the specified portNumber of this switch.
75 * @param portNumber the port ID
78 Long getPortBandwidth(Long portNumber);
81 * Returns True if the port is enabled,
84 * @return True if the port is enabled
86 boolean isPortEnabled(long portNumber);
89 * Returns True if the port is enabled.
92 * @return True if the port is enabled
94 boolean isPortEnabled(PortGrouping port);
97 * Returns a list containing all enabled ports of this switch.
99 * @return List containing all enabled ports of this switch
101 List<PortGrouping> getEnabledPorts();
104 * @return seed value for random operations