Revision db9f7a2b

b/astakosclient/astakosclient/__init__.py
325 325

  
326 326
    # ----------------------------------
327 327
    # GET "/astakos/api/service_quotas"
328
    def get_service_quotas(self, token):
328
    def get_service_quotas(self, token, user=None):
329 329
        """Get all quotas for resources associated with the service
330 330

  
331 331
        Keyword arguments:
332 332
        token   -- service's token (string)
333
        user    -- optionally, the uuid of a specific user
333 334

  
334 335
        In case of success return a dict of dicts of dicts with current quotas
335
        for all users.
336
        for all users, or of a specified user, if user argument is set.
336 337
        Otherwise raise an AstakosClientException
337 338

  
338 339
        """
339
        return self._call_astakos(token, "/astakos/api/service_quotas")
340
        query = "/astakos/api/service_quotas"
341
        if user is not None:
342
            query += "?user=" + user
343
        return self._call_astakos(token, query)
340 344

  
341 345
    # ----------------------------------
342 346
    # POST "/astakos/api/commisions"
b/astakosclient/docs/index.rst
127 127
        current quotas (as dict of dicts).
128 128
        In case of error raise an AstakosClientException exception.
129 129

  
130
    **get_service_quotas(**\ token\ **)**
130
    **get_service_quotas(**\ token, user=None\ **)**
131 131
        Given a service's authentication token return all users'
132 132
        current quotas for the resources associated with the service
133 133
        (as dict of dicts of dicts).
134
        Optionally, one can query the quotas of a specific user with
135
        argument user=UUID.
134 136
        In case of error raise an AstakosClientException exception.
135 137

  
136 138
    **issue_commission(**\ token, request\ **)**

Also available in: Unified diff