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 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.List<ControllerInfo>
controllers()
Returns OpenFlow controllers of the bridge.Optional<List<ControlProtocolVersion>>
controlProtocols()
Returns list of Control Protocol Versions supported on device.Optional<String>
datapathId()
Returns OpenFlow datapath ID of the bridge.Optional<String>
datapathType()
Returns OVSDB datapath Type of the bridge.Optional<DeviceId>
deviceId()
Returns OpenFlow device ID.Optional<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.Optional<BridgeDescription.FailMode>
failMode()
Returns fail mode of the bridge.Optional<Boolean>
mcastSnoopingEnable()
Returns multicast snooping is enabled or not.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 String name()
Description copied from interface:BridgeDescription
Returns bridge name.- Specified by:
name
in interfaceBridgeDescription
- Returns:
- bridge name
-
controllers
public 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 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 Optional<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 Optional<String> datapathType()
Description copied from interface:BridgeDescription
Returns OVSDB datapath Type of the bridge.- Specified by:
datapathType
in interfaceBridgeDescription
- Returns:
- datapath type
-
controlProtocols
public Optional<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 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 Optional<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
-
mcastSnoopingEnable
public Optional<Boolean> mcastSnoopingEnable()
Description copied from interface:BridgeDescription
Returns multicast snooping is enabled or not. If set to true, enable multicast snooping on the bridge. If it is not set, the multicast snooping is disabled.- Specified by:
mcastSnoopingEnable
in interfaceBridgeDescription
- Returns:
- true if the multicast snooping is enabled, false otherwise
-
builder
public static BridgeDescription.Builder builder()
Creates and returns a new builder instance.- Returns:
- new builder
-
-