ucscsdk/utils/ucscdomain.py
def domain_unregister(handle, domain_name_or_ip):
    """
    This method unregisters Ucs domain from Ucs Central.

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

    Returns:
        None

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

    from distutils.version import LooseVersion as VERSION
    from ucscsdk.mometa.policy.PolicyControlEpOp import\
        PolicyControlEpOpConsts

    if VERSION(handle.get_firmware_version()) < VERSION("1.5"):
        raise UcscOperationError(
                "Domain unregister",
                "Operation only supported from version 1.5 onwards")

    filter_str = '(host_name_or_ip, %s, type="eq")' % domain_name_or_ip

    domains_registered = handle.query_classid(class_id="PolicyControlEpOp",
                                              filter_str=filter_str)
    if (len(domains_registered) <= 0):
        raise UcscOperationError(
            "Domain unregister",
            "Domain with name or IP %s not registered with UcsCentral"
            % domain_name_or_ip)

    domain_register = domains_registered[0]

    if not _is_domain_available(handle, domain_register.sys_id):
        raise UcscOperationError(
            "Domain unregister",
            "Not able to connect with Domain %s" % domain_name_or_ip)

    domain_register.action_event = \
        PolicyControlEpOpConsts.ACTION_EVENT_UNREGISTER
    handle.set_mo(domain_register)
    handle.commit()

    log.debug("Domain was successfully unregistered from Ucs Central")

    This method unregisters Ucs domain from Ucs Central.

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

    Returns:
        None

    Example:
        domain_unregister(handle, domain_name_or_ip="192.168.1.1")
    
This method unregisters Ucs domain from Ucs Central.
This method unregisters Ucs domain from Ucs Central .
def domain_unregister(handle, domain_name_or_ip):
    from distutils.version import LooseVersion as VERSION
    from ucscsdk.mometa.policy.PolicyControlEpOp import\
        PolicyControlEpOpConsts
    if VERSION(handle.get_firmware_version()) < VERSION("1.5"):
        raise UcscOperationError(
                "Domain unregister",
                "Operation only supported from version 1.5 onwards")
    filter_str = '(host_name_or_ip, %s, type="eq")' % domain_name_or_ip
    domains_registered = handle.query_classid(class_id="PolicyControlEpOp",
                                              filter_str=filter_str)
    if (len(domains_registered) <= 0):
        raise UcscOperationError(
            "Domain unregister",
            "Domain with name or IP %s not registered with UcsCentral"
            % domain_name_or_ip)
    domain_register = domains_registered[0]
    if not _is_domain_available(handle, domain_register.sys_id):
        raise UcscOperationError(
            "Domain unregister",
            "Not able to connect with Domain %s" % domain_name_or_ip)
    domain_register.action_event = \
        PolicyControlEpOpConsts.ACTION_EVENT_UNREGISTER
    handle.set_mo(domain_register)
    handle.commit()
    log.debug("Domain was successfully unregistered from Ucs Central")
def domain_unregister ( handle , domain_name_or_ip ) : from distutils . version import LooseVersion as VERSION from ucscsdk . mometa . policy . PolicyControlEpOp import PolicyControlEpOpConsts if VERSION ( handle . get_firmware_version ( ) ) < VERSION ( "1.5" ) : raise UcscOperationError ( "Domain unregister" , "Operation only supported from version 1.5 onwards" ) filter_str = '(host_name_or_ip, %s, type="eq")' % domain_name_or_ip domains_registered = handle . query_classid ( class_id = "PolicyControlEpOp" , filter_str = filter_str ) if ( len ( domains_registered ) <= 0 ) : raise UcscOperationError ( "Domain unregister" , "Domain with name or IP %s not registered with UcsCentral" % domain_name_or_ip ) domain_register = domains_registered [ 0 ] if not _is_domain_available ( handle , domain_register . sys_id ) : raise UcscOperationError ( "Domain unregister" , "Not able to connect with Domain %s" % domain_name_or_ip ) domain_register . action_event = PolicyControlEpOpConsts . ACTION_EVENT_UNREGISTER handle . set_mo ( domain_register ) handle . commit ( ) log . debug ( "Domain was successfully unregistered from Ucs Central" )
This method unregisters Ucs domain from Ucs Central.
This method unregisters Ucs domain from Ucs Central .
"""
    This method unregisters Ucs domain from Ucs Central.

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

    Returns:
        None

    Example:
        domain_unregister(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