Sha256: 6a05ac81e066d31d2491fcfa49077766079990b56e75c8021d9b77d67d92ca4e

Contents?: true

Size: 1.23 KB

Versions: 11

Compression:

Stored size: 1.23 KB

Contents

module HammerCLIForeman
  class TablePreference < HammerCLIForeman::Command
    resource :table_preferences
    command_name "table-preference"

    class ListCommand < HammerCLIForeman::ListCommand
      output do
        field :id, _("Id")
        field :name, _("Name")
        field :columns, _("Columns"), Fields::List
      end

      build_options
    end

    class CreateCommand < HammerCLIForeman::CreateCommand
      success_message _('Table preference created.')
      failure_message _('Could not create table preference')

      build_options
    end

    class UpdateCommand < HammerCLIForeman::UpdateCommand
      success_message _('Table preference updated.')
      failure_message _('Could not update table preference')

      build_options
    end

    class InfoCommand < HammerCLIForeman::InfoCommand
      output ListCommand.output_definition do
        field :created_at, _("Created at"), Fields::Date
        field :updated_at, _("Updated at"), Fields::Date
      end

      build_options
    end

    class DeleteCommand < HammerCLIForeman::DeleteCommand
      success_message _('Table preference deleted.')
      failure_message _('Could not remove table preference')

      build_options
    end

    autoload_subcommands
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hammer_cli_foreman-3.14.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.13.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.12.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.10.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.9.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.8.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.7.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.5.1 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.6.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.5.0 lib/hammer_cli_foreman/table_preference.rb
hammer_cli_foreman-3.4.0 lib/hammer_cli_foreman/table_preference.rb