ucscsdk/utils/ucscbackup.py
def _schedule_export_config(handle, descr, sched_name,
                            max_bkup_files, remote_enabled,
                            protocol, hostname, file_path,
                            username, password,
                            parent_mo_or_dn):

    """
    Internal method to schedule and take remote backup of UcsCentral and Domain
    config-all backup
    """
    from ..mometa.mgmt.MgmtCfgExportPolicy import MgmtCfgExportPolicy, \
        MgmtCfgExportPolicyConsts

    if remote_enabled:
        if not file_path:
            raise UcscValidationException("Missing file_path argument")

        _validate_remote_host_args(protocol, hostname, username, password)
        proto = protocol
        host = hostname
        remote_file = file_path
        user = username
        pwd = password
    else:
        proto = MgmtCfgExportPolicyConsts.PROTO_NFS_COPY
        host = ""
        remote_file = " "
        user = ""
        pwd = ""

    cfg_export_pol = MgmtCfgExportPolicy(
            parent_mo_or_dn=parent_mo_or_dn,
            descr=descr,
            admin_state=MgmtCfgExportPolicyConsts.ADMIN_STATE_ENABLE,
            sched_name=sched_name,
            max_files=str(max_bkup_files),
            proto=proto,
            host=host,
            remote_file=remote_file,
            user=user,
            pwd=pwd,
            name="default")

    handle.add_mo(cfg_export_pol, modify_present=True)
    handle.commit()

    return cfg_export_pol

    Internal method to schedule and take remote backup of UcsCentral and Domain
    config-all backup
    
Internal method to schedule and take remote backup of UcsCentral and Domain
config-all backup
Internal method to schedule and take remote backup of UcsCentral and Domain config - all backup
def _schedule_export_config(handle, descr, sched_name,
                            max_bkup_files, remote_enabled,
                            protocol, hostname, file_path,
                            username, password,
                            parent_mo_or_dn):
    from ..mometa.mgmt.MgmtCfgExportPolicy import MgmtCfgExportPolicy, \
        MgmtCfgExportPolicyConsts
    if remote_enabled:
        if not file_path:
            raise UcscValidationException("Missing file_path argument")
        _validate_remote_host_args(protocol, hostname, username, password)
        proto = protocol
        host = hostname
        remote_file = file_path
        user = username
        pwd = password
    else:
        proto = MgmtCfgExportPolicyConsts.PROTO_NFS_COPY
        host = ""
        remote_file = " "
        user = ""
        pwd = ""
    cfg_export_pol = MgmtCfgExportPolicy(
            parent_mo_or_dn=parent_mo_or_dn,
            descr=descr,
            admin_state=MgmtCfgExportPolicyConsts.ADMIN_STATE_ENABLE,
            sched_name=sched_name,
            max_files=str(max_bkup_files),
            proto=proto,
            host=host,
            remote_file=remote_file,
            user=user,
            pwd=pwd,
            name="default")
    handle.add_mo(cfg_export_pol, modify_present=True)
    handle.commit()
    return cfg_export_pol
def _schedule_export_config ( handle , descr , sched_name , max_bkup_files , remote_enabled , protocol , hostname , file_path , username , password , parent_mo_or_dn ) : from . . mometa . mgmt . MgmtCfgExportPolicy import MgmtCfgExportPolicy , MgmtCfgExportPolicyConsts if remote_enabled : if not file_path : raise UcscValidationException ( "Missing file_path argument" ) _validate_remote_host_args ( protocol , hostname , username , password ) proto = protocol host = hostname remote_file = file_path user = username pwd = password else : proto = MgmtCfgExportPolicyConsts . PROTO_NFS_COPY host = "" remote_file = " " user = "" pwd = "" cfg_export_pol = MgmtCfgExportPolicy ( parent_mo_or_dn = parent_mo_or_dn , descr = descr , admin_state = MgmtCfgExportPolicyConsts . ADMIN_STATE_ENABLE , sched_name = sched_name , max_files = str ( max_bkup_files ) , proto = proto , host = host , remote_file = remote_file , user = user , pwd = pwd , name = "default" ) handle . add_mo ( cfg_export_pol , modify_present = True ) handle . commit ( ) return cfg_export_pol
Internal method to schedule and take remote backup of UcsCentral and Domain
config-all backup
Internal method to schedule and take remote backup of UcsCentral and Domain config - all backup
"""
    Internal method to schedule and take remote backup of UcsCentral and Domain
    config-all backup
    """
handle
descr
sched_name
max_bkup_files
remote_enabled
protocol
hostname
file_path
username
password
parent_mo_or_dn