Example #1
0
def _nodisplay_operation_in_progress(client_oip):
    while True:
        top_oip = parse_oip(client_oip.status())
        if top_oip.state in [OIP_SUCCESS, OIP_FAIL]:
            break
        else:
            sleep(OPTIONS.oip_update_interval)
    print _format_oip_line(top_oip, ())
Example #2
0
def _display_operation_in_progress(client_oip):
    init_pos_spec = ((), False)
    while True:
        top_oip = parse_oip(client_oip.status())
        cur_pos_spec = _find_active_oip(top_oip)
        _write_oip_info(top_oip, init_pos_spec, cur_pos_spec, stdout)
        if top_oip.state in [OIP_SUCCESS, OIP_FAIL]:
            # operation completed
            assert cur_pos_spec == ((), True)
            break
        else:
            init_pos_spec = cur_pos_spec
            sleep(OPTIONS.oip_update_interval)
    print