def upload_file()

in troubleshooting/create_snapshot.py [0:0]


def upload_file(bucket: str, snap_file: str):  # noqa: E999
    bucket_path = 'gs://{}'.format(bucket)
    upload_cmd = 'gsutil cp {} {}'.format(snap_file, bucket_path)
    print('Uploading snapshot to bucket... ', end='')
    upload_return_code, upload_output = run_gsutil_cmd(upload_cmd)
    if upload_return_code:
        print('[ FAIL ]')
        print(upload_output)
        return upload_return_code
    print('[ DONE ]')
    print(upload_output)