diff options
| author | ZhiQiang Fan <zhiqiang.fan@huawei.com> | 2014-12-19 11:04:36 +0800 |
|---|---|---|
| committer | ZhiQiang Fan <zhiqiang.fan@huawei.com> | 2014-12-19 11:06:42 +0800 |
| commit | dc74ae7c14af89b8371bf737b4e24468caaba198 (patch) | |
| tree | 24251a3879e3c36397ca5fa30a571a49c7d3042e /ceilometerclient/common | |
| parent | d1e659b0fb688973d460055e3f301e8d9035ee76 (diff) | |
| download | python-ceilometerclient-dc74ae7c14af89b8371bf737b4e24468caaba198.tar.gz | |
Add client property for common.base.Manager
The latest oslo-incubator.apiclient code assumes resource manager has
property named client, but ceilometerclient has named that property
to api, which will cause problem when we sync with oslo-incubator.
This patch simply uses client as an alias of api.
Change-Id: I90c5ff10309ff7ad3fb634274e16c26ec8e6a1a2
Diffstat (limited to 'ceilometerclient/common')
| -rw-r--r-- | ceilometerclient/common/base.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ceilometerclient/common/base.py b/ceilometerclient/common/base.py index 4129176..5e3fee7 100644 --- a/ceilometerclient/common/base.py +++ b/ceilometerclient/common/base.py @@ -49,6 +49,11 @@ class Manager(object): def __init__(self, api): self.api = api + @property + def client(self): + """Compatible with latest oslo-incubator.apiclient code.""" + return self.api + def _create(self, url, body): body = self.api.post(url, json=body).json() if body: |
