Sha256: 0c9f474b53222b930f8270dfae0652979c1d9169356a47113fa22419cbd6d913

Contents?: true

Size: 956 Bytes

Versions: 9

Compression:

Stored size: 956 Bytes

Contents

module HammerCLIForemanPuppet
  module CommandExtensions
    class PuppetEnvironments < HammerCLI::CommandExtensions
      # FIXME: Temp workaround for option builders in case of multiple plugins
      # extensions of the same command
      option_family do
        parent '--puppet-environment-ids', 'PUPPET_ENVIRONMENT_IDS', _('IDs of associated Puppet environment'),
               format: HammerCLI::Options::Normalizers::List.new,
               attribute_name: :option_environment_ids
        child '--puppet-environments', 'PUPPET_ENVIRONMENT_NAMES', _('Names of associated Puppet environment'),
              attribute_name: :option_environment_names
      end

      option_sources do |sources, command|
        sources.find_by_name('IdResolution').insert_relative(
          :after,
          'IdsParams',
          HammerCLIForemanPuppet::OptionSources::PuppetEnvironmentParams.new(command)
        )
        sources
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hammer_cli_foreman_puppet-0.1.1 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.1.0 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.7 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.6 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.5 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.4 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.3 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.2 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb
hammer_cli_foreman_puppet-0.0.1 lib/hammer_cli_foreman_puppet/command_extensions/environments.rb