Command-line Documentation

jujuresources.cli.fetch(opts)

usage: juju-resources fetch [-h] [-v] [-f] [-q] [-a] [-u MIRROR_URL] [-d OUTPUT_DIR] [-r RESOURCES] [resource_names [resource_names ...]]

Create a local mirror of one or more resources.

Parameters:
  • resource_names – Names of specific resources to fetch (defaults to all required, or all if –all is given)
  • --verbose (-v) – Write download error information to stderr
  • --force (-f) – Force re-download of valid resources
  • --quiet (-q) – Suppress output and only set the return code
  • --all (-a) – Include all optional resources as well as required
  • --mirror-url (-u) – URL at which the resources are mirrored
  • --output-dir (-d) – Directory to place the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)
jujuresources.cli.install(opts)

usage: juju-resources install [-h] [-s] [-D DESTINATION] [-q] [-a] [-u MIRROR_URL] [-d OUTPUT_DIR] [-r RESOURCES] [resource_names [resource_names ...]]

Install one or more resources.

Parameters:
  • resource_names – Names of specific resources to verify (defaults to all required, or all if –all is given)
  • --skip-top-level (-s) – Skip top-level members of archives, and extract children directly to destination
  • --destination (-D) – Destination for archive or file resources to be installed to
  • --quiet (-q) – Suppress output and only set the return code
  • --all (-a) – Include all optional resources as well as required
  • --mirror-url (-u) – URL at which the resources are mirrored
  • --output-dir (-d) – Directory containing the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)
jujuresources.cli.resource_path(opts)

usage: juju-resources resource_path [-h] [-d OUTPUT_DIR] [-r RESOURCES] resource_name

Return the full path to a named resource.

Parameters:
  • resource_name – Name of a resource
  • --output-dir (-d) – Directory containing the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)
jujuresources.cli.resource_spec(opts)

usage: juju-resources resource_spec [-h] [-d OUTPUT_DIR] [-r RESOURCES] resource_name

Return the spec (URL, package spec, file, etc) for a named resource.

Parameters:
  • resource_name – Name of a resource
  • --output-dir (-d) – Directory containing the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)
jujuresources.cli.serve(opts)

usage: juju-resources serve [-h] [-s SSL_CERT] [-p PORT] [-H HOST] [-d OUTPUT_DIR] [-r RESOURCES]

Run a light-weight HTTP server hosting previously mirrored resources

Parameters:
  • --ssl-cert (-s) – Path to an SSL certificate file (will run without SSL if not given)
  • --port (-p) – Port on which to bind the mirror server
  • --host (-H) – IP address on which to bind the mirror server
  • --output-dir (-d) – Directory containing the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)
jujuresources.cli.verify(opts)

usage: juju-resources verify [-h] [-q] [-a] [-d OUTPUT_DIR] [-r RESOURCES] [resource_names [resource_names ...]]

Verify that one or more resources were downloaded successfully.

Parameters:
  • resource_names – Names of specific resources to verify (defaults to all required, or all if –all is given)
  • --quiet (-q) – Suppress output and only set the return code
  • --all (-a) – Include all optional resources as well as required
  • --output-dir (-d) – Directory containing the fetched resources (default: ./resources/)
  • --resources (-r) – File or URL containing the YAML resource descriptions (default: ./resources.yaml)