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 26, 2022
1 parent 880dc13 commit b8a7741
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
20 changes: 18 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,9 @@ class AvailableClustersCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :datacenter, _('Datacenter')
field :num_host, _('Hosts')
field :full_path, ('Cluster path')
end

build_options
Expand All @@ -133,6 +136,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 +164,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 +189,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 +217,8 @@ class AvailableResourcePoolsCommand < HammerCLIForeman::ListCommand
output do
field :id, _('Id')
field :name, _('Name')
field :cluster, _('Cluster')
field :datacenter, _('Datacenter')
end

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

build_options
Expand All @@ -252,8 +266,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 b8a7741

Please sign in to comment.