Collect auth args in a more organized way
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:/
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:/
Referring back to my comment on the base changeset, we could remove this loop if we defined an AuthArgumentCon
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.
summary: |
- Collect auth args in a more oganized way + Collect auth args in a more organized way |
Changed in unifiedsdk: | |
status: | New → Invalid |
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)?