Fix openstack v3 authentication#744
Conversation
|
Great, thanks! I will do a proper review later, but from a quick glance, it looks like it would be great to add some more tests to cover all the (edge) cases. |
|
@Kami I don't know how to add tests for this fix because I need to check the body of the request but all tests seems to test the reply. To test the body of the request I have to do it in |
| url=auth_url, | ||
| timeout=timeout) | ||
|
|
||
| self.auth_url = auth_url |
There was a problem hiding this comment.
(just thinking out loud)
I assume you removed those attributes since they are duplicated aka are declared again a couple of lines below, right?
|
@Kami: Now default values are specified in the method signature. |
| domain_name=domain_name, | ||
| token_scope=token_scope, | ||
| timeout=timeout, | ||
| parent_conn=parent_conn) |
There was a problem hiding this comment.
I would suggest to change that code to:
def __init__(self, *args, **kwargs):
# Docstring
super(OpenStackIdentity_3_0_Connection, self).__init__(*args, **kwargs)So the signature doesn't have to be specified twice.
But I know that kwargs are not appreciated, so tell me if you want me to do this change or not.
There was a problem hiding this comment.
@schaubl this is a clear case to use kwargs, its not that the project dictates not using kwargs but in the case where the keyword arguments can be listed they can.
this is fine as is.
|
@schaubl Thanks. I will review the changes again and if everything looks good go ahead and merge them intro trunk. |
|
Merged, thanks! |
Fix openstack v3 authentication
Description
This PR allows to define the OpenStack
domainto another value that the defaultDefault.It also adds the ability to define the
scopeof the token.With the code for the OpenStack Identity API v3, two new parameters were added:
domain_nameandtoken_scopebut it was impossible to define them to a value other than their respective default.Status
Checklist (tick everything that applies)
ICLA (required for bigger changes)