noc.sa.models.objectstatus

Module Contents

class noc.sa.models.objectstatus.ObjectStatus

Bases: mongoengine.document.Document

meta
object
status
last
__str__(self)
classmethod get_status(cls, object)
classmethod get_last_status(cls, object)

Returns last registred status and update time :param object: Managed Object id :return: last status, last update or None

classmethod get_statuses(cls, objects)

Returns a map of object id -> status for a list od object ids

classmethod set_status(cls, object, status, ts=None)

Update object status :param object: Managed Object instance :param status: New status :param ts: Status change timestamp :return: True, if status has been changed, False - out-of-order update