Skip to content

Commit

Permalink
Support multiple heatclient versions for SD
Browse files Browse the repository at this point in the history
The software_deployment resources lazy loads data via the
heatclient _get() function. Not only is this function private
but the oslo-incubator recently reverted things such that
get() should once again be used for lazy loading details.

See oslo-incubator commit 04a1abe59ac39890f57d2eed57d3d1b12bb5d757

This was merged into heatclient master in:

72017c566850da589f7dc7dc275871986aadbd54

This patch makes it so that heat will work with both versions
of heatclient.

Change-Id: I1799636d39cea410b55ffe72eeecba4f4a7a0f80
Closes-bug: #1308770
(cherry picked from commit a7d7823)
  • Loading branch information
dprince authored and Gonéri Le Bouder committed Sep 2, 2014
1 parent 93f3c78 commit c1c48e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion heat/engine/resources/software_config/software_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ def _handle_action(self, action):
def _check_complete(sd):
if not sd:
return True
sd._get()
# NOTE(dprince): when lazy loading the sd attributes
# we need to support multiple versions of heatclient
if hasattr(sd, 'get'):
sd.get()
else:
sd._get()
if sd.status == SoftwareDeployment.COMPLETE:
return True
elif sd.status == SoftwareDeployment.FAILED:
Expand Down

0 comments on commit c1c48e2

Please sign in to comment.