Fix action api calls
This is a patch to adapt the client side invocation regarding the 'action' apis. Change-Id: Ie234f09be736551a31d77f7a43c3973237616459 Depends-On: Ifa5d57a8d1a6f96f535f95a376726b1a8c066630
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user