Support multiple heatclient versions for SD
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 a7d7823950
)
This commit is contained in:
parent
93f3c78a8b
commit
c1c48e201a
|
@ -225,7 +225,12 @@ class SoftwareDeployment(signal_responder.SignalResponder):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue