Actions
Bug #12090
closedforeman-cli 0.4 does not work with foreman 1.10-dev
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
easy
Triaged:
Team Backlog:
Description
creating a host with parameters gives the following error:
[DEBUG 2015-10-07 17:27:01 API] Headers: {} [DEBUG 2015-10-07 17:27:01 API] 500 Internal Server Error { "error" => { "message" => "unknown attribute: nested" } } [ERROR 2015-10-07 17:27:01 Exception] unknown attribute: nested Could not create the host: unknown attribute: nested [ERROR 2015-10-07 17:27:01 Exception] RestClient::InternalServerError (500 Internal Server Error): /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/abstract_response.rb:48:in `return!' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/request.rb:269:in `process_result' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/request.rb:212:in `block in transmit' /usr/lib/ruby/1.9.1/net/http.rb:745:in `start' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/request.rb:206:in `transmit' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/request.rb:68:in `execute' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/request.rb:35:in `execute' /var/lib/gems/1.9.1/gems/rest-client-1.6.8/lib/restclient/resource.rb:67:in `post' /var/lib/gems/1.9.1/gems/apipie-bindings-0.0.15/lib/apipie_bindings/api.rb:285:in `call_client' /var/lib/gems/1.9.1/gems/apipie-bindings-0.0.15/lib/apipie_bindings/api.rb:216:in `http_call' /var/lib/gems/1.9.1/gems/apipie-bindings-0.0.15/lib/apipie_bindings/api.rb:162:in `call' /var/lib/gems/1.9.1/gems/apipie-bindings-0.0.15/lib/apipie_bindings/resource.rb:14:in `call' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/lib/hammer_cli/apipie/command.rb:43:in `send_request' /usr/lib/ruby/vendor_ruby/hammer_cli_foreman/commands.rb:185:in `send_request' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/lib/hammer_cli/apipie/command.rb:34:in `execute' /usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute' /usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /usr/lib/ruby/vendor_ruby/clamp/subcommand/execution.rb:11:in `execute' /usr/lib/ruby/vendor_ruby/clamp/command.rb:68:in `run' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/lib/hammer_cli/abstract.rb:23:in `run' /usr/lib/ruby/vendor_ruby/clamp/command.rb:133:in `run' /var/lib/gems/1.9.1/gems/hammer_cli-0.4.0/bin/hammer:125:in `<top (required)>' /usr/local/bin/hammer:23:in `load' /usr/local/bin/hammer:23:in `<main>'
I believe the issue is with the added field in the json query called nested:
"host_parameters_attributes" => [ [ 0] { "name" => "raidstyle", "value" => "\"none\"", "nested" => "" },
Updated by Daniel Gagnon about 9 years ago
in host.rb, replacing line 115:
{"name"=>key, "value"=>value.inspect, "nested"=>""}
by
{"name"=>key, "value"=>value.inspect}
solves the issue.
Updated by Dominic Cleal about 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/198 added
- Pull request deleted (
)
Updated by Anonymous about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|64ed6bd8fa8f4340c831e4671294947a223a62c2.
Updated by Dominic Cleal almost 9 years ago
- Related to Bug #12566: New Host API changed host_parameters_attributes behavior added
Actions