I am trying to understand how hammer-cli options config works. *Plugin hammer-cli-katello : What is the config/code that ensures --id option to be numeric ?*
I see that 'clamp' gem is being used, but didn't found anything that matches the validation part in Readme <https://github.com/mdub/clamp#validation> The error which I see while doing *info *on content-view is: [vagrant@centos7-hammer-devel hammer-cli-katello]$ hammer -s localhost:3000 content-view info --id="" Error: option '--id': numeric value is required See: 'hammer content-view info --help' Debug trace for above query: https://da.gd/t94F In case of foreman a delete on architecture with --id='' is actually making an API call which it shouldn't and validate *--id *option prior. [vagrant@centos7-hammer-devel hammer-cli-katello]$ hammer -s localhost:3000 architecture delete --id='' Could not delete the architecture: 404 Not Found Debug trace for above query: https://da.gd/Q58G -- I found `class Number` is a normalizer https://github.com/theforeman/hammer-cli/blob/36419717ad2ea6e012e8a6bb7623258e6e48f009/lib/hammer_cli/options/normalizers.rb#L94 But not sure how options are defined of that type(Numeric in this case). The reason behind this is I need to know why *--id=''* is giving the above error in case of katello related models(content-views, compute resource, hosts etc.) AND why its not raising error for foreman related models(domain, architecture etc.) -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
