Skip to content

Commit

Permalink
Refs #35438 - Enhance VMware listing commands to include more info
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Aug 25, 2022
1 parent 880dc13 commit d91d904
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
22 changes: 20 additions & 2 deletions lib/hammer_cli_foreman/compute_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ class AvailableClustersCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :datacenter, _('Datacenter')
field :num_host, _('Hosts')
field :overall_status, ('Overall status')
field :full_path, ('Cluster path')
end

build_options
Expand All @@ -133,6 +137,9 @@ class AvailableNetworksCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id'), Fields::Field, :max_width => 200, :hide_blank => true
field :name, _('Name')
field :datacenter, _('Datacenter')
field :virtualswitch, _('Virtual Switch')
field :vlanid, _('Vlan')
end

build_options
Expand All @@ -158,6 +165,7 @@ class AvailableImagesCommand < HammerCLIForeman::ListCommand
output do
field :uuid, _('Uuid')
field :name, _('Name')
field :path, _('Path'), Fields::Field, :hide_blank => true
end

build_options
Expand All @@ -182,6 +190,10 @@ class AvailableFoldersCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :parent, _('Parent')
field :datacenter, _('Datacenter')
field :path, _('Path'), Fields::Field, :max_width => 50
field :type, _('Type')
end

build_options
Expand All @@ -206,6 +218,9 @@ class AvailableResourcePoolsCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :cluster, _('Cluster')
field :datacenter, _('Datacenter')
field :overall_status, _('Overall status')
end

build_options
Expand All @@ -230,6 +245,7 @@ class AvailableStoragePodsCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :datacenter, _('Datacenter')
end

build_options
Expand All @@ -252,8 +268,10 @@ class AvailableVirtualMachinesCommand < HammerCLIForeman::ListCommand
command_name 'virtual-machines'

output do
field :id, _("Id")
field :name, _("Name")
field :id, _('Id')
field :name, _('Name')
field :path, _('Path'), Fields::Field, :max_width => 50
field :state, _('State')
end

build_options
Expand Down
4 changes: 3 additions & 1 deletion lib/hammer_cli_foreman/compute_resource/vmware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def interface_attributes
def provider_specific_fields
super + [
Fields::Field.new(:label => _('Datacenter'), :path => [:datacenter]),
Fields::Field.new(:label => _('Server'), :path => [:server])
Fields::Field.new(:label => _('Server'), :path => [:server]),
Fields::Field.new(:label => _('Console password set'), :path => [:set_console_password]),
Fields::Field.new(:label => _('Caching enabled'), :path => [:caching_enabled])
]
end

Expand Down

0 comments on commit d91d904

Please sign in to comment.