Revision da04c447 lib/server/rapi.py
b/lib/server/rapi.py | ||
---|---|---|
71 | 71 |
""" |
72 | 72 |
AUTH_REALM = "Ganeti Remote API" |
73 | 73 |
|
74 |
def __init__(self): |
|
74 |
def __init__(self, _client_cls=None):
|
|
75 | 75 |
# pylint: disable=W0233 |
76 | 76 |
# it seems pylint doesn't see the second parent class there |
77 | 77 |
http.server.HttpServerHandler.__init__(self) |
78 | 78 |
http.auth.HttpServerRequestAuthentication.__init__(self) |
79 |
self._client_cls = _client_cls |
|
79 | 80 |
self._resmap = connector.Mapper() |
80 | 81 |
self._users = None |
81 | 82 |
|
... | ... | |
132 | 133 |
self._resmap.getController(req.request_path) |
133 | 134 |
|
134 | 135 |
ctx = RemoteApiRequestContext() |
135 |
ctx.handler = HandlerClass(items, args, req) |
|
136 |
ctx.handler = HandlerClass(items, args, req, _client_cls=self._client_cls)
|
|
136 | 137 |
|
137 | 138 |
method = req.request_method.upper() |
138 | 139 |
try: |
Also available in: Unified diff