Add support for "friendly" image names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Glance-Simplestreams-Sync Charm |
Triaged
|
Wishlist
|
Unassigned | ||
simplestreams |
New
|
Undecided
|
Unassigned |
Bug Description
Currently the charm leads to images with names like these:
$ openstack image list -cName -fvalue | grep sync
auto-sync/
auto-sync/
auto-sync/
auto-sync/
While it is possible to manipulate the prefix ("auto-sync"), the final names are not very end-user friendly.
The image metadata that the charm creates does contain a series of fields that could be used to generate a user "friendly" name:
$ openstack image show 366bc778-
{
"aliases": "18.04,b,bionic",
"arch": "amd64",
"ftype": "disk1.img",
"label": "release",
"md5": "43cd09be7fb9d8
"os": "ubuntu",
"pubname": "ubuntu-
"release": "bionic",
"release_
"release_title": "18.04 LTS",
"sha256": "ab91b16abb1553
"size": "387776512",
"support_eol": "2023-04-26",
"supported": "True",
"version": "18.04"
}
This could be used to generate a name like "Ubuntu 20.04 LTS" by combining the "os" and "release_title" fields instead of what seems like hardcoding "pubname". It would even be usefult to just add a configuration to have "template" so this can be tailored for each cloud. No information would be lost as the details remain in the image metadata.
Changed in charm-glance-simplestreams-sync: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
> auto-sync/ ubuntu- bionic- 18.04-amd64- server- 20220523- disk1.img
This is a combination of: bionic- 18.04-amd64- server- 20220523" )
1. charm's prefix ("auto-sync/")
2. pubname ("ubuntu-
3. item_name with "-" prefix if the pubname doesn't end with item_name ("-disk1.img)
2. & 3. are from simplestreams instead of the charm.
https:/ /cloud- images. ubuntu. com/releases/ streams/ v1/com. ubuntu. cloud:released: download. json