Module arvados.commands.arv_copy

Functions

def abort(msg, code=1)
def api_for_instance(instance_name)
def attr_filtered(filter_, *attr_names)

Return True if filter_ applies to any of attr_names, else False.

def check_git_availability()
def copy_collection(obj_uuid, src, dst, args)
def copy_collections(obj, src, dst, args)
def copy_docker_image(docker_image, docker_image_tag, src, dst, args)

Copy the docker image identified by docker_image and docker_image_tag from src to dst. Create appropriate docker_image_repo+tag and docker_image_hash links at dst.

def copy_project(obj_uuid, src, dst, owner_uuid, args)
def copy_workflow(wf_uuid, src, dst, args)
def create_collection_from(c, src, dst, args)

Create a new collection record on dst, and copy Docker metadata if available.

def exception_handler(handler, *exc_types)

If any exc_types are raised in the block, call handler on the exception.

def filter_iter(arg)

Iterate a filter string-or-list.

Pass in a filter field that can either be a string or list. This will iterate elements as if the field had been written as a list.

def git_rev_parse(rev, repo)
def human_progress(obj_uuid, bytes_written, bytes_expected)
def machine_progress(obj_uuid, bytes_written, bytes_expected)
def main()
def migrate_repository_filter(repo_filter, src_repository, dst_repository)

Update a single repository filter in-place for the destination.

If the filter checks that the repository is src_repository, it is updated to check that the repository is dst_repository. If it does anything else, this function raises ValueError.

def migrate_script_version_filter(version_filter)

Update a single script_version filter in-place for the destination.

Currently this function checks that all the filter operands are Git commit hashes. If they're not, it raises ValueError to indicate that the filter is not portable. It could be extended to make other transformations in the future.

def select_git_url(api, repo_name, retries, allow_insecure_http, allow_insecure_http_opt)
def set_src_owner_uuid(resource, uuid, args)
def total_collection_size(manifest_text)

Return the total number of bytes in this collection (excluding duplicate blocks).

def uuid_type(api, object_uuid)
def workflow_collections(obj, locations, docker_images)

Classes

class ProgressWriter (progress_func)
Expand source code
class ProgressWriter(object):
    _progress_func = None
    outfile = sys.stderr

    def __init__(self, progress_func):
        self._progress_func = progress_func

    def report(self, obj_uuid, bytes_written, bytes_expected):
        if self._progress_func is not None:
            self.outfile.write(
                self._progress_func(obj_uuid, bytes_written, bytes_expected))

    def finish(self):
        self.outfile.write("\n")

Class variables

var outfile

Methods

def finish(self)
def report(self, obj_uuid, bytes_written, bytes_expected)