From 08775d2320268c094f16bf8abd1e2f2604cee154 Mon Sep 17 00:00:00 2001 From: tengqm Date: Thu, 26 Nov 2015 05:02:31 -0500 Subject: [PATCH] Fix 'action' call on cluster/node objects The recent migration to keystoneauth1 in SDK has created problems more than just a single problem. This patch fixes the 'action' calls. Change-Id: I8b16a860a5fe4db84c31158a2e673cfaaa2707a6 Closes-Bug: #1520153 Related-Bug: #1519192 --- senlinclient/v1/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 = {