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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user