mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-10-08 22:46:41 +00:00
fix(oci): gate stack recreate by replay support
This commit is contained in:
@@ -69,7 +69,7 @@ class SelectionSetupWording(TestCase):
|
|||||||
# It cannot be updated, but it can still be changed or removed.
|
# It cannot be updated, but it can still be changed or removed.
|
||||||
ui = self._stack({'members': [{'native_stack_intent': {'adapt': True}}]}, REPLAY)
|
ui = self._stack({'members': [{'native_stack_intent': {'adapt': True}}]}, REPLAY)
|
||||||
ui.choose.assert_called_once()
|
ui.choose.assert_called_once()
|
||||||
self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['recreate', 'remove'])
|
self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['modify', 'remove'])
|
||||||
|
|
||||||
def _stack(self, stack, expected):
|
def _stack(self, stack, expected):
|
||||||
record = {'stack': stack}
|
record = {'stack': stack}
|
||||||
|
|||||||
@@ -484,7 +484,8 @@ def _manage_stack(project, ui, row, action=None, lifecycle_args=()):
|
|||||||
# A stack that cannot be updated can still be removed.
|
# A stack that cannot be updated can still be removed.
|
||||||
options = [('update', translate('Update every container of the application'))] if updatable else []
|
options = [('update', translate('Update every container of the application'))] if updatable else []
|
||||||
options.append(('modify', translate('Modify extra paths and devices')))
|
options.append(('modify', translate('Modify extra paths and devices')))
|
||||||
options.append(('recreate', translate('Recreate every container with its saved configuration')))
|
if updatable:
|
||||||
|
options.append(('recreate', translate('Recreate every container with its saved configuration')))
|
||||||
options.append(('remove', translate('Remove: delete the application and its containers')))
|
options.append(('remove', translate('Remove: delete the application and its containers')))
|
||||||
action = ui.choose(translate('Manage OCI stack'), options, options[0][0])
|
action = ui.choose(translate('Manage OCI stack'), options, options[0][0])
|
||||||
if action is None:
|
if action is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user