7 Commits

Author SHA1 Message Date
Jamie Lennox
0788f53fa1 Start using positional decorator
Apply the positional decorator to functions. It has been added as I
think best practice would dictate, though in some places it has been
added in a way that doesn't break existing tests.

Closes-Bug: #1295881
Change-Id: I4f7ddbede4cba4ab79d144ad1f9dc83ea76f204a
2014-03-25 14:28:23 +10:00
ZhiQiang Fan
0774d5aafa Replace OpenStack LLC with OpenStack Foundation
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
2013-10-17 01:19:01 +08:00
Kui Shi
8a036c3f76 Fix H202 assertRaises Exception
Align the hacking version between test-requirement and global requirement.

The change of H202 detection from 0.6 to 0.7 in hacking is:

-    if logical_line.startswith("self.assertRaises(Exception)"):
+    if logical_line.startswith("self.assertRaises(Exception,"):

then more cases are detected by this change. Fix the exposed H202 error.

There is a special test case:
tests/v3/test_endpoints.py:test_update_invalid_interface

ref = self.new_ref(interface=uuid.uuid4().hex)

this line can not generate proper parameter for self.manager.update,
add a parameter "endpoint" for it, according to the
definition in keystoneclient/v3/endpoints.py:EndpointManager.update.

Otherwise, there will be following error after changing the Exception
to exceptions.ValidationError:
TypeError: update() takes at least 2 arguments (6 given)

Fixes Bug #1220008

Change-Id: I8f7ed7a6eebf8576a6db5fecd86b9d19a15c8d60
2013-10-04 16:54:03 +08:00
Dolph Mathews
d2702e17c9 Remove endpoint.name attribute from v3 manager (bug 1191152)
This also provides backwards compatible support for any clients that
were specifying a name by handling it through **kwargs.

Change-Id: I49c542c52e1cdfde5fff1be46d658a805d233320
2013-06-14 15:55:53 -05:00
J. Matt Peterson
5d93e928d0 Refactor v3 API to support filtering
Fixes: bug #1175356

Future implementations of keystone API v3 will support server-side
filtering using key/value attributes. See additional details:
https://github.com/openstack/identity-api/blob/master/openstack-identity-api/src/markdown/identity-api-v3.md#list-entities-filtered-by-attribute

To support this functionality **kwargs need to be passed from the
v3 API classes to keystoneclient.base.CrudManager.list.

This is not fully implemented server-side for all attributes so it's difficult to
document exactly which attributes will work. An example of a working attribute is:
keystone.users.list(name="someone")

Change-Id: I148093fbe37700f890ed44148aa3f63f34ee5ff5
2013-05-06 15:28:39 -07:00
Dolph Mathews
62c55bc2f0 Enable/disable services/endpoints (bug 1048662)
Change-Id: I664b7f7dfa281a4481bfc37eab0948a901f1c0c5
2012-10-10 07:38:27 +00:00
Dolph Mathews
2af709ceb6 v3 Endpoint CRUD
Change-Id: Iff60668a80f8a6679a691a8f256652d7814f2785
2012-10-08 08:03:56 +00:00