← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1775596] [NEW] misleading message for import-image call with unknown import-method

 

Public bug reported:

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).

** Affects: glance
     Importance: Low
         Status: Triaged

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1775596

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

Status in Glance:
  Triaged

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).

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1775596/+subscriptions