module HammerCLIForeman::Filter::TaxonomyCheck

Public Class Methods

included(base) click to toggle source
# File lib/hammer_cli_foreman/filter.rb, line 54
def self.included(base)
  base.extend_help do |h|
    h.section('Overriding organizations and locations') do
      override_condition = "--override=true"
      org_opts = '--organization[s|-ids]'
      loc_opts = '--location[s|-ids]'

      h.text(_("Filters inherit organizations and locations from its role by default. This behavior can be changed by setting %{condition}\n"+
        "Therefore options %{org_opts} and %{loc_opts} are applicable only when the override flag is set.") % {
        :org_opts => org_opts,
        :loc_opts => loc_opts,
        :condition => override_condition
      })
    end
  end
end

Public Instance Methods

signal_override_usage_error() click to toggle source
# File lib/hammer_cli_foreman/filter.rb, line 50
def signal_override_usage_error
  signal_usage_error _('Organizations and locations can be set only for overriding filters')
end
taxonomy_options?() click to toggle source
# File lib/hammer_cli_foreman/filter.rb, line 46
def taxonomy_options?
  option_location_names || option_location_ids || option_organization_names || option_organization_ids
end