Пример #1
0
def collect_build_info_after_started():
    import webclient
    # import time
    # time.sleep(15)
    try:
        webclient.getBuildInfo('client')
    except webclient.ServiceException,e:
        print 'getting client build info failed with description<' + e.value + '>, please retry'
Пример #2
0
def get_broker_buildinfo(selected_machines):
    try:
        _print_buildinfotitle()
        for host_alias,host_ip in selected_machines.items():
            build_installdate, role, build_version = webclient.getBuildInfo('broker',host_ip+':'+str(PORT))
            _print_buildinfo(host_alias,build_installdate, role, build_version)
    except webclient.ServiceException,e:
        print 'getting agent build info failed with description<' + e.value + '>, please retry'
Пример #3
0
            with open('C:\\Temp\\reboot_after_tasks.txt', 'w+') as f:
                f.writelines(tasks[i+1:])
        exec('''%s''' % tasks[i])
        time.sleep(60)


def collect_build_info_after_started():
    import webclient
    # import time
    # time.sleep(15)
    try:
        webclient.getBuildInfo('client')
    except webclient.ServiceException,e:
        print 'getting client build info failed with description<' + e.value + '>, please retry'
    try:
        webclient.getBuildInfo('broker')
    except webclient.ServiceException,e:
        print 'getting broker build info failed with description<' + e.value + '>, please retry'
    try:
        webclient.getBuildInfo('agent')
    except webclient.ServiceException,e:
        print 'getting agent build info failed with description<' + e.value + '>, please retry'


def clear_windows_temp_dir():
    try:
        for f in os.listdir('C:\\Windows\\Temp'):
            if os.path.isfile(f):
                os.remove('C:\\Windows\\Temp')
    except WindowsError, e:
        print e.value