Project

General

Profile

Actions

Bug #4201

closed

can't update operating system by label

Added by Martin Bacovsky almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

note that parameter is searched by name actualy

hammer -v os info --label "Fedora 19" 
[ INFO 2014-01-28 14:24:22 Init] Initialization of Hammer CLI (0.0.16) has started...
[ INFO 2014-01-28 14:24:22 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-28 14:24:22 Init] Configuration from the file /home/mbacovsk/.foreman/cli_config.yml has been loaded
[ INFO 2014-01-28 14:24:22 Modules] Extension module hammer_cli_foreman (0.0.17) loaded
[ INFO 2014-01-28 14:24:22 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true}
[ INFO 2014-01-28 14:24:22 HammerCLIForeman::OperatingSystem] Called with options: {}
[DEBUG 2014-01-28 14:24:22 ForemanApi::Resources::OperatingSystem] Calling 'index' with params {
    :search => "name = Fedora 19" 
}
[DEBUG 2014-01-28 14:24:22 ForemanApi::Resources::OperatingSystem] Method 'index' responded with {
       "total" => 2,
    "subtotal" => 0,
        "page" => 1,
    "per_page" => 20,
      "search" => "name = Fedora 19",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => []
}
[ERROR 2014-01-28 14:24:22 Exception] Error: operatingsystem with label 'Fedora 19' not found
Error: operatingsystem with label 'Fedora 19' not found
[ERROR 2014-01-28 14:24:22 Exception] 

RuntimeError (operatingsystem with label 'Fedora 19' not found):
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/apipie/command.rb:88:in `name_to_id'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/apipie/command.rb:80:in `block in identifier_option'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:210:in `instance_exec'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:210:in `block in define_simple_writer_for'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/attribute/instance.rb:62:in `take'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/option/parsing.rb:32:in `parse_options'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/command.rb:52:in `parse'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:30:in `parse'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/command.rb:66:in `run'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/subcommand/execution.rb:11:in `execute'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/command.rb:67:in `run'
    /home/mbacovsk/work/theforeman/hammer-cli/lib/hammer_cli/abstract.rb:22:in `run'
    /home/mbacovsk/.gem/ruby/gems/clamp-0.6.3/lib/clamp/command.rb:125:in `run'
    /home/mbacovsk/work/theforeman/hammer-cli/bin/hammer:61:in `<top (required)>'
    /home/mbacovsk/.gem/ruby/bin/hammer:23:in `load'
    /home/mbacovsk/.gem/ruby/bin/hammer:23:in `<main>'

Actions

Also available in: Atom PDF