When the docs are rendered to HTML, any docs on __init__ are not
displayed. The parameters to the constructor have to be documented on
the class rather than on the __init__ method.
Also, corrected other minor issues in the same areas.
Change-Id: Ic56da33f6b99fe5efb636c289e3c4e1569f0c84c
Apart from making keystoneclient follow the same patterns of using an
adapter that we are trying to push onto other clients this severs the
cyclical dependency between managers and the client object.
There are a few changes that have had to be rolled into one to make the
transition work. These can't be separated unfortunately as they are
interdependent.
* managers are now passed the adapter instead of the client. They
therefore don't have reference to the other managers on the client.
* The adapter has been subclassed to provide user_id as there are some
managers that require user_id be provided for changing passwords etc.
* client.auth_url has been replaced with a call to get_endpoint which is
supported by the adapter.
* management=True has been removed from all the managers and they now
correctly set the interface they want.
Change-Id: I49fbd50571f0c1484e1cbc3dcb2159d25b21b1bc
Keystoneclient didn't provide translated messages. With this
change, the messages are marked for translation.
DocImpact
Implements: blueprint keystoneclient-i18n
Change-Id: I85263a71671a1dffed524185266e6bb7ae559630
Creating a client with a session using an Unscoped tokens now sets auth
info in client. This Auth Info is necessary in order to enumerate
projects. This is the standard login path for Horizon.
Change-Id: I688a27cd0e7c98e7cf899ac65bb593a85171813f
Add the ability to turn off logging from the session object and then
handle logging of auth requests within their own sections. This is a
very simplistic ability to completely disable logging. Logging more
filtered debugging can be added later.
This new ability is utilized in this patch to prevent logging of
requests that include passwords. This covers authenticate, password
change, and user update requests that include passwords.
SecurityImpact
Change-Id: I3dabb94ab047e86b8730e73416c1a1c333688489
Closes-Bug: #1004114
Closes-Bug: #1327019
Resource managers may need to pass certain overrides down to the session
layer. The most common example would be to allow them to specify a
different interface to issue a request to than is common. It is possible
later that we may wish to expose this ability to users as well so that
they can choose in there own programs what interface, endpoint name etc
a particular request should be issued to.
Change-Id: I7ee0931d4ea78cf9f463b2f0b54457226c5bea8d
Most methods of Resource class from keystoneclient are similar to methods
from common code.
In the process of unification of the clients code we should
reuse common functionality from Oslo.
Related to blueprint common-client-library-2
Change-Id: I5858eec1596a6921dcf49dfcefb7abd4387de73b
We don't need vim modelines in each source file, it can be set in
user's vimrc.
Change-Id: Ic7a61430a0a320ce6b0c4518d9f5d988e35f8aae
Closes-Bug: #1229324
In Python 3, dict.items() returns 'a dict_item'. Iterating over it while
deleting some of the dictionary elements is forbidden. We have to iterate over
a list to avoid getting this error:
RuntimeError: dictionary changed size during iteration
Change-Id: I43401e6eb9a31148fda4677644bf99e1b739d0dd
The way to using metaclass has changed in Python3.
Python 2.7 way:
class Foo(object):
__metaclass__ = FooMeta
Python 3 way:
class Foo(object, metaclass=FooMeta):
...
The six.add_metaclass() decorator allows us to use one syntax that
works for both Python 2.7 and Python 3.
Change-Id: I08703a8b2927f45f4705fe085368d1ebd78b02fa
Closes-Bug: #1236648
Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.
NOTE: tools/install_venv.py is not touched, should sync with oslo
Change-Id: I01d4f6b64cf1a152c4e190407799ce7d53de845f
Fixes-Bug: #1214176
Python3 changed the behavior of dict.keys such that it is now
returns a dict_keys object, which is iterable but not indexable.
You can get the python2 result back with an explicit call to list.
Change-Id: Ic504d3929398aa82ac87d1735cf4cedea2dfc5d1
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Main changes:
* deprecate api variable in favour of client
* add documentation
* use to_slug from oslo strutils
* remove Python 2.4 support
* other small fixes from novaclient
Change-Id: Ife54fd3207798ee03101a48bc1cda3b3f62cc5e4
Make build_url extract used parameters from keyword arguments so they
are not sent as the body to create, or as query parameters.
Allow specifying a class level base_url that is used unless one is
specifically provided.
Break filtering function into a decorator as it seems the perfect
usecase and it prevents a dictionary copy.
Fixes: bug 1198772
Change-Id: I6d370ed504c300b9997199f351322e3083650c69
Add a find() methods to CrudManager to maintain compatability
with existing CLI lookups using utils.find_resource().
Change-Id: Ia9b38b975bb88fb361f3471b66f98c7e81bbc6de
ManagerWithFind requires list() method in its descendants.
Make it abstract and fix its improper descendant TokenManager
that do not implement list().
Change-Id: I83ae47d894c02d5cd1eb0da437dd05796d0b0160
Fixes: bug #1180393
Instead of implementing token retrieval twice, let's use the code provided
by the TokenManger to get a token in raw format from Keystone.
Change-Id: I769be118ee137580cabd5cabcf7843e7afe1e456
Signed-off-by: Julien Danjou <julien@danjou.info>
* Implement correct certificate verification
* Add requests to tools/pip-requires
* Fix OS_CACERT env var help text
* Add info to README
* Rework tests to use requests
Pinned requests module to < 1.0 as 1.0.2 is now current in pipi
as of 17Dec2012.
Change-Id: I120d2c12d6f20ebe2fd7182ec8988cc73f623b80
removes setting loaded=True on resource loads where it hasn't been fully
loaded - breaking keystone master tests
Change-Id: I889782d605637f7d5bbd2462d1a2dfb1574e4624
- 204 No Content should be mocked with empty response bodies
- Content-Type headers should not be mocked with empty response bodies
- httplib2 would never return None as a response body
- The Identity API never expects a req/resp body with a string value of "null"
Change-Id: Ie22e8e5288573268165ed06049978195955f8ca6
1. Fixes the url for user update methods to reflect extension status,
e.g. 'users/{user_id}/tenant' to 'users/{user_id}/OS-KSADM/tenant',
as per Keystone API.
2. Fixes the update_user method, as it expects a POST instead of PUT.
Change-Id: I045ca7650b2ef8969af695900da1b4f62d4da6bd
Also adds pep8 to requirements since it was missing, and adds the
automatically-created venv to the gitignore list.
Change-Id: Iafa05c1889d7706b79d0f9392a9ac24f2f5a1719