[Kimchi-devel] [PATCHv6 0/4] LDAP authorization

Aline Manera alinefm at linux.vnet.ibm.com
Wed Nov 19 14:29:07 UTC 2014


The tests are failing for me:

======================================================================
FAIL: test_edit_vm (test_rest.HttpsRestTests)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "test_rest.py", line 289, in test_edit_vm
     self.assertEquals(200, resp.status)
AssertionError: 200 != 400

======================================================================
FAIL: test_edit_vm (test_rest.RestTests)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "test_rest.py", line 289, in test_edit_vm
     self.assertEquals(200, resp.status)
AssertionError: 200 != 400

----------------------------------------------------------------------
Ran 169 tests in 420.207s


[19/Nov/2014:12:27:22] HTTP
Request Headers:
   AUTHORIZATION: Basic cm9vdDpsZXRtZWluIQ==
   Content-Length: 2
   HOST: 127.0.0.1
   CONNECTION: close
   Remote-Addr: 127.0.0.1
   X-REAL-IP: 127.0.0.1
   ACCEPT: application/json
   X-FORWARDED-FOR: 127.0.0.1
   Content-Type: application/json
   ACCEPT-ENCODING: identity
[19/Nov/2014:12:27:22] HTTP Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 
656, in respond
     response.body = self.handler()
   File "/usr/lib/python2.7/site-packages/cherrypy/lib/encoding.py", 
line 188, in __call__
     self.body = self.oldhandler(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 
34, in __call__
     return self.callable(*self.args, **self.kwargs)
   File "/home/alinefm/kimchi/src/kimchi/control/base.py", line 325, in 
index
     return self.get(filter_params)
   File "/home/alinefm/kimchi/src/kimchi/control/users.py", line 34, in get
     res_list = get_list(*self.model_args, **filter_params)
   File "/home/alinefm/kimchi/src/kimchi/model/users.py", line 35, in 
get_list
     return self.user._get_list(**args)
AttributeError: 'UsersModel' object has no attribute 'user'


On 11/19/2014 09:59 AM, lvroyce0210 at gmail.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
>
> v1>v4, split user and group and be compatible to previous access tagging
> v5>v6, Update testcases.
>
> Royce Lv (4):
>    Split users and groups for permission query
>    Move validation to authorizaiton
>    change vm permission tag
>    Update test model for authentication and authorization
>
>   docs/API.md                  | 19 ++++++----
>   src/kimchi/control/groups.py | 28 ++++++++++++++
>   src/kimchi/control/host.py   | 14 -------
>   src/kimchi/control/users.py  | 35 +++++++++++++++++
>   src/kimchi/i18n.py           |  1 +
>   src/kimchi/mockmodel.py      |  4 ++
>   src/kimchi/model/groups.py   | 67 +++++++++++++++++++++++++++++++++
>   src/kimchi/model/host.py     | 19 ----------
>   src/kimchi/model/users.py    | 90 ++++++++++++++++++++++++++++++++++++++++++++
>   src/kimchi/model/vms.py      | 65 ++++++++++++++++++++------------
>   tests/test_authorization.py  |  3 +-
>   tests/test_model.py          |  3 +-
>   tests/test_rest.py           |  4 +-
>   tests/utils.py               |  3 +-
>   14 files changed, 284 insertions(+), 71 deletions(-)
>   create mode 100644 src/kimchi/control/groups.py
>   create mode 100644 src/kimchi/control/users.py
>   create mode 100644 src/kimchi/model/groups.py
>   create mode 100644 src/kimchi/model/users.py
>




More information about the Kimchi-devel mailing list