Add support for "friendly" image names

Bug #1975901 reported by Jose Guedez
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Glance-Simplestreams-Sync Charm

Bug Description

Currently the charm leads to images with names like these:

$ openstack image list -cName -fvalue | grep 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-fe93-40b5-b450-47d59a20b5b3 -cproperties -fjson|jq -r '.properties.simplestreams_metadata'|jq .
  "aliases": "18.04,b,bionic",
  "arch": "amd64",
  "ftype": "disk1.img",
  "label": "release",
  "md5": "43cd09be7fb9d8d7bc1a88d6477b25c2",
  "os": "ubuntu",
  "pubname": "ubuntu-bionic-18.04-amd64-server-20220523",
  "release": "bionic",
  "release_codename": "Bionic Beaver",
  "release_title": "18.04 LTS",
  "sha256": "ab91b16abb155321530d8ca645ead67b6890a678da3c08456af40c72eb20a8ca",
  "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
Revision history for this message
Nobuto Murata (nobuto) wrote :

> auto-sync/ubuntu-bionic-18.04-amd64-server-20220523-disk1.img

This is a combination of:
1. charm's prefix ("auto-sync/")
2. pubname ("ubuntu-bionic-18.04-amd64-server-20220523")
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.

Revision history for this message
Nobuto Murata (nobuto) wrote :

By following the naming convention in the title of, a friendly name can be:
"Ubuntu 20.04 LTS (Focal Fossa) <arch> <date>" or something like that.

"{os} {release_title} ({release_codename}) {arch}"
-> ubuntu 20.04 LTS (Focal Fossa) amd64

However, there is no capital "U" for Ubuntu and there is no dedicated field for the date. Missing date may not be critical but it's confusing to have multiple images with the same name when `--max` is specified with more than 1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.