Sha256: a7de386e69cd2c471bac461655fbbab34bc6ed1cb9a257dac092a5883400013f

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

module HammerCLIForeman

  class Model < HammerCLIForeman::Command

    resource :models

    class ListCommand < HammerCLIForeman::ListCommand

      output do
        field :id, _("Id")
        field :name, _("Name")
        field :vendor_class, _("Vendor class")
        field :hardware_model, _("HW model")
      end

      apipie_options
    end


    class InfoCommand < HammerCLIForeman::InfoCommand

      output ListCommand.output_definition do
        field :info, _("Info")
        field :created_at, _("Created at"), Fields::Date
        field :updated_at, _("Updated at"), Fields::Date
      end

      apipie_options
    end


    class CreateCommand < HammerCLIForeman::CreateCommand
      success_message _("Hardware model created")
      failure_message _("Could not create the hardware model")

      apipie_options
    end

    class DeleteCommand < HammerCLIForeman::DeleteCommand
      success_message _("Hardware model deleted")
      failure_message _("Could not delete the hardware model")

      apipie_options
    end


    class UpdateCommand < HammerCLIForeman::UpdateCommand
      success_message _("Hardware model updated")
      failure_message _("Could not update the hardware model")

      apipie_options
    end


    autoload_subcommands
  end

end

HammerCLI::MainCommand.subcommand 'model', _("Manipulate hardware models."), HammerCLIForeman::Model

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hammer_cli_foreman-0.1.0 lib/hammer_cli_foreman/model.rb