misleading message for import-image call with unknown import-method

Bug #1775596 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Triaged
Low
Khuong Luu

Bug Description

The function glance.api.v2.images.ImageController._validate_import_body checks the import method specified in the body of the request against the list of configured enabled_import_methods, and if it isn't found returns the message: "Unknown import method name '%s'." This is a bit misleading because, for example, if the operator has decided not to allow the glance-direct method, it's not really an unknown method, it's just not enabled at that site.

An improvement would be something like: "Import method '%s' is not supported at this site."

It might be overengineering to define a list of KNOWN_IMPORT_METHODS = ['glance-direct', 'web-download'] and then give the "not supported message" for those and the "unknown" message for any others (unless we already have a list like that somewhere that we're already maintaining).

Changed in glance:
assignee: nobody → Khuong Luu (organic-doge)
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.