5 Commits

Author SHA1 Message Date
Dean Troyer
3fdc5b16e4 Include OSC additions
OSC has some additions to OSC_Config that we need to include:
* A fix for bug 1642301 in _auth_default_domain()
* The addition of _validate_auth_ksc() and _validate_auth() that
  include current OSC needs.  These need to be migrated into os-client-config
  in a compatible manner...

Change-Id: I21a6ba3682ef97146db977270315c74c12d7b3b5
2017-01-04 11:54:23 -06:00
Jesse Keating
fe8b2a798d Avoid string actions on non-string objects
When config is coming from a clouds.yaml file, Python's yaml parser may
turn the version into an int if it is not quoted in the yaml. Ensure
that we set the value to a string before interacting with it.

Also fix a possible string action on a None object.

Change-Id: Ibf02a85d89c95ba76688b3f5c417f861173008d5
Closes-Bug: #1634986
2016-10-19 11:10:39 -07:00
Alvaro Lopez Garcia
a4d952cd4c Do not add user domain options if not needed
user_domain_id or user_domain_name are only needed in some plugins
(namely v3password and v3totp). Adding defaults for them cause
failures in auth plugins that do not accept these keyword arguments.

Closes-bug: #1610911
Change-Id: Ic43b4a0d807697cd93e50b9f15c94471e2aea8f9
2016-08-09 00:09:23 +02:00
Dean Troyer
b1022ac336 Fix v2 auth with v3 args present
The translation of the auth arg handling workarounds from OSC missed
a detail in the differences between OSC's option Namespace and
os-client-config's config dict: the auth args are in a 'auth' sub-dict.

Also expanded some of the testing to catch more edge cases.

Closes-Bug: 1603479
Change-Id: I80bb42992a1a93857be4c6367405df645780a33d
2016-07-15 11:04:11 -05:00
Dean Troyer
7084903ec5 Add OSC_Config os-client-config subclass
This begins the shift of auth plugin loading to os-client-config
out of ClientManager. A follow-up will make the changes to ClietManager
and OpenStackShell to make this the default.

* replace auth.select_auth_plugin() and auth.build_auth_params()
* move argument magic from ClientManager.setup_auth()

Change-Id: I2d8112f198fd0d716888cac591dee67138a25123
2016-06-23 11:36:41 -05:00