Collect auth args in a more organized way

Bug #1377424 reported by Terry Howe
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Invalid
Undecided
Unassigned

Bug Description

Use a special class or at least list of valid arguments to collect authorization arguments. I think this is taken care of in the current pipe, but I'd like to track this here. Doug's first comment in what is throw away code:

https://review.openstack.org/#/c/118679/7/openstack/auth/identity/authenticator.py

    The rest of this looks like it wants to be a loop.
      args.update( (n, v) for (n, v) in [('project_name', project_name),...] if v )
    It might also just make sense to define a little class to be a container for auth args. It wouldn't do anything except define which
    args are valid anywhere at all, and would let us pass a single thing around instead of a bunch of **kwds.

Later he suggests using a special class:

https://review.openstack.org/#/c/119628/4/openstack/auth/identity/authenticator.py

     Referring back to my comment on the base changeset, we could remove this loop if we defined an AuthArgumentContainer class
     that always held all of the arguments. I'm a little worried we can end up with a call to a plugin here that doesn't pass a required
     argument, though I guess we can mitigate that risk by always having the plugins define default values for their arguments.

This authenticator.py method is throw away code.

Ian Cordasco (icordasc)
summary: - Collect auth args in a more oganized way
+ Collect auth args in a more organized way
Revision history for this message
Terry Howe (thowe-g) wrote :

From Doug:

We need, somewhere, to have a list of the arg names. Is the idea that the developer would look at the plugin documentation to see which names to use? Are we going to allow different plugins to use the same name for different purposes, or different names for the same purpose (some generic arg names like "verify" or "url" might have multiple meanings)?

Revision history for this message
Terry Howe (thowe-g) wrote :
Terry Howe (thowe-g)
Changed in unifiedsdk:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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