Added correct response model to get_limits method in limits_api
Previously the get_limits method in the limits_api client was attempting to deserialize the limit for a get limits request using the Limits model. However this was unsuccessful in deserializing the body of the get limits request. Using the TenantLimits response model this method is now capable of successfully deserializing get limit responses. - Changed import from Limits to TenantLimits - Changed response type from Limits to TenantLimits in the get_limits method - Updated copyright date - Updated docstring to reflect changes Change-Id: I818e9796444021f8ae4928d361baf1c7fb505d00
This commit is contained in:
parent
ece6929115
commit
0bb1276af9
@ -1,5 +1,5 @@
|
||||
"""
|
||||
Copyright 2013 Rackspace
|
||||
Copyright 2015 Rackspace
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -15,7 +15,7 @@ limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.engine.http.client import AutoMarshallingHTTPClient
|
||||
from cloudcafe.compute.limits_api.models.limit import Limits
|
||||
from cloudcafe.compute.limits_api.models.limit import TenantLimits
|
||||
|
||||
|
||||
class LimitsClient(AutoMarshallingHTTPClient):
|
||||
@ -50,11 +50,11 @@ class LimitsClient(AutoMarshallingHTTPClient):
|
||||
the framework
|
||||
@type requestslib_kwargs:dict
|
||||
@return: limit_response
|
||||
@rtype: Limits Response Domain Object
|
||||
@rtype: TenantLimits Response Domain Object
|
||||
"""
|
||||
url = '{base_url}/limits'.format(base_url=self.url)
|
||||
limit_response = self.request('GET', url,
|
||||
response_entity_type=Limits,
|
||||
response_entity_type=TenantLimits,
|
||||
requestslib_kwargs=requestslib_kwargs)
|
||||
return limit_response
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user