Interface AlarmService

    • Method Detail

      • updateBookkeepingFields

        Alarm updateBookkeepingFields​(AlarmId id,
                                      boolean clear,
                                      boolean isAcknowledged,
                                      java.lang.String assignedUser)
        Update book-keeping (ie administrative) fields for the alarm matching the specified identifier.
        Parameters:
        id - alarm identifier
        clear - true if the alarm has to be cleared
        isAcknowledged - new acknowledged state
        assignedUser - new assigned user, null clear
        Returns:
        updated alarm (including any recent device-derived changes)
      • remove

        void remove​(AlarmId id)
        Remove an alarm from ONOS.
        Parameters:
        id - alarm
      • getAlarmCounts

        java.util.Map<Alarm.SeverityLevel,​java.lang.Long> getAlarmCounts​(DeviceId deviceId)
        Returns summary of alarms on a given device.
        Parameters:
        deviceId - the device
        Returns:
        map of severity (if applicable) vs alarm counts; empty map if either the device has no alarms or identified device is not managed.
      • getAlarmCounts

        java.util.Map<Alarm.SeverityLevel,​java.lang.Long> getAlarmCounts()
        Returns summary of alarms on all devices.
        Returns:
        map of severity (if applicable) vs alarm counts; empty map if no alarms.
      • getAlarm

        Alarm getAlarm​(AlarmId alarmId)
        Returns the alarm with the specified identifier.
        Parameters:
        alarmId - alarm identifier
        Returns:
        alarm matching id; null if no alarm matches the identifier.
      • getAlarms

        java.util.Set<Alarm> getAlarms()
        Returns all of the alarms.
        Returns:
        set of alarms; empty set if no alarms
      • getActiveAlarms

        java.util.Set<Alarm> getActiveAlarms()
        Returns all of the ACTIVE alarms. Recently cleared alarms excluded.
        Returns:
        set of alarms; empty set if no alarms
      • getAlarms

        java.util.Set<Alarm> getAlarms​(Alarm.SeverityLevel severity)
        Returns the alarms with the specified severity.
        Parameters:
        severity - the alarm severity
        Returns:
        set of alarms with a particular severity; empty set if no alarms
      • getAlarms

        java.util.Set<Alarm> getAlarms​(DeviceId deviceId)
        Returns the alarm matching a given device, regardless of source within that device.
        Parameters:
        deviceId - the device to use when searching alarms.
        Returns:
        set of alarms; empty set if no alarms
      • getActiveAlarms

        default java.util.Set<Alarm> getActiveAlarms​(DeviceId deviceId)
        Returns all of the ACTIVE alarms for a specific device. Recently cleared alarms excluded.
        Parameters:
        deviceId - the device to use when searching alarms.
        Returns:
        set of alarms; empty set if no alarms
      • getAlarms

        java.util.Set<Alarm> getAlarms​(DeviceId deviceId,
                                       AlarmEntityId source)
        Returns the alarm for a given device and source.
        Parameters:
        deviceId - the device
        source - the source within the device
        Returns:
        set of alarms; empty set if no alarms
      • getAlarmsForLink

        java.util.Set<Alarm> getAlarmsForLink​(ConnectPoint src,
                                              ConnectPoint dst)
        Returns the alarm affecting a given link.
        Parameters:
        src - one end of the link
        dst - one end of the link
        Returns:
        set of alarms; empty set if no alarms
      • getAlarmsForFlow

        java.util.Set<Alarm> getAlarmsForFlow​(DeviceId deviceId,
                                              long flowId)
        Returns the alarm affecting a given flow.
        Parameters:
        deviceId - the device
        flowId - the flow
        Returns:
        set of alarms; empty set if no alarms