Skip to content

Commit

Permalink
Fix stack update for Python API
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tlashchova committed Sep 19, 2014
1 parent 87bef60 commit f960906
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions heatclient/v1/stacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ def create(self, **kwargs):
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)

Expand Down

0 comments on commit f960906

Please sign in to comment.