ucscsdk/utils/ucscdomain.py
def is_domain_registered(handle, domain_name_or_ip):
    """
    This method returns Boolean value depending on whether given domain is
    registered with UcsCentral

    Args:
        handle (UcscHandle): UcsCentral Connection handle
        domain_name_or_ip (str): Domain name or IP

    Returns:
        True/False

    Example:
        is_domain_registered(handle, domain_name_or_ip="192.168.1.1")
    """

    from ucscsdk.mometa.policy.PolicyControlEpOp import\
        PolicyControlEpOpConsts

    domain_dn = "holder/domain-ep/control-ep-" + domain_name_or_ip
    domain_register = handle.query_dn(domain_dn)

    if domain_register:
        if domain_register.registration_state == \
                PolicyControlEpOpConsts.REGISTRATION_STATE_REGISTERED:
            return True
        else:
            log.debug("Domain registration is in-progress or has failed")
            return False
    else:
        log.debug("Domain is not registered with UcsCentral")
        return False

    This method returns Boolean value depending on whether given domain is
    registered with UcsCentral

    Args:
        handle (UcscHandle): UcsCentral Connection handle
        domain_name_or_ip (str): Domain name or IP

    Returns:
        True/False

    Example:
        is_domain_registered(handle, domain_name_or_ip="192.168.1.1")
    
This method returns Boolean value depending on whether given domain is
registered with UcsCentral
This method returns Boolean value depending on whether given domain is registered with UcsCentral
def is_domain_registered(handle, domain_name_or_ip):
    from ucscsdk.mometa.policy.PolicyControlEpOp import\
        PolicyControlEpOpConsts
    domain_dn = "holder/domain-ep/control-ep-" + domain_name_or_ip
    domain_register = handle.query_dn(domain_dn)
    if domain_register:
        if domain_register.registration_state == \
                PolicyControlEpOpConsts.REGISTRATION_STATE_REGISTERED:
            return True
        else:
            log.debug("Domain registration is in-progress or has failed")
            return False
    else:
        log.debug("Domain is not registered with UcsCentral")
        return False
def is_domain_registered ( handle , domain_name_or_ip ) : from ucscsdk . mometa . policy . PolicyControlEpOp import PolicyControlEpOpConsts domain_dn = "holder/domain-ep/control-ep-" + domain_name_or_ip domain_register = handle . query_dn ( domain_dn ) if domain_register : if domain_register . registration_state == PolicyControlEpOpConsts . REGISTRATION_STATE_REGISTERED : return True else : log . debug ( "Domain registration is in-progress or has failed" ) return False else : log . debug ( "Domain is not registered with UcsCentral" ) return False
This method returns Boolean value depending on whether given domain is
registered with UcsCentral
This method returns Boolean value depending on whether given domain is registered with UcsCentral
"""
    This method returns Boolean value depending on whether given domain is
    registered with UcsCentral

    Args:
        handle (UcscHandle): UcsCentral Connection handle
        domain_name_or_ip (str): Domain name or IP

    Returns:
        True/False

    Example:
        is_domain_registered(handle, domain_name_or_ip="192.168.1.1")
    """
None
handle
UcsCentral Connection handle
UcsCentral Connection handle
domain_name_or_ip
Domain name or IP
Domain name or IP
examples
None