Class: HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy

Inherits:
HammerCLI::CommandExtensions
  • Object
show all
Defined in:
lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb

Class Method Summary collapse

Class Method Details

.delete_deprecated_options(command_class) ⇒ Object



56
57
58
59
60
61
62
63
64
65
# File 'lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb', line 56

def self.delete_deprecated_options(command_class)
  %w[--puppetclass-ids --environment-id --config-group-ids].each do |switch|
    family = command_class.option_families.find do |f|
      f.head.switches.include?(switch)
    end
    command_class.declared_options.delete_if do |o|
      family.all.include?(o)
    end
  end
end

.proxy_id(resolver, name) ⇒ Object



52
53
54
# File 'lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb', line 52

def self.proxy_id(resolver, name)
  resolver.smart_proxy_id('option_name' => name)
end