Package org.onosproject.alarm
Class DefaultAlarm
- java.lang.Object
-
- org.onosproject.alarm.DefaultAlarm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAlarm.Builder
Builder for the DefaultAlarm object.-
Nested classes/interfaces inherited from interface org.onosproject.alarm.Alarm
Alarm.SeverityLevel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acknowledged()
Returns a flag to indicate if this alarm has been acknowledged.String
assignedUser()
Returns the user to whom this alarm is assigned; this is for future use and always returns null in this release.boolean
cleared()
Returns a flag to indicate if this alarm has been cleared.String
description()
Returns a description of alarm.DeviceId
deviceId()
The device to which this alarm is related.boolean
equals(Object obj)
int
hashCode()
AlarmId
id()
Returns the unique alarm id within this ONOS instance.boolean
manuallyClearable()
Returns a flag to indicate if this alarm is manually-cleared by a user action within ONOS.boolean
serviceAffecting()
Returns true if alarm is service affecting Note: Whilst X.733 combines service-affecting state with severity (where severities of critical and major are deemed service-affecting) ONOS keeps these attributes separate.Alarm.SeverityLevel
severity()
Returns the severity.AlarmEntityId
source()
Returns an entity within the context of this alarm's device.Long
timeCleared()
Returns the time when cleared.long
timeRaised()
Returns the time when raised.long
timeUpdated()
Returns time at which the alarm was updated most recently, due to some change in the device, or ONOS.String
toString()
-
-
-
Method Detail
-
id
public AlarmId id()
Description copied from interface:Alarm
Returns the unique alarm id within this ONOS instance.
-
deviceId
public DeviceId deviceId()
Description copied from interface:Alarm
The device to which this alarm is related.
-
description
public String description()
Description copied from interface:Alarm
Returns a description of alarm.It may encapsulate Event Type as described by ITU Recommendation X.736 ITU, Quoting https://tools.ietf.org/html/rfc3877 these include: other, communicationsAlarm, qualityOfServiceAlarm, processingErrorAlarm, equipmentAlarm, environmentalAlarm, integrityViolation, operationalViolation, physicalViolation, securityServiceOrMechanismViolation, timeDomainViolation
It may encapsulate Probable Cause as described by ITU Recommendation X.736 ITU, Quoting https://www.iana.org/assignments/ianaitualarmtc-mib/ianaitualarmtc-mib these include : aIS, callSetUpFailure, degradedSignal, farEndReceiverFailure, framingError, and hundreds more constants.
It may encapsulate a vendor-specific description of the underlying fault.
- Specified by:
description
in interfaceAlarm
- Returns:
- description of alarm
-
source
public AlarmEntityId source()
Description copied from interface:Alarm
Returns an entity within the context of this alarm's device. It may be null if deviceId sufficiently identifies the location. As an example, the source may indicate a port number
-
timeRaised
public long timeRaised()
Description copied from interface:Alarm
Returns the time when raised.- Specified by:
timeRaised
in interfaceAlarm
- Returns:
- time when raised, in milliseconds since start of epoch
-
timeUpdated
public long timeUpdated()
Description copied from interface:Alarm
Returns time at which the alarm was updated most recently, due to some change in the device, or ONOS. If the alarm has been cleared, this is the time at which the alarm was cleared.- Specified by:
timeUpdated
in interfaceAlarm
- Returns:
- time when last updated, in milliseconds since start of epoch
-
timeCleared
public Long timeCleared()
Description copied from interface:Alarm
Returns the time when cleared. Null indicated no clear time, i.e. the alarm is still active.- Specified by:
timeCleared
in interfaceAlarm
- Returns:
- time when cleared, in milliseconds since start of epoch or null if uncleared.
-
severity
public Alarm.SeverityLevel severity()
Description copied from interface:Alarm
Returns the severity. Note, that cleared alarms may have EITHER SeverityLevel = CLEARED, or may be not present; both scenarios should be handled.
-
serviceAffecting
public boolean serviceAffecting()
Description copied from interface:Alarm
Returns true if alarm is service affecting Note: Whilst X.733 combines service-affecting state with severity (where severities of critical and major are deemed service-affecting) ONOS keeps these attributes separate.- Specified by:
serviceAffecting
in interfaceAlarm
- Returns:
- whether service affecting (true indicates it is)
-
acknowledged
public boolean acknowledged()
Description copied from interface:Alarm
Returns a flag to indicate if this alarm has been acknowledged. All alarms are unacknowledged until and unless an ONOS user takes action to indicate so.- Specified by:
acknowledged
in interfaceAlarm
- Returns:
- whether alarm is currently acknowledged (true indicates it is)
-
cleared
public boolean cleared()
Description copied from interface:Alarm
Returns a flag to indicate if this alarm has been cleared. All alarms are not cleared until and unless an ONOS user or app takes action to indicate so.
-
manuallyClearable
public boolean manuallyClearable()
Description copied from interface:Alarm
Returns a flag to indicate if this alarm is manually-cleared by a user action within ONOS. Some stateless events e.g. backup-failure or upgrade-failure, may be mapped by ONOS to alarms, and these may be deemed manually- clearable. The more typical case is that an alarm represents a persistent fault on or related to a device and such alarms are never manually clearable, i.e. a configuration or operational state must occur for the alarm to clear.- Specified by:
manuallyClearable
in interfaceAlarm
- Returns:
- whether it may be cleared by a user action (true indicates it is)
-
assignedUser
public String assignedUser()
Description copied from interface:Alarm
Returns the user to whom this alarm is assigned; this is for future use and always returns null in this release. It is anticipated that in future ONOS releases, the existing JAAS user/key/role configuration will be extended to include a mechanism whereby some groups of users may allocate alarms to other users for bookkeeping and administrative purposes, and that ONOS will additionally provide a REST based mechanism, to retrieve from JAAS, the set of users to whom alarm assignment is possible for the current user.- Specified by:
assignedUser
in interfaceAlarm
- Returns:
- the assigned user; always null in this release.
-
-