Hi,
I think there is an issue with “hammer sc-param add-override-value”
It looks like the help menu is not sufficient and there is a missing option
for the smart-class parameter name – which means I can’t actually use this
function:
Help menu
[root@puppetmaster lib]# hammer sc-param add-override-value --help
Usage:
hammer sc-param add-override-value [OPTIONS]
Options:
–match MATCH
–puppet-class PUPPET_CLASS_NAME Puppet class name
–puppet-class-id PUPPET_CLASS_ID id of puppetclass
–value VALUE
-h, --help print help
Basic output
[root@puppetmaster lib]# hammer sc-param add-override-value --match
hostgroup=LINUX/AVS --puppet-class oovoo_avs --value 5.3.0.4
Could not create the override_value:
Error: Unknown option name 'option_smart_class_parameter_name'
Debug output
[root@puppetmaster lib]# hammer -d sc-param add-override-value --match
hostgroup=LINUX/AVS --puppet-class oovoo_avs --value 5.3.0.4
[ INFO 2016-03-30 17:44:35 Init] Initialization of Hammer CLI (0.5.1) has
started…
[DEBUG 2016-03-30 17:44:35 Init] Running at ruby 1.9.3-p484
[ INFO 2016-03-30 17:44:35 Init] Configuration from the file
/etc/hammer/cli_config.yml has been loaded
[ INFO 2016-03-30 17:44:35 Init] Configuration from the file
/etc/hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2016-03-30 17:44:36 Connection] Registered: foreman
[DEBUG 2016-03-30 17:44:36 API] Global headers: {
:content_type => "application/json",
:accept => "application/json;version=2",
"Accept-Language" => "en"
}
[ INFO 2016-03-30 17:44:36 Modules] Extension module hammer_cli_foreman
(0.5.1) loaded
[DEBUG 2016-03-30 17:44:36 Init] Using locale 'en'
[DEBUG 2016-03-30 17:44:36 Init] 'mo' files for locale domain 'hammer-cli'
loaded from
'/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/locale'
[DEBUG 2016-03-30 17:44:36 Init] 'mo' files for locale domain
'hammer-cli-foreman' loaded from
'/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/locale'
[ INFO 2016-03-30 17:44:36 HammerCLI::MainCommand] Called with options:
{"option_debug"=>true}
[ INFO 2016-03-30 17:44:36 HammerCLIForeman::SmartClassParameter] Called
with options: {}
[ERROR 2016-03-30 17:44:36 Exception] Error: Unknown option name
'option_smart_class_parameter_name'
Could not create the override_value:
Error: Unknown option name 'option_smart_class_parameter_name'
[ERROR 2016-03-30 17:44:36 Exception]
RuntimeError (Unknown option name 'option_smart_class_parameter_name'):
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:41:in
`get_option'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:46:in
`option_passed?'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:68:in
`block in exist?'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:67:in
`each'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:67:in
`exist?'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/smart_class_parameter.rb:142:in
`block in <class:AddOverrideValueCommand>'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:109:in
`instance_eval'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/validator.rb:109:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:46:in
`validate_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:31:in
`parse'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:67:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
`execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in
`execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in
`run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/bin/hammer:125:in
`<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'
Hammer cli foreman version
hammer --version
hammer (0.5.1)
- hammer_cli_foreman (0.5.1)
Did I miss something or is there an issue here – I tried some options that
looked close to an example I saw online, but these are also not correct (–smart-class-parameter
version, --name version, etc…)
Thanks,
Dima