Ejemplo n.º 1
0
def get_trace_all(trace_level):
    folder = '%s/%s' % (strTraceFolder, s.time_now_folder())
    if trace_level:
        for ip in list_engines_IP:
            Action(ip, telnet_port, passwd, FTP_port).get_trace(
                folder, trace_level)
    else:
        for ip in list_engines_IP:
            Action(ip, telnet_port, passwd, FTP_port).get_trace(
                folder, trace_level_cfg)
Ejemplo n.º 2
0
def get_trace(ip, trace_level):
    folder = '%s/%s' % (strTraceFolder, s.time_now_folder())
    try:
        if trace_level:
            Action(ip, telnet_port, passwd, FTP_port).get_trace(
                folder, trace_level)
        else:
            Action(ip, telnet_port, passwd, FTP_port).get_trace(
                folder, trace_level_cfg)
    finally:
        return folder
Ejemplo n.º 3
0
def periodically_check(ip):
    PCFile_name = 'PC_%s_SANSwitch_%s.log' % (s.time_now_folder(), ip)
    Action(ip, ssh_port, user, passwd,
           []).periodic_check(lstPCCommand, strPCFolder, PCFile_name)
Ejemplo n.º 4
0
def backup_config(ip):
    folder = '%s/%s' % (strCFGFolder, s.time_now_folder())
    Action(ip, telnet_port, passwd, FTP_port).backup(folder)
Ejemplo n.º 5
0
def backup_config_all():
    folder = '%s/%s' % (strCFGFolder, s.time_now_folder())
    for ip in list_engines_IP:
         Action(ip, telnet_port, passwd, FTP_port).backup(folder)
Ejemplo n.º 6
0
def periodically_check(ip):
    PCFile_name = 'PC_%s_Engine_%s.log' % (
        s.time_now_folder(), ip)
    Action(ip, telnet_port, passwd, FTP_port).periodic_check(
        lstPCCommand, strPCFolder, PCFile_name)
Ejemplo n.º 7
0
def test_time_now_folder():
    assert sun.time_now_folder()