From d6fcc8fe857cd2f801c5330460a5d03b85d082c0 Mon Sep 17 00:00:00 2001 From: tengqm Date: Mon, 30 Nov 2015 02:07:18 -0500 Subject: [PATCH] Fix action api calls This is a patch to adapt the client side invocation regarding the 'action' apis. Change-Id: Ie234f09be736551a31d77f7a43c3973237616459 Depends-On: Ifa5d57a8d1a6f96f535f95a376726b1a8c066630 --- 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 fc30fb34..c0f7f114 100644 --- a/senlinclient/v1/models.py +++ b/senlinclient/v1/models.py @@ -281,8 +281,8 @@ class Cluster(resource.Resource): # action = resource.prop('action') def action(self, session, body): - url = utils.urljoin(self.base_path, self.id, 'action') - resp = session.put(url, endpoint_filter=self.service, json=body) + url = utils.urljoin(self.base_path, self.id, 'actions') + resp = session.post(url, endpoint_filter=self.service, json=body) return resp.json() def add_nodes(self, session, nodes): @@ -503,8 +503,8 @@ class Node(resource.Resource): details = resource.prop('details', type=dict) def action(self, session, body): - url = utils.urljoin(self.base_path, self.id, 'action') - resp = session.put(url, endpoint_filter=self.service, json=body) + url = utils.urljoin(self.base_path, self.id, 'actions') + resp = session.post(url, endpoint_filter=self.service, json=body) return resp.json() def join(self, session, cluster_id):