Esempio n. 1
0
def attached_projector_model(ip_address):
    """
    Returns the attached projector model
    """
    vendor = str(snmp_get(PROJECTOR_VENDOR_OID, ip_address)) or "Unknown"
    model = str(snmp_get(PROJECTOR_MODEL_OID, ip_address)) or "Unknown"
    return '%s - %s' % (vendor, model)
Esempio n. 2
0
def current_kdm_expiry(ip_address):
    """
    The number of remaining hours for the currently active KDM
    """
    # -- Need to get the KDM to check that is not a blank KDM
    kdm = snmp_get(CURRENT_KDM_OID, ip_address)
    hours_remaining = snmp_get(CURRENT_KDM_EXPIRY_OID, ip_address)
    if hours_remaining and kdm != '00000000-0000-0000-0000-000000000000':
        return datetime.datetime.now() + datetime.timedelta(hours=int(hours_remaining))
    else:
        return None
Esempio n. 3
0
def current_kdm(ip_address):
    """
    Returns the UUID of the currently active KDM
    """
    kdm = snmp_get(CURRENT_KDM_OID, ip_address)
    # -- Blank KDMs are returned when playing unencrypted content
    if kdm and kdm != '00000000-0000-0000-0000-000000000000':
        return kdm
    else:
        return None
Esempio n. 4
0
def serial_number(ip_address):
    """
    Returns the attached projector model
    """
    return str(snmp_get(SERIAL_NUMBER_OID, ip_address))
Esempio n. 5
0
def system_date(ip_address):
    """
    Returns the system time and date
    """
    return str(snmp_get(SYSTEM_DATE_OID, ip_address))
Esempio n. 6
0
def firmware_version(ip_address):
    """
    Returns the firmware version
    """
    return str(snmp_get(FIRMWARE_VERSION_OID, ip_address))
Esempio n. 7
0
def software_version(ip_address):
    """
    Returns the software version
    """
    return str(snmp_get(SOFTWARE_VERSION_OID, ip_address))