Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements the approach to image naming schema mentioned here in #140.
Also addresses issue #152 regarding storing image architecture.
Image naming schema
Using this new image naming schema, the user can optionally provide the image version and architecture as part of the image field by using slashes as delimiters.
The schema is as mentioned in the issue above except the remote prefix is not yet implemented:
name[/version][/arch]
If version is not provided, it defaults to "1.0". Arch will default to the bravetools runtime architecture if not specified - in future it would be best to infer arch based on architecture of LXD build server/deploy server by querying the LXD server.
If the user seperately provides a value for the Service.Version field, that overrides the version in the image field.
Image file metadata (architecture and version)
The image files on disk now also contain architecture information, for example:
python-auth_1.0_amd64.tar.gz
The metadata fields are delimited by
_
and are in the same order as above:name[_version][_arch].tar.gz
This change is backwards compatible in a sense, although the new metadata fields will be set to defaults as above if they are missing. For example:
python-api-1.0.tar.gz
will be read asThis metadata (version and arch) is read and presented when running
brave images
.