diff --git a/doc/source/configuration/settings.rst b/doc/source/configuration/settings.rst index 466347d44b..935ba566e7 100644 --- a/doc/source/configuration/settings.rst +++ b/doc/source/configuration/settings.rst @@ -2233,6 +2233,11 @@ LAUNCH_INSTANCE_LEGACY_ENABLED The default value for this setting has been changed to ``False`` +.. deprecated:: 19.1.0(Wallaby) + + The Python Launch Instance workflow is deprecated. + Consider switching to the AngujarJS workflow instead. + Default: ``False`` This setting enables the Python Launch Instance workflow. diff --git a/openstack_dashboard/dashboards/project/instances/views.py b/openstack_dashboard/dashboards/project/instances/views.py index 8217c540fd..f767c538fa 100644 --- a/openstack_dashboard/dashboards/project/instances/views.py +++ b/openstack_dashboard/dashboards/project/instances/views.py @@ -263,6 +263,14 @@ def _swap_filter(resources, search_opts, fake_field, real_field): class LaunchInstanceView(workflows.WorkflowView): workflow_class = project_workflows.LaunchInstance + def __init__(self): + super().__init__() + LOG.warning('Django version of the launch instance form is ' + 'deprecated since Wallaby release. Switch to ' + 'the AngularJS version of the form by setting ' + 'LAUNCH_INSTANCE_NG_ENABLED to True and ' + 'LAUNCH_INSTANCE_LEGACY_ENABLED to False.') + def get_initial(self): initial = super().get_initial() initial['project_id'] = self.request.user.tenant_id diff --git a/openstack_dashboard/management/commands/upgrade_check.py b/openstack_dashboard/management/commands/upgrade_check.py index 2f0c07a946..4b6a35ae2a 100644 --- a/openstack_dashboard/management/commands/upgrade_check.py +++ b/openstack_dashboard/management/commands/upgrade_check.py @@ -299,6 +299,19 @@ def check_chinese_locale_rename(dummy): return upgradecheck.Result(upgradecheck.Code.SUCCESS) +@register_check(_("Django launch instance form")) +def check_django_launch_instance_form(dummy): + if settings.LAUNCH_INSTANCE_LEGACY_ENABLED: + return upgradecheck.Result( + upgradecheck.Code.WARNING, + _("The Django version of the launch instance form is deprecated " + "since Wallaby release. Switch to the AngularJS version of the " + "form by setting LAUNCH_INSTANCE_NG_ENABLED to True and " + "LAUNCH_INSTANCE_LEGACY_ENABLED to False.") + ) + return upgradecheck.Result(upgradecheck.Code.SUCCESS) + + class UpgradeCheckTable(upgradecheck.UpgradeCommands): _upgrade_checks = CHECKS diff --git a/releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml b/releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml new file mode 100644 index 0000000000..b73f18d61b --- /dev/null +++ b/releasenotes/notes/deprecate-django-launch-instance-form-cc176ad708e2f1f7.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - | + The Django version of the launch instance form is deprecated now. + Switch to the AngularJS version of the form by setting + ``LAUNCH_INSTANCE_NG_ENABLED`` to ``True`` and + ``LAUNCH_INSTANCE_LEGACY_ENABLED`` to ``False``. + The horizon team believes that feature gaps between Django and + AngularJS implementations have been closed and we can drop the + Django version. If you see any feature gap, please file a bug to + horizon or contact the horizon team.