From 881affd78d4d4fde87c3300c6e1c7d2e565d33d4 Mon Sep 17 00:00:00 2001 From: Tyler Smith Date: Tue, 9 Oct 2018 15:49:11 -0400 Subject: [PATCH] Computes cannot be added in Horizon in Virtual Duplex Environment Changing the system type checking in add/edit host workflow Change-Id: I8b1e9aa1545625c5fcd0ee54678e88cdced4273a Closes-bug: 1795505 Signed-off-by: Tyler Smith --- starlingx-dashboard/centos/build_srpm.data | 2 +- .../dashboards/admin/inventory/workflows.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/starlingx-dashboard/centos/build_srpm.data b/starlingx-dashboard/centos/build_srpm.data index dc85fff0..4576bc1d 100644 --- a/starlingx-dashboard/centos/build_srpm.data +++ b/starlingx-dashboard/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="starlingx-dashboard" -TIS_PATCH_VER=15 +TIS_PATCH_VER=16 diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/workflows.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/workflows.py index 076e7c33..80fe4201 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/workflows.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/workflows.py @@ -197,13 +197,12 @@ class AddHostInfoAction(workflows.Action): self.fields['personality'].choices = \ PERSONALITY_CHOICES_WITHOUT_STORAGE - # All-in-one system, personality can only be controller. + # All-in-one system, personality can be controller or compute. systems = stx_api.sysinv.system_list(request) system_type = systems[0].to_dict().get('system_type') if system_type == constants.TS_AIO: self.fields['personality'].choices = \ - PERSONALITY_CHOICE_CONTROLLER - self.fields['personality'].widget.attrs['disabled'] = 'disabled' + PERSONALITY_CHOICES_WITHOUT_STORAGE # Remove compute personality if in DC mode and region if getattr(self.request.user, 'services_region', None) == 'RegionOne' \ @@ -294,14 +293,13 @@ class UpdateHostInfoAction(workflows.Action): self.fields['personality'].choices = \ PERSONALITY_CHOICES_WITHOUT_STORAGE - # All-in-one system, personality can only be controller. + # All-in-one system, personality can only be controller or compute. systems = stx_api.sysinv.system_list(request) self.system_mode = systems[0].to_dict().get('system_mode') self.system_type = systems[0].to_dict().get('system_type') if self.system_type == constants.TS_AIO: self.fields['personality'].choices = \ - PERSONALITY_CHOICE_CONTROLLER - self.fields['personality'].widget.attrs['disabled'] = 'disabled' + PERSONALITY_CHOICES_WITHOUT_STORAGE # Remove compute personality if in DC mode and region if getattr(self.request.user, 'services_region', None) == 'RegionOne' \