Exemple #1
0
def _check_ip_filter_match(ip_mo, mo):
    for prop in _IP_FILTER_LIST:
        configured_value = getattr(ip_mo, prop)
        in_value = getattr(mo, prop)
        if _is_invalid_value(configured_value) and \
                _is_invalid_value(in_value):
            continue
        if configured_value != in_value:
            return False

    return True
Exemple #2
0
def _check_ip_filter_match(ip_mo, mo):
    for prop in _IP_FILTER_LIST:
        configured_value = getattr(ip_mo, prop)
        in_value = getattr(mo, prop)
        if _is_invalid_value(configured_value) and \
                _is_invalid_value(in_value):
            continue
        if configured_value != in_value:
            return False

    return True
Exemple #3
0
def _check_ntp_server_match(ntp_mo, mo):
    for prop in _NTP_SERVER_LIST:
        configured_value = getattr(ntp_mo, prop)
        in_value = getattr(mo, prop)

        if _is_invalid_value(configured_value) and \
                _is_invalid_value(in_value):
            continue
        if configured_value != in_value:
            return False

    return True
Exemple #4
0
def _check_ntp_server_match(ntp_mo, mo):
    for prop in _NTP_SERVER_LIST:
        configured_value = getattr(ntp_mo, prop)
        in_value = getattr(mo, prop)

        if _is_invalid_value(configured_value) and \
                _is_invalid_value(in_value):
            continue
        if configured_value != in_value:
            return False

    return True
Exemple #5
0
def _get_free_smtp_recipient(handle):
    mos = _get_smtp_recipients(handle)
    for mo in mos:
        if _is_invalid_value(mo.email):
            return mo

    raise ImcOperationError("Add SMTP recipient",
                            "Max number of emails already added.")
Exemple #6
0
def _get_free_smtp_recipient(handle):
    mos = _get_smtp_recipients(handle)
    for mo in mos:
        if _is_invalid_value(mo.email):
            return mo

    raise ImcOperationError("Add SMTP recipient",
                            "Max number of emails already added.")
Exemple #7
0
def _check_match(prop1, prop2):
    if _is_invalid_value(prop1) and _is_invalid_value(prop2):
        return None
    return prop1 == prop2
Exemple #8
0
def _check_match(prop1, prop2):
    if _is_invalid_value(prop1) and _is_invalid_value(prop2):
        return None
    return prop1 == prop2