From 7254b5847b7bbe19e0b0d1e493e81d70ea2b2bb3 Mon Sep 17 00:00:00 2001 From: Girija Soni Date: Mon, 3 Jun 2024 16:05:59 +0530 Subject: [PATCH] Add NVME controllers to hammer help --- .../compute_resource/vmware.rb | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/lib/hammer_cli_foreman/compute_resource/vmware.rb b/lib/hammer_cli_foreman/compute_resource/vmware.rb index b8baa5cb6..e39bfc32e 100644 --- a/lib/hammer_cli_foreman/compute_resource/vmware.rb +++ b/lib/hammer_cli_foreman/compute_resource/vmware.rb @@ -10,7 +10,8 @@ def name def compute_attributes [ ['cluster', _('Cluster ID from VMware'), { bold: true }], - ['corespersocket', _('Number of cores per socket (applicable to hardware versions < 10 only)'), { bold: true }], + ['corespersocket', _('Number of cores per socket (applicable to hardware versions < 10 only)'), + { bold: true }], ['cpus', _('CPU count'), { bold: true }], ['memory_mb', _('Integer number, amount of memory in MB'), { bold: true }], ['path', _('Path to folder'), { bold: true }], @@ -24,9 +25,11 @@ def compute_attributes ['annotation', _('Annotation Notes')], ['scsi_controllers', [_('List with SCSI controllers definitions'), ' type - ' + _('ID of the controller from VMware'), - ' key - ' + _('Key of the controller (e.g. 1000)') - ].flatten(1).join("\n")], - ['boot_order', _('Device names to specify the boot order')] + ' key - ' + _('Key of the controller (e.g. 1000)')].flatten(1).join("\n")], + ['nvme_controllers', [_('List with NVME controllers definitions'), + ' type - ' + _('ID of the controller from VMware'), + ' key - ' + _('Key of the controller (e.g. 2000)')].flatten(1).join("\n")], + ['boot_order', _('Device names to specify the boot order')] ] end @@ -45,7 +48,7 @@ def volume_attributes ['size_gb', _('Integer number, volume size in GB')], ['thin', 'true/false'], ['eager_zero', 'true/false'], - ['controller_key', 'Associated SCSI controller key'] + ['controller_key', 'Associated controller key'] ] end @@ -63,25 +66,25 @@ def interface_attributes def provider_specific_fields super + [ - Fields::Field.new(:label => _('Datacenter'), :path => [:datacenter]), - Fields::Field.new(:label => _('Server'), :path => [:server]), - Fields::Boolean.new(:label => _('Console password set'), :path => [:set_console_password]), - Fields::Boolean.new(:label => _('Caching enabled'), :path => [:caching_enabled]) + Fields::Field.new(label: _('Datacenter'), path: [:datacenter]), + Fields::Field.new(label: _('Server'), path: [:server]), + Fields::Boolean.new(label: _('Console password set'), path: [:set_console_password]), + Fields::Boolean.new(label: _('Caching enabled'), path: [:caching_enabled]) ] end def provider_vm_specific_fields [ - Fields::Field.new(:label => _('CPUs'), :path => [:cpus]), - Fields::Field.new(:label => _('Memory'), :path => [:memory_mb]), - Fields::Field.new(:label => _('Power Status'), :path => [:power_state]), - Fields::Field.new(:label => _('Host Name'), :path => [:hostname]), - Fields::Field.new(:label => _('Connection Status'), :path => [:connection_status]), - Fields::Field.new(:label => _('Hardware Version'), :path => [:hardware_version]), - Fields::Field.new(:label => _('Path'), :path => [:path]), - Fields::Field.new(:label => _('Operating System'), :path => [:operatingsystem]), - Fields::Field.new(:label => _('Mac'), :path => [:mac]), - Fields::List.new(:label => _('Boot order'), :path => [:boot_order]) + Fields::Field.new(label: _('CPUs'), path: [:cpus]), + Fields::Field.new(label: _('Memory'), path: [:memory_mb]), + Fields::Field.new(label: _('Power Status'), path: [:power_state]), + Fields::Field.new(label: _('Host Name'), path: [:hostname]), + Fields::Field.new(label: _('Connection Status'), path: [:connection_status]), + Fields::Field.new(label: _('Hardware Version'), path: [:hardware_version]), + Fields::Field.new(label: _('Path'), path: [:path]), + Fields::Field.new(label: _('Operating System'), path: [:operatingsystem]), + Fields::Field.new(label: _('Mac'), path: [:mac]), + Fields::List.new(label: _('Boot order'), path: [:boot_order]) ] end