diff --git a/senlinclient/v1/models.py b/senlinclient/v1/models.py index 0735a08..bb86ee3 100644 --- a/senlinclient/v1/models.py +++ b/senlinclient/v1/models.py @@ -282,8 +282,8 @@ class Cluster(resource.Resource): def action(self, session, body): url = utils.urljoin(self.base_path, self.id, 'action') - resp = session.put(url, service=self.service, json=body).body - return resp + resp = session.put(url, endpoint_filter=self.service, json=body) + return resp.json() def add_nodes(self, session, nodes): body = { @@ -504,8 +504,8 @@ class Node(resource.Resource): def action(self, session, body): url = utils.urljoin(self.base_path, self.id, 'action') - resp = session.put(url, service=self.service, json=body).body - return resp + resp = session.put(url, endpoint_filter=self.service, json=body) + return resp.json() def join(self, session, cluster_id): body = {