From f960906c600f4da169b96684d424b0edc9460507 Mon Sep 17 00:00:00 2001 From: Tetyana Lashchova Date: Fri, 19 Sep 2014 12:17:38 +0300 Subject: [PATCH] Fix stack update for Python API Change I30a2b223d7dd19a717ed989b419b1e6cb2ac143b introduced 'existing' keyword to stack-udpate command that became effectively required argument to stack.update method of the client's Python API, breaking backward compatibility. Change-Id: Icda3313805c29ab36773a4edc8c9f8c874b71ca3 Closes-Bug: #1371167 --- heatclient/v1/stacks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/heatclient/v1/stacks.py b/heatclient/v1/stacks.py index a9ca3091..fae6e9e2 100644 --- a/heatclient/v1/stacks.py +++ b/heatclient/v1/stacks.py @@ -122,8 +122,7 @@ class StackManager(base.BaseManager): def update(self, stack_id, **kwargs): """Update a stack.""" headers = self.client.credentials_headers() - method = 'PATCH' if kwargs['existing'] else 'PUT' - del kwargs['existing'] + method = 'PATCH' if kwargs.pop('existing', None) else 'PUT' resp, body = self.client.json_request(method, '/stacks/%s' % stack_id, data=kwargs, headers=headers)