diff --git a/heat/engine/resources/openstack/heat/software_deployment.py b/heat/engine/resources/openstack/heat/software_deployment.py index 6c84e1f0e5..9af8eaf856 100644 --- a/heat/engine/resources/openstack/heat/software_deployment.py +++ b/heat/engine/resources/openstack/heat/software_deployment.py @@ -287,8 +287,8 @@ class SoftwareDeployment(signal_responder.SignalResponder): return sd def _check_complete(self): - sd = self.rpc_client().check_software_deployment( - self.context, self.resource_id, self.stack.time_remaining()) + sd = self.rpc_client().show_software_deployment( + self.context, self.resource_id) status = sd[rpc_api.SOFTWARE_DEPLOYMENT_STATUS] if status == SoftwareDeployment.COMPLETE: return True diff --git a/heat/tests/openstack/heat/test_software_deployment.py b/heat/tests/openstack/heat/test_software_deployment.py index 8c238809a7..80004eb5ef 100644 --- a/heat/tests/openstack/heat/test_software_deployment.py +++ b/heat/tests/openstack/heat/test_software_deployment.py @@ -18,8 +18,6 @@ import uuid import mock import six -from oslo_utils import timeutils - from heat.common import exception as exc from heat.common.i18n import _ from heat.engine.clients.os import nova @@ -170,7 +168,6 @@ class SoftwareDeploymentTest(common.HeatTestCase): stack_user_project_id='65728b74-cfe7-4f17-9c15-11d4f686e591', cache_data=cache_data ) - self.stack.created_time = timeutils.utcnow() self.patchobject(nova.NovaClientPlugin, 'get_server', return_value=mock.MagicMock()) @@ -549,7 +546,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): def test_check_create_complete(self): self._create_stack(self.template) sd = self.mock_deployment() - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd sd['status'] = self.deployment.COMPLETE self.assertTrue(self.deployment.check_create_complete(sd)) @@ -563,7 +560,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): def test_check_update_complete(self): self._create_stack(self.template) sd = self.mock_deployment() - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd sd['status'] = self.deployment.COMPLETE self.assertTrue(self.deployment.check_update_complete(sd)) @@ -578,7 +575,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): def test_check_suspend_complete(self): self._create_stack(self.template) sd = self.mock_deployment() - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd sd['status'] = self.deployment.COMPLETE self.assertTrue(self.deployment.check_suspend_complete(sd)) @@ -593,7 +590,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): def test_check_resume_complete(self): self._create_stack(self.template) sd = self.mock_deployment() - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd sd['status'] = self.deployment.COMPLETE self.assertTrue(self.deployment.check_resume_complete(sd)) @@ -611,7 +608,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): 'status': self.deployment.FAILED, 'status_reason': 'something wrong' } - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd err = self.assertRaises( exc.Error, self.deployment.check_create_complete, sd) self.assertEqual( @@ -644,7 +641,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): self.deployment.resource_id = 'c8a19429-7fde-47ea-a42f-40045488226c' - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd self.rpc_client.update_software_deployment.return_value = sd self.assertEqual(sd, self.deployment.handle_delete()) self.assertEqual({ @@ -751,7 +748,7 @@ class SoftwareDeploymentTest(common.HeatTestCase): derived_sc = self.mock_derived_software_config() sd = self.mock_deployment() - self.rpc_client.check_software_deployment.return_value = sd + self.rpc_client.show_software_deployment.return_value = sd self.deployment.resource_id = 'c8a19429-7fde-47ea-a42f-40045488226c' # first, handle the suspend