Package arvados :: Package commands :: Module keepdocker
[hide private]
[frames] | no frames]

Module keepdocker

source code

Classes [hide private]
  DockerError
Functions [hide private]
 
popen_docker(cmd, *args, **kwargs) source code
 
check_docker(proc, description) source code
 
docker_image_format(image_hash)
Return the registry format ('v1' or 'v2') of the given image.
source code
 
docker_image_compatible(api, image_hash) source code
 
docker_images() source code
 
find_image_hashes(image_search, image_tag=None) source code
 
find_one_image_hash(image_search, image_tag=None) source code
 
stat_cache_name(image_file) source code
 
pull_image(image_name, image_tag) source code
 
save_image(image_hash, image_file) source code
 
get_cache_dir() source code
 
prep_image_file(filename) source code
 
make_link(api_client, num_retries, link_class, link_name, **link_attrs) source code
 
docker_link_sort_key(link)
Build a sort key to find the latest available Docker image.
source code
 
_get_docker_links(api_client, num_retries, **kwargs) source code
 
_new_image_listing(link, dockerhash, repo='<none>', tag='<none>') source code
 
list_images_in_arv(api_client, num_retries, image_name=None, image_tag=None)
List all Docker images known to the api_client with image_name and image_tag.
source code
 
items_owned_by(owner_uuid, arv_items) source code
 
_uuid2pdh(api, uuid) source code
 
main(arguments=None, stdout=sys.stdout, install_sig_handlers=True, api=None) source code
Variables [hide private]
  logger = logging.getLogger('arvados.keepdocker')
  EARLIEST_DATETIME = datetime.datetime(datetime.MINYEAR, 1, 1, ...
  STAT_CACHE_ERRORS = IOError, OSError, ValueError
  DockerImage = collections.namedtuple('DockerImage', ['repo', '...
  keepdocker_parser = argparse.ArgumentParser(add_help= False)
  _group = keepdocker_parser.add_mutually_exclusive_group()
  arg_parser = argparse.ArgumentParser(description= "Upload or l...
Function Details [hide private]

docker_link_sort_key(link)

source code 

Build a sort key to find the latest available Docker image.

To find one source collection for a Docker image referenced by name or image id, the API server looks for a link with the most recent `image_timestamp` property; then the most recent `created_at` timestamp. This method generates a sort key for Docker metadata links to sort them from least to most preferred.

list_images_in_arv(api_client, num_retries, image_name=None, image_tag=None)

source code 

List all Docker images known to the api_client with image_name and image_tag. If no image_name is given, defaults to listing all Docker images.

Returns a list of tuples representing matching Docker images, sorted in preference order (i.e. the first collection in the list is the one that the API server would use). Each tuple is a (collection_uuid, collection_info) pair, where collection_info is a dict with fields "dockerhash", "repo", "tag", and "timestamp".


Variables Details [hide private]

EARLIEST_DATETIME

Value:
datetime.datetime(datetime.MINYEAR, 1, 1, 0, 0, 0)

DockerImage

Value:
collections.namedtuple('DockerImage', ['repo', 'tag', 'hash', 'created\
', 'vsize'])

arg_parser

Value:
argparse.ArgumentParser(description= "Upload or list Docker images in \
Arvados", parents= [keepdocker_parser, arv_put.run_opts, arv_cmd.retry\
_opt])