Description
As a user wanting to make use of resources packaged within OCM, I want to use the ocm download resource command to fetch them and interact with them outside of OCM.
The command downloads a specific resource from a component version located in an OCM-compliant repository (local or remote).
Scope:
- Selects a component version: You specify a component version (e.g., ghcr.io/org/component:v1) as a positional argument. This reference is resolved using the plugin and credential systems to locate the component in a repository.
- Identifies the desired resource: You must pass
--identity name=example to uniquely identify which resource to download from the component's list of resources.
- Downloads the resource: If the resource has local access, it's downloaded directly.
- If it's remote, the appropriate plugin is used along with any needed credentials to download it.
- Writes the resource to disk:
- If
--output is specified, the file is saved there.
- If not, it attempts to generate a filename based on the identity and the media type (e.g., adding .tar.gz if applicable).
(Optional) Supports transforming the resource:
If --transformer is specified, the command would ideally use a plugin-based transformation before writing the output (not yet implemented — marked as TODO until we have the transformer contract implemented).
Out of Scope:
--check-verified, --verified, --verify (until we have Signing and Verification implemented in #446)
-c, --constraints, --latest version constraint (we restrict to one component version reference)
-d, --download-handlers, --downloader (replaced by transformer)
-x, --executable (out-scoped due to lack of demand)
--lookup stringArray (replaced by resolver concept)
-O, --outfile string output file or directory
-r, --recursive (no recursion needed for this command)
--repo string (replaced by component reference)
-t, --type stringArray (replaced by identity filter)
Done Criteria
Description
As a user wanting to make use of resources packaged within OCM, I want to use the
ocm download resourcecommand to fetch them and interact with them outside of OCM.The command downloads a specific resource from a component version located in an OCM-compliant repository (local or remote).
Scope:
--identity name=exampleto uniquely identify which resource to download from the component's list of resources.--outputis specified, the file is saved there.(Optional) Supports transforming the resource:
If --transformer is specified, the command would ideally use a plugin-based transformation before writing the output (not yet implemented — marked as TODO until we have the transformer contract implemented).
Out of Scope:
--check-verified, --verified, --verify (until we have Signing and Verification implemented in #446)
-c, --constraints, --latest version constraint (we restrict to one component version reference)
-d, --download-handlers, --downloader (replaced by transformer)
-x, --executable (out-scoped due to lack of demand)
--lookup stringArray (replaced by resolver concept)
-O, --outfile string output file or directory
-r, --recursive (no recursion needed for this command)
--repo string (replaced by component reference)
-t, --type stringArray (replaced by identity filter)
Done Criteria