Package org.onosproject.net.behaviour
Interface BandwidthProfileConfigBehaviour
-
- All Superinterfaces:
Behaviour
,HandlerBehaviour
@Beta public interface BandwidthProfileConfigBehaviour extends HandlerBehaviour
Means to configure bandwidth profiles on devices.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
addBandwidthProfile(Collection<BandwidthProfile> bwProfiles)
Adds new bandwidth profiles on the device.default boolean
addBandwidthProfile(BandwidthProfile bwProfile)
Adds a new bandwidth profile on the device.Collection<BandwidthProfile>
getAllBandwidthProfiles()
Obtains all already configured bandwidth profiles from the device.BandwidthProfile
getBandwidthProfile(String profileName)
Obtains an already configured bandwidth profile from the device.boolean
removeAllBandwidthProfiles()
Removes all existing bandwidth profiles from a device.default boolean
removeBandwidthProfile(String profileName)
Removes an existing bandwidth profile from a device.boolean
removeBandwidthProfile(Collection<String> profileNames)
Removes existing bandwidth profiles from a device.boolean
updateBandwidthProfile(Collection<BandwidthProfile> bwProfiles)
Updates already configured bandwidth profiles on the device.default boolean
updateBandwidthProfile(BandwidthProfile bwProfile)
Updates an already configured bandwidth profile on the device.-
Methods inherited from interface org.onosproject.net.driver.HandlerBehaviour
handler, setHandler
-
-
-
-
Method Detail
-
addBandwidthProfile
default boolean addBandwidthProfile(BandwidthProfile bwProfile)
Adds a new bandwidth profile on the device. If a profile with the same name already exists on the device, the profile is not added.- Parameters:
bwProfile
- the bandwidth profile to add- Returns:
- true, if the profile was added successfully; false otherwise
-
addBandwidthProfile
boolean addBandwidthProfile(Collection<BandwidthProfile> bwProfiles)
Adds new bandwidth profiles on the device. If profiles with the same names already exist on the device, the conflicting profiles are not added.- Parameters:
bwProfiles
- the bandwidth profiles to add- Returns:
- true, if any of the profiles were added successfully; false otherwise
-
removeBandwidthProfile
default boolean removeBandwidthProfile(String profileName)
Removes an existing bandwidth profile from a device. Returns false if the profile does not exist on the device.- Parameters:
profileName
- the name of the profile to remove from the device- Returns:
- true, if the profile was removed successfully; false otherwise
-
removeBandwidthProfile
boolean removeBandwidthProfile(Collection<String> profileNames)
Removes existing bandwidth profiles from a device. Returns false if none of the profiles exist on the device.- Parameters:
profileNames
- the names of the profiles to remove from the device- Returns:
- true, if any of the profiles were removed successfully; false otherwise
-
removeAllBandwidthProfiles
boolean removeAllBandwidthProfiles()
Removes all existing bandwidth profiles from a device. Returns true if no profiles exist on the device.- Returns:
- true, if all profiles were removed successfully; false otherwise
-
updateBandwidthProfile
default boolean updateBandwidthProfile(BandwidthProfile bwProfile)
Updates an already configured bandwidth profile on the device. Returns false if the profile does not exist on the device.- Parameters:
bwProfile
- the updated bandwidth profile- Returns:
- true, if the profile was updated successfully; false otherwise
-
updateBandwidthProfile
boolean updateBandwidthProfile(Collection<BandwidthProfile> bwProfiles)
Updates already configured bandwidth profiles on the device. Returns false if none of the profiles exist on the device.- Parameters:
bwProfiles
- the updated bandwidth profile- Returns:
- true, if any of the profiles were updated successfully; false otherwise
-
getBandwidthProfile
BandwidthProfile getBandwidthProfile(String profileName) throws IOException
Obtains an already configured bandwidth profile from the device.- Parameters:
profileName
- the name of the profile to obtain from the device- Returns:
- the bandwidth profile; null if the profile does not exist
- Throws:
IOException
- if profile could not be obtained due to communication issues with the device
-
getAllBandwidthProfiles
Collection<BandwidthProfile> getAllBandwidthProfiles() throws IOException
Obtains all already configured bandwidth profiles from the device.- Returns:
- the bandwidth profiles; empty collection if no profiles exist
- Throws:
IOException
- if profiles could not be obtained due to communication issues with the device
-
-