diff options
author | Dan Prince <dprince@redhat.com> | 2014-04-17 13:56:17 -0400 |
---|---|---|
committer | Gonéri Le Bouder <goneri.lebouder@enovance.com> | 2014-09-02 15:39:51 +0200 |
commit | c1c48e201afa07935c3af92c845ffc517719297b (patch) | |
tree | 731211b1eafebd37b109f6e16d4174b5d5b1cced | |
parent | 93f3c78a8bd9ecb79fa3d719468b371e67519969 (diff) | |
download | heat-c1c48e201afa07935c3af92c845ffc517719297b.tar.gz |
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 a7d782395084c6c16304f17d14b824028c5ba450)
-rw-r--r-- | heat/engine/resources/software_config/software_deployment.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/heat/engine/resources/software_config/software_deployment.py b/heat/engine/resources/software_config/software_deployment.py index 62c4e20a3..78bdc919d 100644 --- a/heat/engine/resources/software_config/software_deployment.py +++ b/heat/engine/resources/software_config/software_deployment.py @@ -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: |