diff --git a/tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py b/tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py index 335501ab3..eef97c338 100644 --- a/tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py +++ b/tripleoclient/tests/v1/overcloud_image/test_overcloud_image.py @@ -432,6 +432,7 @@ class TestUploadOvercloudImage(TestPluginV1): ) self.assertEqual(mock_subprocess_call.call_count, 0) + self.assertFalse(self.cmd.updated) @mock.patch('subprocess.check_call', autospec=True) def test_overcloud_create_update_images(self, mock_subprocess_call): @@ -462,6 +463,7 @@ class TestUploadOvercloudImage(TestPluginV1): self.app.client_manager.image.images.update.call_count ) self.assertEqual(mock_subprocess_call.call_count, 2) + self.assertTrue(self.cmd.updated) class TestUploadOvercloudImageFull(TestPluginV1): diff --git a/tripleoclient/v1/overcloud_image.py b/tripleoclient/v1/overcloud_image.py index 6d839b742..dfd156441 100644 --- a/tripleoclient/v1/overcloud_image.py +++ b/tripleoclient/v1/overcloud_image.py @@ -194,6 +194,7 @@ class UploadOvercloudImage(command.Command): '', image.created_at)) ) + self.updated = True return None else: print('Image "%s" already exists and can be updated' @@ -306,6 +307,7 @@ class UploadOvercloudImage(command.Command): def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) glance_client_adaptor = self._get_glance_client_adaptor() + self.updated = False if parsed_args.platform and not parsed_args.architecture: raise exceptions.CommandError('You supplied a platform (%s) ' @@ -493,3 +495,8 @@ class UploadOvercloudImage(command.Command): os.path.join(parsed_args.http_boot, 'agent.ramdisk'), parsed_args.update_existing ) + + if self.updated: + print('Some images have been updated in Glance, make sure to ' + 'rerun\n\topenstack overcloud node configure\nto reflect ' + 'the changes on the nodes')