Previously, there were a string of commits to keystone that addresed ignored
hacking checks. This commit does the same for H405 in keystoneauth. This
also modifies our tox.ini so that we no longer ignore H405 violations.
Change-Id: I0ac1165f309edd486639e2729c18330b1d062eb3
Closes-Bug: 1482773
Using a mutable type implies that it's acceptable for the set of
publicly-accessible attributes to be mutated at runtime, which defeats
their intended purpose of documenting the public interface. Tuples are
immutable.
Change-Id: Ib3ab93224ba240040b08ece481ef5ba620c3f658
When we are missing a required option we should use option.dest rather
then option.name so a user is presented with the correct value to use
(otherwise we say auth-url is missing when auth_url is what we actually
wanted, for example).
Change-Id: Ie1d72f6969bfcebdf94619158eb94ccac3bc75ba
For v3 if you provide project_name or user_name without the
corresponding id it is going to fail. To get around this OSC and OCC
have been doing pre plugin loading validation checks.
Now that loading is separate from the plugin itself it makes sense that
we can enforce certain requirements on plugin loaders such that only
valid configurations may be loaded.
Change-Id: Ife6ff07214d702d76ce8b1d0e87f60f732aa0230
Change options requirement testing so that it is performed on the base
load_from_options method. This will mean it gets shared between all
loading mechanisms.
I removed the verify_auth function because it is a bit too specific to
the OSC/OCC case. auth_type is not something that is part of
keystoneauth. I also modified the exception as it should no longer take
the plugin name as this would be knowledge any calling function has.
OSC/OCC could use this function to implement a higher level error
message, but I think it should be keystoneauth's responsibility to
validate auth plugins and they should just offload the options.
Change-Id: I1531b95562382e955fab44d01e7ba705d26d352f
In https://review.openstack.org/#/c/212670/ there was some
discussion about cleaning up these exception messages. Here
it is.
Change-Id: I6bf1d7351f5fd90451f6d0d7c7e2575e584cbc62
Processing a parameter dict and extracting the declared parameters for
the given auth plugin is clearly in the problem domain of keystoneauth.
It's also just simple data transformations. Move it here.
Change-Id: I6da32fee4061ab31207cb06503ec78bb45629fb2
Currently, the exceptions are nothing if converted to strings.
The doc strings are human reable and useful to users, so use them.
Before:
$ python examples/connection.py
ERROR: Exception raised:
$
After:
$ python examples/connection.py
ERROR: Exception raised: Could not find requested endpoint in Service Catalog.
$
Change-Id: I1300e411c93bdfb17975e4f61e925b5b6474434c
Conver from the keystoneauth namespace to keystoneauth1. This is to
ensure that is is possible to install all versions of keystoneauth
side-by-side.
Change-Id: Ibbaf11525980c8edb5968d8b8ee19c55094e77d8