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