public interface IDeviceService extends IFloodlightService
Device
objects should be retrieved
from the FloodlightContext
rather than from IDeviceManager
.Modifier and Type | Interface and Description |
---|---|
static class |
IDeviceService.DeviceField
Fields used in devices for indexes and querying
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXT_DST_DEVICE
The destination device for the current packet-in, if applicable.
|
static java.lang.String |
CONTEXT_ORIG_DST_DEVICE
The original destination device for the current packet-in
|
static java.lang.String |
CONTEXT_SRC_DEVICE
The source device for the current packet-in, if applicable.
|
static FloodlightContextStore<IDevice> |
fcStore
A FloodlightContextStore object that can be used to interact with the
FloodlightContext information created by BVS manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addIndex(boolean perClass,
java.util.EnumSet<IDeviceService.DeviceField> keyFields)
Create an index over a set of fields.
|
void |
addListener(IDeviceListener listener)
Adds a listener to listen for IDeviceManagerServices notifications
|
void |
addSuppressAPs(org.projectfloodlight.openflow.types.DatapathId swId,
org.projectfloodlight.openflow.types.OFPort port)
Specify points in the network where attachment points are not to
be learned.
|
IDevice |
findClassDevice(IEntityClass entityClass,
org.projectfloodlight.openflow.types.MacAddress macAddress,
org.projectfloodlight.openflow.types.VlanVid vlan,
org.projectfloodlight.openflow.types.IPv4Address ipv4Address,
org.projectfloodlight.openflow.types.IPv6Address ipv6Address)
Get a destination device using entity fields that corresponds with
the given source device.
|
IDevice |
findDevice(org.projectfloodlight.openflow.types.MacAddress macAddress,
org.projectfloodlight.openflow.types.VlanVid vlan,
org.projectfloodlight.openflow.types.IPv4Address ipv4Address,
org.projectfloodlight.openflow.types.IPv6Address ipv6Address,
org.projectfloodlight.openflow.types.DatapathId switchDPID,
org.projectfloodlight.openflow.types.OFPort switchPort)
Search for a device exactly matching the provided device fields.
|
java.util.Collection<? extends IDevice> |
getAllDevices()
Get an unmodifiable collection view over all devices currently known.
|
IDevice |
getDevice(java.lang.Long deviceKey)
Get the device with the given device key.
|
java.util.Set<SwitchPort> |
getSuppressAPs() |
java.util.Iterator<? extends IDevice> |
queryClassDevices(IEntityClass entityClass,
org.projectfloodlight.openflow.types.MacAddress macAddress,
org.projectfloodlight.openflow.types.VlanVid vlan,
org.projectfloodlight.openflow.types.IPv4Address ipv4Address,
org.projectfloodlight.openflow.types.IPv6Address ipv6Address,
org.projectfloodlight.openflow.types.DatapathId switchDPID,
org.projectfloodlight.openflow.types.OFPort switchPort)
Find devices that match the provided query.
|
java.util.Iterator<? extends IDevice> |
queryDevices(org.projectfloodlight.openflow.types.MacAddress macAddress,
org.projectfloodlight.openflow.types.VlanVid vlan,
org.projectfloodlight.openflow.types.IPv4Address ipv4Address,
org.projectfloodlight.openflow.types.IPv6Address ipv6Address,
org.projectfloodlight.openflow.types.DatapathId switchDPID,
org.projectfloodlight.openflow.types.OFPort switchPort)
Find devices that match the provided query.
|
void |
removeSuppressAPs(org.projectfloodlight.openflow.types.DatapathId swId,
org.projectfloodlight.openflow.types.OFPort port) |
static final java.lang.String CONTEXT_SRC_DEVICE
static final java.lang.String CONTEXT_DST_DEVICE
static final java.lang.String CONTEXT_ORIG_DST_DEVICE
static final FloodlightContextStore<IDevice> fcStore
IDevice getDevice(java.lang.Long deviceKey)
deviceKey
- the key to search forIDevice.getDeviceKey()
IDevice findDevice(@Nonnull org.projectfloodlight.openflow.types.MacAddress macAddress, org.projectfloodlight.openflow.types.VlanVid vlan, @Nonnull org.projectfloodlight.openflow.types.IPv4Address ipv4Address, @Nonnull org.projectfloodlight.openflow.types.IPv6Address ipv6Address, @Nonnull org.projectfloodlight.openflow.types.DatapathId switchDPID, @Nonnull org.projectfloodlight.openflow.types.OFPort switchPort) throws java.lang.IllegalArgumentException
IEntityClassifierService
will
be important in this search. All key fields MUST be supplied.
queryDevices()
might be more appropriate!macAddress
- the MAC address; use MacAddress.NONE for 'don't care'vlan
- the VLAN; use VlanVid.ZERO for 'untagged'ipv4Address
- the ipv4 address; use IPv4Address.NONE for 'don't care'ipv6Address
- the ipv6 address; use IPv6Address.NONE for 'don't care'switchDPID
- the switch DPID; use DatapathId.NONE for 'don't care'switchPort
- the switch port; use OFPort.ZERO for 'don't care'IDevice
or null if no device is found.java.lang.IllegalArgumentException
- if not all key fields of the
current IEntityClassifierService
are specified.IDeviceManager#setEntityClassifier(IEntityClassifierService)
IDevice findClassDevice(@Nonnull IEntityClass entityClass, @Nonnull org.projectfloodlight.openflow.types.MacAddress macAddress, org.projectfloodlight.openflow.types.VlanVid vlan, @Nonnull org.projectfloodlight.openflow.types.IPv4Address ipv4Address, @Nonnull org.projectfloodlight.openflow.types.IPv6Address ipv6Address) throws java.lang.IllegalArgumentException
entityClass
- The entity class in which to perform the lookup.macAddress
- the MAC address; use MacAddress.NONE for 'don't care'vlan
- the VLAN; use VlanVid.ZERO for 'untagged'ipv4Address
- the ipv4 address; use IPv4Address.NONE for 'don't care'ipv6Address
- the ipv6 address; use IPv6Address.NONE for 'don't care'IDevice
or null if no device is found.java.lang.IllegalArgumentException
- if not all key fields of the
source's IEntityClass
are specified.findDevice(MacAddress, VlanVid, IPv4Address, IPv6Address, DatapathId, OFPort)
java.util.Collection<? extends IDevice> getAllDevices()
void addIndex(boolean perClass, java.util.EnumSet<IDeviceService.DeviceField> keyFields)
perClass
- set to true if the index should be maintained for each
entity class separately.keyFields
- the set of fields on which to indexjava.util.Iterator<? extends IDevice> queryDevices(@Nonnull org.projectfloodlight.openflow.types.MacAddress macAddress, org.projectfloodlight.openflow.types.VlanVid vlan, @Nonnull org.projectfloodlight.openflow.types.IPv4Address ipv4Address, @Nonnull org.projectfloodlight.openflow.types.IPv6Address ipv6Address, @Nonnull org.projectfloodlight.openflow.types.DatapathId switchDPID, @Nonnull org.projectfloodlight.openflow.types.OFPort switchPort)
macAddress
- the MAC address; use MacAddress.NONE for 'don't care'vlan
- the VLAN; use null for 'don't care'; use VlanVid.ZERO for 'untagged'ipv4Address
- the ipv4 address; use IPv4Address.NONE for 'don't care'ipv6Address
- the ipv6 address; use IPv6Address.NONE for 'don't care'switchDPID
- the switch DPID; use DatapathId.NONE for 'don't care'switchPort
- the switch port; use OFPort.ZERO for 'don't care'queryClassDevices(IEntityClass, MacAddress,
VlanVid, IPv4Address, IPv6Address, DatapathId, OFPort)
java.util.Iterator<? extends IDevice> queryClassDevices(IEntityClass entityClass, org.projectfloodlight.openflow.types.MacAddress macAddress, org.projectfloodlight.openflow.types.VlanVid vlan, org.projectfloodlight.openflow.types.IPv4Address ipv4Address, org.projectfloodlight.openflow.types.IPv6Address ipv6Address, org.projectfloodlight.openflow.types.DatapathId switchDPID, org.projectfloodlight.openflow.types.OFPort switchPort)
entityClass
- The entity class in which to perform the querymacAddress
- the MAC address; use MacAddress.NONE for 'don't care'vlan
- the VLAN; use null for 'don't care'; use VlanVid.ZERO for 'untagged'ipv4Address
- the ipv4 address; use IPv4Address.NONE for 'don't care'ipv6Address
- the ipv6 address; use IPv6Address.NONE for 'don't care'switchDPID
- the switch DPID; use DatapathId.NONE for 'don't care'switchPort
- the switch port; use OFPort.ZERO for 'don't care'IDeviceService#queryClassDevices(MacAddress,
VlanVid, IPv4Address, IPv6Address, DatapathId, OFPort)
void addListener(IDeviceListener listener)
listener
- The listener that wants the notificationstype
- The type of the listenervoid addSuppressAPs(org.projectfloodlight.openflow.types.DatapathId swId, org.projectfloodlight.openflow.types.OFPort port)
sw
- port
- void removeSuppressAPs(org.projectfloodlight.openflow.types.DatapathId swId, org.projectfloodlight.openflow.types.OFPort port)
java.util.Set<SwitchPort> getSuppressAPs()