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
This commit is contained in:
parent
a578588167
commit
a7d7823950
@ -225,6 +225,11 @@ class SoftwareDeployment(signal_responder.SignalResponder):
|
|||||||
def _check_complete(sd):
|
def _check_complete(sd):
|
||||||
if not sd:
|
if not sd:
|
||||||
return True
|
return True
|
||||||
|
# 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()
|
sd._get()
|
||||||
if sd.status == SoftwareDeployment.COMPLETE:
|
if sd.status == SoftwareDeployment.COMPLETE:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user