Package org.onosproject.net.behaviour
Class DefaultBridgeDescription
- java.lang.Object
-
- org.onosproject.net.behaviour.DefaultBridgeDescription
-
- All Implemented Interfaces:
Annotated
,BridgeDescription
,Description
public final class DefaultBridgeDescription extends java.lang.Object implements BridgeDescription
The default implementation of bridge.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultBridgeDescription.Builder
-
Nested classes/interfaces inherited from interface org.onosproject.net.behaviour.BridgeDescription
BridgeDescription.FailMode
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SparseAnnotations
annotations()
Returns the key/value annotations.static BridgeDescription.Builder
builder()
Creates and returns a new builder instance.java.util.List<ControllerInfo>
controllers()
Returns OpenFlow controllers of the bridge.java.util.Optional<java.util.List<ControlProtocolVersion>>
controlProtocols()
Returns list of Control Protocol Versions supported on device.java.util.Optional<java.lang.String>
datapathId()
Returns OpenFlow datapath ID of the bridge.java.util.Optional<java.lang.String>
datapathType()
Returns OVSDB datapath Type of the bridge.java.util.Optional<DeviceId>
deviceId()
Returns OpenFlow device ID.java.util.Optional<java.lang.Boolean>
disableInBand()
Returns in band control is enabled or not.boolean
enableLocalController()
Returns whether to use local controller as an OpenFlow controller of the bridge if no controllers are specified.java.util.Optional<BridgeDescription.FailMode>
failMode()
Returns fail mode of the bridge.java.lang.String
name()
Returns bridge name.
-
-
-
Method Detail
-
annotations
public SparseAnnotations annotations()
Description copied from interface:Annotated
Returns the key/value annotations.- Specified by:
annotations
in interfaceAnnotated
- Specified by:
annotations
in interfaceDescription
- Returns:
- key/value annotations
-
name
public java.lang.String name()
Description copied from interface:BridgeDescription
Returns bridge name.- Specified by:
name
in interfaceBridgeDescription
- Returns:
- bridge name
-
controllers
public java.util.List<ControllerInfo> controllers()
Description copied from interface:BridgeDescription
Returns OpenFlow controllers of the bridge. If it's empty, then no OpenFlow controllers are used for the bridge.- Specified by:
controllers
in interfaceBridgeDescription
- Returns:
- set of controllers
-
enableLocalController
public boolean enableLocalController()
Description copied from interface:BridgeDescription
Returns whether to use local controller as an OpenFlow controller of the bridge if no controllers are specified.- Specified by:
enableLocalController
in interfaceBridgeDescription
- Returns:
- true to set local controller, false otherwise
-
failMode
public java.util.Optional<BridgeDescription.FailMode> failMode()
Description copied from interface:BridgeDescription
Returns fail mode of the bridge. If it's not set, the default setting of the bridge is used.- Specified by:
failMode
in interfaceBridgeDescription
- Returns:
- fail mode
-
datapathId
public java.util.Optional<java.lang.String> datapathId()
Description copied from interface:BridgeDescription
Returns OpenFlow datapath ID of the bridge. Valid only if OpenFlow controller is configured for the bridge.- Specified by:
datapathId
in interfaceBridgeDescription
- Returns:
- datapath id
-
datapathType
public java.util.Optional<java.lang.String> datapathType()
Description copied from interface:BridgeDescription
Returns OVSDB datapath Type of the bridge.- Specified by:
datapathType
in interfaceBridgeDescription
- Returns:
- datapath type
-
controlProtocols
public java.util.Optional<java.util.List<ControlProtocolVersion>> controlProtocols()
Description copied from interface:BridgeDescription
Returns list of Control Protocol Versions supported on device.- Specified by:
controlProtocols
in interfaceBridgeDescription
- Returns:
- List of Control Protocol Versions enabled on bridge
-
deviceId
public java.util.Optional<DeviceId> deviceId()
Description copied from interface:BridgeDescription
Returns OpenFlow device ID. Valid only if OpenFlow controller is configured for the bridge.- Specified by:
deviceId
in interfaceBridgeDescription
- Returns:
- device id
-
disableInBand
public java.util.Optional<java.lang.Boolean> disableInBand()
Description copied from interface:BridgeDescription
Returns in band control is enabled or not. If set to true, disable in-band control on the bridge regardless of controller and manager settings. If it's not set, the default setting of the bridge is used.- Specified by:
disableInBand
in interfaceBridgeDescription
- Returns:
- true if in-band is disabled, false if in-band is enabled
-
builder
public static BridgeDescription.Builder builder()
Creates and returns a new builder instance.- Returns:
- new builder
-
-