Sha256: 393eaebb019b89786f2ebd9c6002f3692839f635872a7d308eaa4fdfc4b29ad1

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

module HammerCLIForemanOpenscap
  class Policy < HammerCLIForeman::Command

    resource :policies

    class ListCommand < HammerCLIForeman::ListCommand
      output do
        field :id, _("Id")
        field :name, _("Name")
        field :created_at, _("Created at")
      end
      build_options
    end

    class InfoCommand < HammerCLIForeman::InfoCommand
      output ListCommand.output_definition do
        field :period, _("Period")
        field :weekday, _("Weekday")
        field :day_of_month, _("Day of month")
        field :cron_line, _("Cron line")
        field :scap_content_id, _("SCAP content Id")
        field :scap_content_profile_id, _("SCAP Content profile Id")
        field :tailoring_file_id, _("Tailoring file Id")
        field :tailoring_file_profile_id, _("Tailoring file profile Id")
        HammerCLIForeman::References.taxonomies(self)
        HammerCLIForeman::References.hostgroups(self)
      end
      build_options
    end

    class DeleteCommand < HammerCLIForeman::DeleteCommand
      success_message _("Policy has been deleted")
      failure_message _("Could not delete the policy")

      build_options
    end

    class CreateCommand < HammerCLIForemanOpenscap::CreateCommand

      success_message _("Policy created")
      failure_message _("Could not create the policy")

      build_options

    end

    class UpdateCommand < HammerCLIForemanOpenscap::UpdateCommand
      success_message _("Policy updated")
      failure_message _("Could not update the policy")

      build_options
    end

    autoload_subcommands
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hammer_cli_foreman_openscap-0.1.6 lib/hammer_cli_foreman_openscap/policy.rb
hammer_cli_foreman_openscap-0.1.5 lib/hammer_cli_foreman_openscap/policy.rb