Sha256: 1df0eecf9197f23deda0d1a2692e0b2004a642285a1b524c319166edc6ad266f

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 KB

Contents

module HammerCLIForeman

  class Architecture < HammerCLIForeman::Command

    resource :architectures

    class ListCommand < HammerCLIForeman::ListCommand

      output do
        field :id, _("Id")
        field :name, _("Name")
      end

      apipie_options
    end


    class InfoCommand < HammerCLIForeman::InfoCommand

      output ListCommand.output_definition do
        field :operatingsystem_ids, _("OS ids"), Fields::List
        field :created_at, _("Created at"), Fields::Date
        field :updated_at, _("Updated at"), Fields::Date
      end

      apipie_options
    end


    class CreateCommand < HammerCLIForeman::CreateCommand
      success_message _("Architecture created")
      failure_message _("Could not create the architecture")

      apipie_options
    end


    class DeleteCommand < HammerCLIForeman::DeleteCommand
      success_message _("Architecture deleted")
      failure_message _("Could not delete the architecture")

      apipie_options
    end


    class UpdateCommand < HammerCLIForeman::UpdateCommand
      success_message _("Architecture updated")
      failure_message _("Could not update the architecture")

      apipie_options
    end

    include HammerCLIForeman::AssociatingCommands::OperatingSystem

    autoload_subcommands
  end

end

HammerCLI::MainCommand.subcommand 'architecture', _("Manipulate architectures."), HammerCLIForeman::Architecture

Version data entries

1 entries across 1 versions & 1 rubygems

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