From 4da5b2a86865fa4cbf55e82d234e9ecdd90f140e Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Wed, 12 Dec 2018 10:00:36 -0500 Subject: [PATCH] Change compute node to worker node personality Update misc compute references to worker Change VM huge pages to application huge pages Tests Performed: Non-containerized deployment AIO-SX: Sanity and Nightly automated test suite AIO-DX: Sanity and Nightly automated test suite 2+2 System: Sanity and Nightly automated test suite 2+2 System: Horizon Patch Orchestration Kubernetes deployment: AIO-SX: Create, delete, reboot and rebuild instances 2+2+2 System: worker nodes are unlock enable and no alarms Story: 2004022 Task: 27013 Depends-On: https://review.openstack.org/#/c/624452/ Change-Id: Ibe33c0d428d8713155bf605b7dca310644f7009f Signed-off-by: Tao Liu --- .../starlingx_dashboard/api/dc_manager.py | 4 +- .../starlingx_dashboard/api/sysinv.py | 12 ++--- .../starlingx_dashboard/api/vim.py | 8 ++-- .../templates/host_topology/_svg_element.html | 4 +- .../admin/inventory/cpu_functions/forms.py | 4 +- .../admin/inventory/cpu_functions/utils.py | 24 +++++----- .../admin/inventory/devices/tables.py | 2 +- .../admin/inventory/interfaces/tables.py | 2 +- .../admin/inventory/memories/forms.py | 16 +++---- .../admin/inventory/memories/tables.py | 4 +- .../admin/inventory/storages/forms.py | 4 +- .../admin/inventory/storages/tables.py | 20 ++++---- .../dashboards/admin/inventory/tables.py | 16 +++---- .../dashboards/admin/inventory/tabs.py | 16 +++---- .../inventory/templates/inventory/_hosts.html | 6 +-- .../inventory/templates/inventory/index.html | 4 +- .../inventory/memorys/_createprofile.html | 2 +- .../inventory/memorys/_edit_hp_memory.html | 2 +- .../dashboards/admin/inventory/workflows.py | 44 +++++++++--------- .../admin/providernets/providernets/forms.py | 2 +- .../admin/software_management/forms.py | 46 +++++++++---------- .../_patch_orchestration.html | 10 ++-- .../_upgrade_orchestration.html | 10 ++-- .../dc_admin/dc_software_management/forms.py | 18 ++++---- .../dc_admin/dc_software_management/tables.py | 8 ++-- .../dc_admin/dc_software_management/views.py | 4 +- .../static/js/horizon.hosttopology.js | 4 +- 27 files changed, 148 insertions(+), 148 deletions(-) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/dc_manager.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/dc_manager.py index de191f39..ca0a8349 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/dc_manager.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/dc_manager.py @@ -132,8 +132,8 @@ def step_list(request): class Config(base.APIResourceWrapper): - _attrs = ['cloud', 'storage_apply_type', 'compute_apply_type', - 'max_parallel_computes', 'alarm_restriction_type', + _attrs = ['cloud', 'storage_apply_type', 'worker_apply_type', + 'max_parallel_workers', 'alarm_restriction_type', 'default_instance_action'] diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py index e7d58736..2ec4e4cc 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py @@ -34,12 +34,12 @@ SYSTEM_TYPE_STANDARD = constants.TIS_STD_BUILD SYSTEM_TYPE_AIO = constants.TIS_AIO_BUILD PERSONALITY_CONTROLLER = 'controller' -PERSONALITY_COMPUTE = 'compute' +PERSONALITY_WORKER = 'worker' PERSONALITY_NETWORK = 'network' PERSONALITY_STORAGE = 'storage' PERSONALITY_UNKNOWN = 'unknown' -SUBFUNCTIONS_COMPUTE = 'compute' +SUBFUNCTIONS_WORKER = 'worker' SUBFUNCTIONS_LOWLATENCY = 'lowlatency' BM_TYPE_NULL = '' @@ -813,7 +813,7 @@ class Host(base.APIResourceWrapper): PERSONALITY_DISPLAY_CHOICES = ( (PERSONALITY_CONTROLLER, _("Controller")), - (PERSONALITY_COMPUTE, _("Compute")), + (PERSONALITY_WORKER, _("Worker")), (PERSONALITY_NETWORK, _("Network")), (PERSONALITY_STORAGE, _("Storage")), ) @@ -906,7 +906,7 @@ class Host(base.APIResourceWrapper): def is_cpe(self): subfunctions = self._subfunctions.split(',') if PERSONALITY_CONTROLLER in subfunctions and \ - PERSONALITY_COMPUTE in subfunctions: + PERSONALITY_WORKER in subfunctions: return True else: return False @@ -926,8 +926,8 @@ class Host(base.APIResourceWrapper): self._subfunction_avail) @property - def compute_config_required(self): - return self.config_status == 'Compute config required' + def worker_config_required(self): + return self.config_status == 'Worker config required' @property def location(self): diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/vim.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/vim.py index c15ed7a6..d904465d 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/vim.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/vim.py @@ -38,12 +38,12 @@ class Client(object): def create_strategy( self, strategy_name, controller_apply_type, storage_apply_type, - swift_apply_type, compute_apply_type, max_parallel_compute_hosts, + swift_apply_type, worker_apply_type, max_parallel_worker_hosts, default_instance_action, alarm_restrictions): return sw_update.create_strategy( self.token_id, self.url, strategy_name, controller_apply_type, storage_apply_type, - swift_apply_type, compute_apply_type, max_parallel_compute_hosts, + swift_apply_type, worker_apply_type, max_parallel_worker_hosts, default_instance_action, alarm_restrictions) def delete_strategy(self, strategy_name, force): @@ -72,11 +72,11 @@ def get_strategy(request, strategy_name): def create_strategy( request, strategy_name, controller_apply_type, storage_apply_type, - swift_apply_type, compute_apply_type, max_parallel_compute_hosts, + swift_apply_type, worker_apply_type, max_parallel_worker_hosts, default_instance_action, alarm_restrictions): strategy = _sw_update_client(request).create_strategy( strategy_name, controller_apply_type, storage_apply_type, - swift_apply_type, compute_apply_type, max_parallel_compute_hosts, + swift_apply_type, worker_apply_type, max_parallel_worker_hosts, default_instance_action, alarm_restrictions) return strategy diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/host_topology/templates/host_topology/_svg_element.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/host_topology/templates/host_topology/_svg_element.html index 4fa41ab2..82976391 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/host_topology/templates/host_topology/_svg_element.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/host_topology/templates/host_topology/_svg_element.html @@ -152,8 +152,8 @@ svg#topology_canvas g.loading .host .icon_bg {
-

Compute Hosts

- +

Worker Hosts

+

Provider Networks

diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py index f7191be1..2b516a33 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/forms.py @@ -145,7 +145,7 @@ class UpdateCpuFunctions(forms.SelfHandlingForm): 'platform_processor3'].help_text = \ "Processor 3 has %s physical cores." % avail_socket_cores - if 'compute' not in self.host.subfunctions: + if 'worker' not in self.host.subfunctions: self.fields['vswitch'].widget = forms.widgets.HiddenInput() self.fields[ 'num_cores_on_processor0'].widget = forms.widgets.HiddenInput() @@ -214,7 +214,7 @@ class UpdateCpuFunctions(forms.SelfHandlingForm): for s in range(0, 4): processor = 'num_shared_on_processor{0}'.format(s) - if ('compute' not in self.host.subfunctions or + if ('worker' not in self.host.subfunctions or kwargs['initial'][processor] == 99): # No Processor self.fields[processor].widget = forms.widgets.HiddenInput() else: diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/utils.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/utils.py index 510e8e73..cf9312bd 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/utils.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/cpu_functions/utils.py @@ -10,24 +10,24 @@ from django.utils.translation import ugettext_lazy as _ PLATFORM_CPU_TYPE = "Platform" VSWITCH_CPU_TYPE = "Vswitch" SHARED_CPU_TYPE = "Shared" -VMS_CPU_TYPE = "VMs" +APPLICATIONS_CPU_TYPE = "Applications" NONE_CPU_TYPE = "None" CPU_TYPE_LIST = [PLATFORM_CPU_TYPE, VSWITCH_CPU_TYPE, - SHARED_CPU_TYPE, VMS_CPU_TYPE, + SHARED_CPU_TYPE, APPLICATIONS_CPU_TYPE, NONE_CPU_TYPE] PLATFORM_CPU_TYPE_FORMAT = _("Platform") VSWITCH_CPU_TYPE_FORMAT = _("vSwitch") SHARED_CPU_TYPE_FORMAT = _("Shared") -VMS_CPU_TYPE_FORMAT = _("VMs") +APPLICATIONS_CPU_TYPE_FORMAT = _("Applications") NONE_CPU_TYPE_FORMAT = _("None") CPU_TYPE_FORMATS = {PLATFORM_CPU_TYPE: PLATFORM_CPU_TYPE_FORMAT, VSWITCH_CPU_TYPE: VSWITCH_CPU_TYPE_FORMAT, SHARED_CPU_TYPE: SHARED_CPU_TYPE_FORMAT, - VMS_CPU_TYPE: VMS_CPU_TYPE_FORMAT, + APPLICATIONS_CPU_TYPE: APPLICATIONS_CPU_TYPE_FORMAT, NONE_CPU_TYPE: NONE_CPU_TYPE_FORMAT} @@ -81,7 +81,7 @@ class CpuProfile(object): cur_processor.vswitch += 1 elif cpu.allocated_function == SHARED_CPU_TYPE: cur_processor.shared += 1 - elif cpu.allocated_function == VMS_CPU_TYPE: + elif cpu.allocated_function == APPLICATIONS_CPU_TYPE: cur_processor.vms += 1 self.cores_per_cpu = len(cores) @@ -126,9 +126,9 @@ class HostCpuProfile(CpuProfile): result = True if platform_cores == 0: result = False - elif 'compute' in self.personality and vswitch_cores == 0: + elif 'worker' in self.personality and vswitch_cores == 0: result = False - elif 'compute' in self.personality and vm_cores == 0: + elif 'worker' in self.personality and vm_cores == 0: result = False return result @@ -199,7 +199,7 @@ def restructure_host_cpu_data(host): else: if (f == PLATFORM_CPU_TYPE or (hasattr(host, 'subfunctions') and - 'compute' in host.subfunctions)): + 'worker' in host.subfunctions)): if f != NONE_CPU_TYPE: host.core_assignment.append(cpufunction) for s in range(0, len(host.nodes)): @@ -220,7 +220,7 @@ def check_core_functions(personality, icpus): vswitch_cores += 1 elif allocated_function == SHARED_CPU_TYPE: shared_vcpu_cores += 1 - elif allocated_function == VMS_CPU_TYPE: + elif allocated_function == APPLICATIONS_CPU_TYPE: vm_cores += 1 # No limiations for shared_vcpu cores @@ -228,10 +228,10 @@ def check_core_functions(personality, icpus): if platform_cores == 0: error_string = "There must be at least one" \ " core for %s." % PLATFORM_CPU_TYPE_FORMAT - elif 'compute' in personality and vswitch_cores == 0: + elif 'worker' in personality and vswitch_cores == 0: error_string = "There must be at least one" \ " core for %s." % VSWITCH_CPU_TYPE_FORMAT - elif 'compute' in personality and vm_cores == 0: + elif 'worker' in personality and vm_cores == 0: error_string = "There must be at least one" \ - " core for %s." % VMS_CPU_TYPE_FORMAT + " core for %s." % APPLICATIONS_CPU_TYPE_FORMAT return error_string diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py index 1792422d..411b0ded 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py @@ -32,7 +32,7 @@ class EditDevice(tables.LinkAction): def allowed(self, request, datum): host = self.table.kwargs['host'] return (host._administrative == 'locked' and - stx_api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions) + stx_api.sysinv.SUBFUNCTIONS_WORKER in host.subfunctions) def get_viewdevice_link_url(device): diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py index fe167350..1983abde 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py @@ -91,7 +91,7 @@ class CreateInterface(tables.LinkAction): if i.ifclass: count = count + 1 - if host.subfunctions and 'compute' not in host.subfunctions and \ + if host.subfunctions and 'worker' not in host.subfunctions and \ count >= len(INTERFACE_CLASS_TYPES): return False diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/forms.py index 063cda64..8b584b33 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/forms.py @@ -36,11 +36,11 @@ class UpdateMemory(forms.SelfHandlingForm): required=False) vm_hugepages_nr_2M = forms.CharField( - label=_("# of VM 2M Hugepages Node 0"), + label=_("# of Application 2M Hugepages Node 0"), required=False) vm_hugepages_nr_1G = forms.CharField( - label=_("# of VM 1G Hugepages Node 0"), + label=_("# of Application 1G Hugepages Node 0"), required=False) platform_memory_two = forms.CharField( @@ -48,11 +48,11 @@ class UpdateMemory(forms.SelfHandlingForm): required=False) vm_hugepages_nr_2M_two = forms.CharField( - label=_("# of VM 2M Hugepages Node 1"), + label=_("# of Application 2M Hugepages Node 1"), required=False) vm_hugepages_nr_1G_two = forms.CharField( - label=_("# of VM 1G Hugepages Node 1"), + label=_("# of Application 1G Hugepages Node 1"), required=False) platform_memory_three = forms.CharField( @@ -60,11 +60,11 @@ class UpdateMemory(forms.SelfHandlingForm): required=False) vm_hugepages_nr_2M_three = forms.CharField( - label=_("# of VM 2M Hugepages Node 2"), + label=_("# of Application 2M Hugepages Node 2"), required=False) vm_hugepages_nr_1G_three = forms.CharField( - label=_("# of VM 1G Hugepages Node 2"), + label=_("# of Application 1G Hugepages Node 2"), required=False) platform_memory_four = forms.CharField( @@ -72,11 +72,11 @@ class UpdateMemory(forms.SelfHandlingForm): required=False) vm_hugepages_nr_2M_four = forms.CharField( - label=_("# of VM 2M Hugepages Node 3"), + label=_("# of Application 2M Hugepages Node 3"), required=False) vm_hugepages_nr_1G_four = forms.CharField( - label=_("# of VM 1G Hugepages Node 3"), + label=_("# of Application 1G Hugepages Node 3"), required=False) failure_url = 'horizon:admin:inventory:detail' diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/tables.py index e66b1bde..8bdc396c 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/memories/tables.py @@ -31,7 +31,7 @@ class UpdateMemory(tables.LinkAction): host = self.table.kwargs['host'] return (host._administrative == 'locked' and host.subfunctions and - 'compute' in host.subfunctions) + 'worker' in host.subfunctions) class CreateMemoryProfile(tables.LinkAction): @@ -77,7 +77,7 @@ class MemorysTable(tables.DataTable): verbose_name=_('Memory')) vm_huge = tables.Column(get_vm_hugepages, - verbose_name=_('VM Pages')) + verbose_name=_('Application Pages')) def get_object_id(self, datum): return str(datum.uuid) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py index f0e0af91..7d9bf9cb 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py @@ -408,7 +408,7 @@ class AddLocalVolumeGroup(forms.SelfHandlingForm): stx_api.sysinv.PERSONALITY_CONTROLLER): compatible_lvgs += [stx_api.sysinv.LVG_CINDER_VOLUMES] - if stx_api.sysinv.SUBFUNCTIONS_COMPUTE in subfunctions: + if stx_api.sysinv.SUBFUNCTIONS_WORKER in subfunctions: compatible_lvgs += [stx_api.sysinv.LVG_NOVA_LOCAL] allowed_lvgs = set(compatible_lvgs) - set(current_lvgs) @@ -542,7 +542,7 @@ class AddPhysicalVolume(forms.SelfHandlingForm): compatible_lvgs += [stx_api.sysinv.LVG_CGTS_VG, stx_api.sysinv.LVG_CINDER_VOLUMES] - if stx_api.sysinv.SUBFUNCTIONS_COMPUTE in subfunctions: + if stx_api.sysinv.SUBFUNCTIONS_WORKER in subfunctions: compatible_lvgs += [stx_api.sysinv.LVG_NOVA_LOCAL] avail_disk_list = stx_api.sysinv.host_disk_list(self.request, diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/tables.py index 85815da8..23bcb5dd 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/tables.py @@ -378,8 +378,8 @@ class AddLocalVolumeGroup(tables.LinkAction): self.classes = classes if not host._administrative == 'locked': - if 'compute' in host._subfunctions and \ - host.compute_config_required is False: + if 'worker' in host._subfunctions and \ + host.worker_config_required is False: if "disabled" not in self.classes: self.classes = [c for c in self.classes] + ['disabled'] self.verbose_name = string_concat(self.verbose_name, ' ', @@ -396,7 +396,7 @@ class AddLocalVolumeGroup(tables.LinkAction): if host._personality == 'controller': compatible_lvgs += [sysinv.LVG_CINDER_VOLUMES] - if 'compute' in host._subfunctions: + if 'worker' in host._subfunctions: compatible_lvgs += [sysinv.LVG_NOVA_LOCAL] allowed_lvgs = set(compatible_lvgs) - set(current_lvgs) @@ -432,8 +432,8 @@ class RemoveLocalVolumeGroup(tables.DeleteAction): if lvg.lvm_vg_name == sysinv.LVG_NOVA_LOCAL: return ((host._administrative == 'locked') or - (('compute' in host._subfunctions) and - (host.compute_config_required is True))) + (('worker' in host._subfunctions) and + (host.worker_config_required is True))) elif lvg.lvm_vg_name == sysinv.LVG_CINDER_VOLUMES: return (sysinv.CINDER_BACKEND_LVM not in cinder_backend and sysinv.LVG_ADD in lvg.vg_state) @@ -512,11 +512,11 @@ class AddPhysicalVolume(tables.LinkAction): if host._personality == sysinv.PERSONALITY_CONTROLLER: return True - # nova-local: Allow adding to any locked host with a compute + # nova-local: Allow adding to any locked host with a worker # subfunction. On an AIO, the previous check superceeds this. if host._administrative != 'locked': - if 'compute' in host._subfunctions and \ - host.compute_config_required is False: + if 'worker' in host._subfunctions and \ + host.worker_config_required is False: if "disabled" not in self.classes: self.classes = [c for c in self.classes] + ['disabled'] self.verbose_name = string_concat(self.verbose_name, ' ', @@ -555,8 +555,8 @@ class RemovePhysicalVolume(tables.DeleteAction): if pv.lvm_vg_name == sysinv.LVG_NOVA_LOCAL: return ((host._administrative == 'locked') or - (('compute' in host._subfunctions) and - (host.compute_config_required is True))) + (('worker' in host._subfunctions) and + (host.worker_config_required is True))) elif pv.lvm_vg_name == sysinv.LVG_CINDER_VOLUMES: return (sysinv.CINDER_BACKEND_LVM not in cinder_backend and sysinv.PV_ADD in pv.pv_state) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tables.py index 20999b5a..79399072 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tables.py @@ -231,10 +231,10 @@ class ForceLockHost(tables.BatchAction): "unsuccessful and this host MUST be locked.\n\n" "If you proceed, then this action will be logged" " and cannot be undone.") % datum.hostname - elif datum._personality == stx_api.sysinv.PERSONALITY_COMPUTE: + elif datum._personality == stx_api.sysinv.PERSONALITY_WORKER: return _( "WARNING: This will cause a service OUTAGE" - " for all VMs currently using resources on '%s'.\n\n" + " for all Applications currently using resources on '%s'.\n\n" "To avoid service outages, click 'Cancel' and use" " 'Lock Host' to gracefully migrate " "resources away from this host. " @@ -593,7 +593,7 @@ class HostsStorageFilterAction(tables.FilterAction): return list(filter(comp, hosts)) -class HostsComputeFilterAction(tables.FilterAction): +class HostsWorkerFilterAction(tables.FilterAction): def filter(self, table, hosts, filter_string): """Naive case-insensitive search.""" q = filter_string.lower() @@ -687,7 +687,7 @@ TASK_STATE_CHOICES = ( ("none", True), ("Install Failed", False), ("Config out-of-date", False), - ("Compute config required", False), + ("Worker config required", False), ("Reinstall required", False), ("Config out-of-date
Not Patch Current
Reboot Required", False), @@ -789,10 +789,10 @@ class HostsStorage(Hosts): hidden_title = False -class HostsCompute(Hosts): +class HostsWorker(Hosts): class Meta(object): - name = "hostscompute" - verbose_name = _("Compute Hosts") + name = "hostsworker" + verbose_name = _("Worker Hosts") status_columns = ["task"] row_class = UpdateRow multi_select = True @@ -802,7 +802,7 @@ class HostsCompute(Hosts): PowerOnHost, PowerOffHost, RebootHost, ResetHost, ReinstallHost, PatchInstallAsync, DeleteHost) - table_actions = (HostsComputeFilterAction, LockHost, + table_actions = (HostsWorkerFilterAction, LockHost, UnlockHost, PatchInstallAsync) hidden_title = False diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tabs.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tabs.py index 5d1db519..ad736c21 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tabs.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/tabs.py @@ -41,7 +41,7 @@ LOG = logging.getLogger(__name__) class HostsTab(tabs.TableTab): table_classes = (toplevel_tables.HostsController, toplevel_tables.HostsStorage, - toplevel_tables.HostsCompute, + toplevel_tables.HostsWorker, toplevel_tables.HostsUnProvisioned,) name = _("Hosts") slug = "hosts" @@ -111,10 +111,10 @@ class HostsTab(tabs.TableTab): return storages - def get_hostscompute_data(self): - computes = self.get_hosts_data(stx_api.sysinv.PERSONALITY_COMPUTE) + def get_hostsworker_data(self): + workers = self.get_hosts_data(stx_api.sysinv.PERSONALITY_WORKER) - return computes + return workers def get_hostsunprovisioned_data(self): unprovisioned = self.get_hosts_data(stx_api.sysinv.PERSONALITY_UNKNOWN) @@ -134,12 +134,12 @@ class HostsTab(tabs.TableTab): controllers = context['hostscontroller_table'].data storages = context['hostsstorage_table'].data - computes = context['hostscompute_table'].data + workers = context['hostsworker_table'].data unprovisioned = context['hostsunprovisioned_table'].data context['controllers'] = controllers context['storages'] = storages - context['computes'] = computes + context['workers'] = workers context['unprovisioned'] = unprovisioned totals = [] @@ -163,7 +163,7 @@ class HostsTab(tabs.TableTab): elif h._availability == 'failed': fail_cnt += 1 - for h in computes: + for h in workers: comp_cnt += 1 if h._availability == 'degraded': degr_cnt += 1 @@ -183,7 +183,7 @@ class HostsTab(tabs.TableTab): if (comp_cnt > 0): badge = "badge-success" totals.append( - {'name': "Compute", 'value': comp_cnt, 'badge': badge}) + {'name': "Worker", 'value': comp_cnt, 'badge': badge}) if (degr_cnt > 0): badge = "badge-warning" diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/_hosts.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/_hosts.html index 8e3c5aef..916e04d1 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/_hosts.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/_hosts.html @@ -25,9 +25,9 @@ {% endif %}
-
-{% if computes %} - {{ hostscompute_table.render }} +
+{% if workers %} + {{ hostsworker_table.render }} {% endif %}
diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/index.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/index.html index 785975e0..54465e9f 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/index.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/index.html @@ -52,8 +52,8 @@ }); horizon.refresh.addRefreshFunction(function (html) { - var $old_table = $('#computes'); - var $new_table = $(html).find('#computes'); + var $old_table = $('#workers'); + var $new_table = $(html).find('#workers'); if (($old_table.children().length == 0 && $new_table.children().length> 0) || ($old_table.children().length > 0 && $new_table.children().length == 0)) { $old_table.replaceWith($new_table); diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_createprofile.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_createprofile.html index a2655a85..a4e5ad5d 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_createprofile.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_createprofile.html @@ -16,7 +16,7 @@ {% trans "Numa Node" %} {% trans "Platform Reserved" %} - {% trans "VM Hugepages" %} + {% trans "Application Hugepages" %} {% for node,m in host.numa_nodes %} diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_edit_hp_memory.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_edit_hp_memory.html index 7b199a8d..a84d9d8d 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_edit_hp_memory.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/memorys/_edit_hp_memory.html @@ -14,7 +14,7 @@

{% trans "Description" %}:

-

{% trans "From here you can update the platform reserved memory and the number of Libvirt VM hugepages per numa node." %}

+

{% trans "From here you can update the platform reserved memory and the number of application hugepages per numa node." %}

{% endblock %} 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 20595781..4c05dc62 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 @@ -27,20 +27,20 @@ from starlingx_dashboard import api as stx_api LOG = logging.getLogger(__name__) PERSONALITY_CHOICES = ( - (stx_api.sysinv.PERSONALITY_COMPUTE, _("Compute")), + (stx_api.sysinv.PERSONALITY_WORKER, _("Worker")), (stx_api.sysinv.PERSONALITY_CONTROLLER, _("Controller")), (stx_api.sysinv.PERSONALITY_STORAGE, _("Storage")), ) FIELD_LABEL_PERFORMANCE_PROFILE = _("Performance Profile") PERFORMANCE_CHOICES = ( - (stx_api.sysinv.SUBFUNCTIONS_COMPUTE, _("Standard")), - (stx_api.sysinv.SUBFUNCTIONS_COMPUTE + ',' + + (stx_api.sysinv.SUBFUNCTIONS_WORKER, _("Standard")), + (stx_api.sysinv.SUBFUNCTIONS_WORKER + ',' + stx_api.sysinv.SUBFUNCTIONS_LOWLATENCY, _("Low Latency")), ) PERSONALITY_CHOICES_WITHOUT_STORAGE = ( - (stx_api.sysinv.PERSONALITY_COMPUTE, _("Compute")), + (stx_api.sysinv.PERSONALITY_WORKER, _("Worker")), (stx_api.sysinv.PERSONALITY_CONTROLLER, _("Controller")), ) @@ -58,11 +58,11 @@ def ifprofile_applicable(request, host, profile): for interface in profile.interfaces: interface_networks = stx_api.sysinv.\ interface_network_list_by_interface(request, interface.uuid) - if (stx_api.sysinv.PERSONALITY_COMPUTE == host._personality and + if (stx_api.sysinv.PERSONALITY_WORKER == host._personality and any(interface_network.network_type == 'oam' for interface_network in interface_networks)): return False - if (stx_api.sysinv.PERSONALITY_COMPUTE not in host._subfunctions and + if (stx_api.sysinv.PERSONALITY_WORKER not in host._subfunctions and interface.ifclass == 'data'): return False return True @@ -84,7 +84,7 @@ def diskprofile_applicable(host, diskprofile): if not len(host.disks) >= len(diskprofile.disks): return False - if stx_api.sysinv.PERSONALITY_COMPUTE in host._subfunctions: + if stx_api.sysinv.PERSONALITY_WORKER in host._subfunctions: if diskprofile.lvgs: for lvg in diskprofile.lvgs: if (hasattr(lvg, 'lvm_vg_name') and @@ -109,7 +109,7 @@ def memoryprofile_applicable(host, personality, profile): return False if len(host.nodes) != len(profile.nodes): return False - if 'compute' not in personality: + if 'worker' not in personality: return False return True @@ -149,7 +149,7 @@ class AddHostInfoAction(workflows.Action): attrs={'class': 'switched', 'data-switch-on': 'personality', 'data-personality-' + - stx_api.sysinv.PERSONALITY_COMPUTE: _( + stx_api.sysinv.PERSONALITY_WORKER: _( "Personality Sub-Type")})) hostname = forms.RegexField(label=FIELD_LABEL_HOSTNAME, @@ -165,7 +165,7 @@ class AddHostInfoAction(workflows.Action): attrs={'class': 'switched', 'data-switch-on': 'personality', 'data-personality-' + - stx_api.sysinv.PERSONALITY_COMPUTE: + stx_api.sysinv.PERSONALITY_WORKER: FIELD_LABEL_HOSTNAME, })) @@ -175,7 +175,7 @@ class AddHostInfoAction(workflows.Action): attrs={'class': 'switched', 'data-switch-on': 'personality', 'data-personality-' + - stx_api.sysinv.PERSONALITY_COMPUTE: FIELD_LABEL_MGMT_MAC, + stx_api.sysinv.PERSONALITY_WORKER: FIELD_LABEL_MGMT_MAC, 'data-personality-' + stx_api.sysinv.PERSONALITY_CONTROLLER: FIELD_LABEL_MGMT_MAC, 'data-personality-' + @@ -196,19 +196,19 @@ class AddHostInfoAction(workflows.Action): self.fields['personality'].choices = \ PERSONALITY_CHOICES_WITHOUT_STORAGE - # All-in-one system, personality can be controller or compute. + # All-in-one system, personality can be controller or worker. 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_CHOICES_WITHOUT_STORAGE - # Remove compute personality if in DC mode and region + # Remove worker personality if in DC mode and region if getattr(self.request.user, 'services_region', None) == 'RegionOne' \ and getattr(settings, 'DC_MODE', False): self.fields['personality'].choices = \ [choice for choice in self.fields['personality'].choices - if choice[0] != stx_api.sysinv.PERSONALITY_COMPUTE] + if choice[0] != stx_api.sysinv.PERSONALITY_WORKER] def clean(self): cleaned_data = super(AddHostInfoAction, self).clean() @@ -231,7 +231,7 @@ class UpdateHostInfoAction(workflows.Action): attrs={'class': 'switched', 'data-switch-on': 'personality', 'data-personality-' + - stx_api.sysinv.PERSONALITY_COMPUTE: _( + stx_api.sysinv.PERSONALITY_WORKER: _( "Performance Profile")})) hostname = forms.RegexField(label=_("Host Name"), @@ -247,7 +247,7 @@ class UpdateHostInfoAction(workflows.Action): attrs={'class': 'switched', 'data-switch-on': 'personality', 'data-personality-' + - stx_api.sysinv.PERSONALITY_COMPUTE: + stx_api.sysinv.PERSONALITY_WORKER: _("Host Name")})) location = forms.CharField(label=_("Location"), @@ -292,7 +292,7 @@ class UpdateHostInfoAction(workflows.Action): self.fields['personality'].choices = \ PERSONALITY_CHOICES_WITHOUT_STORAGE - # All-in-one system, personality can only be controller or compute. + # All-in-one system, personality can only be controller or worker. 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') @@ -300,12 +300,12 @@ class UpdateHostInfoAction(workflows.Action): self.fields['personality'].choices = \ PERSONALITY_CHOICES_WITHOUT_STORAGE - # Remove compute personality if in DC mode and region + # Remove worker personality if in DC mode and region if getattr(self.request.user, 'services_region', None) == 'RegionOne' \ and getattr(settings, 'DC_MODE', False): self.fields['personality'].choices = \ [choice for choice in self.fields['personality'].choices - if choice[0] != stx_api.sysinv.PERSONALITY_COMPUTE] + if choice[0] != stx_api.sysinv.PERSONALITY_WORKER] # hostname cannot be modified once it is set if self.initial['hostname']: @@ -334,7 +334,7 @@ class UpdateHostInfoAction(workflows.Action): host.ports = stx_api.sysinv.host_port_list(self.request, host.uuid) host.disks = stx_api.sysinv.host_disk_list(self.request, host.uuid) - if 'compute' in host.subfunctions: + if 'worker' in host.subfunctions: mem_profile_configurable = True host.memory = stx_api.sysinv.host_memory_list( self.request, host.uuid) @@ -393,7 +393,7 @@ class UpdateHostInfoAction(workflows.Action): 'interfaceProfile'].widget = forms.widgets.HiddenInput() if ((personality == 'storage' or - 'compute' in host._subfunctions) and host.disks): + 'worker' in host._subfunctions) and host.disks): # Populate Available Disk Profile Choices try: disk_profile_tuple_list = [ @@ -470,7 +470,7 @@ class UpdateHostInfoAction(workflows.Action): stx_api.sysinv.PERSONALITY_CONTROLLER: if self.system_type == constants.TS_AIO: self._subfunctions = (stx_api.sysinv.PERSONALITY_CONTROLLER + - ',' + stx_api.sysinv.PERSONALITY_COMPUTE) + ',' + stx_api.sysinv.PERSONALITY_WORKER) else: self._subfunctions = stx_api.sysinv.PERSONALITY_CONTROLLER cleaned_data['subfunctions'] = self._subfunctions diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/providernets/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/providernets/forms.py index be701587..86d97aac 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/providernets/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/providernets/providernets/forms.py @@ -48,7 +48,7 @@ class CreateProviderNetwork(forms.SelfHandlingForm): max_value=9216, help_text=( _("Specifies the maximum MTU value of any associated tenant " - "network. Compute node data interface MTU values must be large " + "network. Worker node data interface MTU values must be large " "enough to support the tenant MTU plus any additional provider " "encapsulation headers. For example, VXLAN provider MTU of " "1500 requires a minimum data interface MTU of 1574 bytes (1600 " diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/forms.py index 60a87dbf..e28bff26 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/forms.py @@ -110,29 +110,29 @@ class CreatePatchStrategyForm(forms.SelfHandlingForm): choices=GENERIC_APPLY_TYPES, widget=forms.Select()) - compute_apply_type = forms.ChoiceField( - label=_("Compute Apply Type"), + worker_apply_type = forms.ChoiceField( + label=_("Worker Apply Type"), required=True, choices=GENERIC_APPLY_TYPES, widget=forms.Select( attrs={ 'class': 'switchable', - 'data-slug': 'compute_apply_type'})) + 'data-slug': 'worker_apply_type'})) - max_parallel_compute_hosts = forms.IntegerField( - label=_("Maximum Parallel Compute Hosts"), + max_parallel_worker_hosts = forms.IntegerField( + label=_("Maximum Parallel Worker Hosts"), initial=2, min_value=2, max_value=100, required=True, - error_messages={'invalid': _('Maximum Parallel Compute Hosts must be ' + error_messages={'invalid': _('Maximum Parallel Worker Hosts must be ' 'between 2 and 100.')}, widget=forms.TextInput( attrs={ 'class': 'switched', - 'data-switch-on': 'compute_apply_type', - 'data-compute_apply_type-parallel': - 'Maximum Parallel Compute Hosts'})) + 'data-switch-on': 'worker_apply_type', + 'data-worker_apply_type-parallel': + 'Maximum Parallel Worker Hosts'})) default_instance_action = forms.ChoiceField( label=_("Default Instance Action"), @@ -156,7 +156,7 @@ class CreatePatchStrategyForm(forms.SelfHandlingForm): system_type = stx_api.sysinv.get_system_type(request) if system_type == stx_api.sysinv.SYSTEM_TYPE_AIO: del self.fields['controller_apply_type'] - self.fields['compute_apply_type'].choices = self.AIO_APPLY_TYPES + self.fields['worker_apply_type'].choices = self.AIO_APPLY_TYPES if stx_api.sysinv.is_system_mode_simplex(request): self.fields['default_instance_action'].choices = \ @@ -172,8 +172,8 @@ class CreatePatchStrategyForm(forms.SelfHandlingForm): request, stx_api.vim.STRATEGY_SW_PATCH, data.get('controller_apply_type', 'ignore'), data.get('storage_apply_type', 'ignore'), 'ignore', - data['compute_apply_type'], - data['max_parallel_compute_hosts'], + data['worker_apply_type'], + data['max_parallel_worker_hosts'], data['default_instance_action'], data['alarm_restrictions']) if not response: @@ -205,29 +205,29 @@ class CreateUpgradeStrategyForm(forms.SelfHandlingForm): choices=GENERIC_APPLY_TYPES, widget=forms.Select()) - compute_apply_type = forms.ChoiceField( - label=_("Compute Apply Type"), + worker_apply_type = forms.ChoiceField( + label=_("Worker Apply Type"), required=True, choices=GENERIC_APPLY_TYPES, widget=forms.Select( attrs={ 'class': 'switchable', - 'data-slug': 'compute_apply_type'})) + 'data-slug': 'worker_apply_type'})) - max_parallel_compute_hosts = forms.IntegerField( - label=_("Maximum Parallel Compute Hosts"), + max_parallel_worker_hosts = forms.IntegerField( + label=_("Maximum Parallel Worker Hosts"), initial=2, min_value=2, max_value=10, required=True, - error_messages={'invalid': _('Maximum Parallel Compute Hosts must be ' + error_messages={'invalid': _('Maximum Parallel Worker Hosts must be ' 'between 2 and 10.')}, widget=forms.TextInput( attrs={ 'class': 'switched', - 'data-switch-on': 'compute_apply_type', - 'data-compute_apply_type-parallel': - 'Maximum Parallel Compute Hosts'})) + 'data-switch-on': 'worker_apply_type', + 'data-worker_apply_type-parallel': + 'Maximum Parallel Worker Hosts'})) alarm_restrictions = forms.ChoiceField( label=_("Alarm Restrictions"), @@ -251,8 +251,8 @@ class CreateUpgradeStrategyForm(forms.SelfHandlingForm): response = stx_api.vim.create_strategy( request, stx_api.vim.STRATEGY_SW_UPGRADE, 'ignore', data.get('storage_apply_type', 'ignore'), 'ignore', - data['compute_apply_type'], - data['max_parallel_compute_hosts'], + data['worker_apply_type'], + data['max_parallel_worker_hosts'], 'migrate', data['alarm_restrictions']) if not response: diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_patch_orchestration.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_patch_orchestration.html index e6c43a10..85adc1f3 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_patch_orchestration.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_patch_orchestration.html @@ -13,11 +13,11 @@
{{ strategy.controller_apply_type }}
{% trans "Storage Apply Type" %}
{{ strategy.storage_apply_type }}
-
{% trans "Compute Apply Type" %}
-
{{ strategy.compute_apply_type }}
- {% if strategy.compute_apply_type == "parallel" %} -
{% trans "Maximum Parallel Compute Hosts" %}
-
{{ strategy.max_parallel_compute_hosts }}
+
{% trans "Worker Apply Type" %}
+
{{ strategy.worker_apply_type }}
+ {% if strategy.worker_apply_type == "parallel" %} +
{% trans "Maximum Parallel Worker Hosts" %}
+
{{ strategy.max_parallel_worker_hosts }}
{% endif %}
{% trans "Default Instance Action" %}
{{ strategy.default_instance_action }}
diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_upgrade_orchestration.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_upgrade_orchestration.html index 60eaaf51..0943855a 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_upgrade_orchestration.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/software_management/templates/software_management/_upgrade_orchestration.html @@ -11,11 +11,11 @@
{% trans "Storage Apply Type" %}
{{ strategy.storage_apply_type }}
-
{% trans "Compute Apply Type" %}
-
{{ strategy.compute_apply_type }}
- {% if strategy.compute_apply_type == "parallel" %} -
{% trans "Maximum Parallel Compute Hosts" %}
-
{{ strategy.max_parallel_compute_hosts }}
+
{% trans "Worker Apply Type" %}
+
{{ strategy.worker_apply_type }}
+ {% if strategy.worker_apply_type == "parallel" %} +
{% trans "Maximum Parallel Worker Hosts" %}
+
{{ strategy.max_parallel_worker_hosts }}
{% endif %}
{% trans "Alarm Restrictions" %}
{{ strategy.alarm_restrictions }}
diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/forms.py index 9d5b5363..b610f837 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/forms.py @@ -106,29 +106,29 @@ class CreateCloudPatchConfigForm(forms.SelfHandlingForm): choices=APPLY_TYPES, widget=forms.Select()) - compute_apply_type = forms.ChoiceField( - label=_("Compute Apply Type"), + worker_apply_type = forms.ChoiceField( + label=_("Worker Apply Type"), required=True, choices=APPLY_TYPES, widget=forms.Select( attrs={ 'class': 'switchable', - 'data-slug': 'compute_apply_type'})) + 'data-slug': 'worker_apply_type'})) - max_parallel_computes = forms.IntegerField( - label=_("Maximum Parallel Compute Hosts"), + max_parallel_workers = forms.IntegerField( + label=_("Maximum Parallel Worker Hosts"), initial=2, min_value=2, max_value=100, required=True, - error_messages={'invalid': _('Maximum Parallel Compute Hosts must be ' + error_messages={'invalid': _('Maximum Parallel Worker Hosts must be ' 'between 2 and 100.')}, widget=forms.TextInput( attrs={ 'class': 'switched', - 'data-switch-on': 'compute_apply_type', - 'data-compute_apply_type-parallel': - 'Maximum Parallel Compute Hosts'})) + 'data-switch-on': 'worker_apply_type', + 'data-worker_apply_type-parallel': + 'Maximum Parallel Worker Hosts'})) default_instance_action = forms.ChoiceField( label=_("Default Instance Action"), diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/tables.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/tables.py index 3fd5dd51..01076cb9 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/tables.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/tables.py @@ -303,10 +303,10 @@ class CloudPatchConfigTable(tables.DataTable): cloud = tables.Column('cloud', verbose_name=_('Cloud')) storage_apply_type = tables.Column('storage_apply_type', verbose_name=_('Storage Apply Type')) - compute_apply_type = tables.Column('compute_apply_type', - verbose_name=_('Compute Apply Type')) - max_parallel_computes = tables.Column( - 'max_parallel_computes', verbose_name=_('Max Parallel Computes')) + worker_apply_type = tables.Column('worker_apply_type', + verbose_name=_('Worker Apply Type')) + max_parallel_workers = tables.Column( + 'max_parallel_workers', verbose_name=_('Max Parallel Workers')) default_instance_action = tables.Column( 'default_instance_action', verbose_name=_('Default Instance Action')) alarm_restriction_type = tables.Column( diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/views.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/views.py index 0455e942..d02517f0 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/views.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_software_management/views.py @@ -88,7 +88,7 @@ class EditCloudPatchConfigView(forms.ModalFormView): return {'subcloud': config.cloud, 'storage_apply_type': config.storage_apply_type, - 'compute_apply_type': config.compute_apply_type, - 'max_parallel_computes': config.max_parallel_computes, + 'worker_apply_type': config.worker_apply_type, + 'max_parallel_workers': config.max_parallel_workers, 'default_instance_action': config.default_instance_action, 'alarm_restriction_type': config.alarm_restriction_type} diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/static/js/horizon.hosttopology.js b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/static/js/horizon.hosttopology.js index d796058a..e0db777f 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/static/js/horizon.hosttopology.js +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/static/js/horizon.hosttopology.js @@ -156,9 +156,9 @@ horizon.host_topology = { return; } - // Remove hosts without compute functionality + // Remove hosts without worker functionality model.hosts = $.grep(model.hosts, function (host, i){ - if (host.subfunctions && host.subfunctions.indexOf('compute') !== -1){ + if (host.subfunctions && host.subfunctions.indexOf('worker') !== -1){ return true; } return false;