[ INFO 2015-08-04 10:00:18 Init] Initialization of Hammer CLI (0.2.0) has started... [DEBUG 2015-08-04 10:00:18 Init] Running at ruby 1.8.7-p374 [ INFO 2015-08-04 10:00:18 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2015-08-04 10:00:18 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2015-08-04 10:00:18 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2015-08-04 10:00:20 Connection] Registered: foreman [DEBUG 2015-08-04 10:00:20 API] Global headers: { "Accept-Language" => "en", :content_type => "application/json", :accept => "application/json;version=2" } [ INFO 2015-08-04 10:00:20 Modules] Extension module hammer_cli_foreman (0.2.0) loaded [DEBUG 2015-08-04 10:00:20 Init] Using locale 'en' [DEBUG 2015-08-04 10:00:20 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/locale' [DEBUG 2015-08-04 10:00:20 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/locale' [ INFO 2015-08-04 10:00:20 HammerCLI::MainCommand] Called with options: {"option_username"=>"jvandewege", "option_debug"=>true} [ INFO 2015-08-04 10:00:21 HammerCLIForeman::Host] Called with options: {} [ INFO 2015-08-04 10:00:21 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_user_login"=>"foremanAdmins", "option_interface_list"=>[], "option_owner_type"=>"Usergroup", "option_volume_list"=>[], "option_name"=>"aptcacher01.nieuwland.nl"} [ INFO 2015-08-04 10:00:22 API] GET /api/hosts [DEBUG 2015-08-04 10:00:22 API] Params: { :search => "name = \"aptcacher01.nieuwland.nl\"" } [DEBUG 2015-08-04 10:00:22 API] Headers: { :params => { :search => "name = \"aptcacher01.nieuwland.nl\"" } } [DEBUG 2015-08-04 10:00:30 API] Response: { "sort" => { "order" => nil, "by" => nil }, "subtotal" => 1, "search" => "name = \"aptcacher01.nieuwland.nl\"", "page" => 1, "per_page" => 200, "total" => 111, "results" => [ [0] { "updated_at" => "2015-08-04T07:53:44Z", "image_name" => nil, "owner_type" => "User", "use_image" => nil, "medium_id" => nil, "subnet_id" => nil, "id" => 110, "enabled" => true, "operatingsystem_name" => "Debian 7.8", "domain_name" => "nieuwland.nl", "realm_name" => nil, "ip" => "172.19.1.24", "ptable_name" => nil, "subnet_name" => nil, "sp_ip" => nil, "sp_mac" => nil, "last_compile" => "2015-08-04T07:53:35Z", "puppet_proxy_id" => 1, "owner_id" => 3, "hostgroup_name" => "standaard-linux/linux-debian", "installed_at" => nil, "disk" => nil, "comment" => "", "image_id" => nil, "compute_resource_name" => nil, "hostgroup_id" => 8, "model_name" => "oVirt Node", "build" => false, "sp_subnet_id" => nil, "sp_name" => nil, "realm_id" => nil, "serial" => nil, "provision_method" => "build", "puppet_ca_proxy_id" => 1, "medium_name" => nil, "mac" => "00:1a:4a:10:10:df", "environment_name" => "production", "last_freshcheck" => nil, "created_at" => "2015-03-13T12:14:15Z", "compute_profile_name" => nil, "image_file" => "", "model_id" => 1, "name" => "aptcacher01.nieuwland.nl", "source_file_id" => nil, "certname" => "aptcacher01.nieuwland.nl", "managed" => false, "capabilities" => [ [0] "build" ], "compute_profile_id" => nil, "compute_resource_id" => nil, "uuid" => nil, "ptable_id" => nil, "domain_id" => 1, "last_report" => "2015-08-04T07:53:29Z", "environment_id" => 1, "puppet_status" => 0, "operatingsystem_id" => 7, "architecture_name" => "x86_64", "architecture_id" => 1 } ] } [DEBUG 2015-08-04 10:00:30 API] Response headers: { :etag => "\"0ff4b04b106e3971637fe43bc66cd3b8\"", :status => "200 OK", :set_cookie => [ [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQ4NzVjM2Q1YzVhMTM1Y2JmYTkxNTUzMGJkZTVmMTlmBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--b5106e3bd8800e195087dd61944a483ec9fca5b5; path=/; HttpOnly", [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" ], :x_rack_cache => "miss", :transfer_encoding => "chunked", :foreman_version => "1.8.2", :cache_control => "must-revalidate, private, max-age=0", :foreman_api_version => "2", :content_type => "application/json; charset=utf-8", :x_ua_compatible => "IE=Edge,chrome=1", :x_request_id => "326d2a74ccaadd7a12700dc347e99822", :date => "Tue, 04 Aug 2015 08:00:22 GMT", :x_powered_by => "Phusion Passenger 4.0.18", :x_runtime => "8.038138", :apipie_checksum => "9eb13649592020782c038c8cd4e5843c", :server => "Apache/2.2.15 (CentOS)", :connection => "close" } [ INFO 2015-08-04 10:00:30 API] GET /api/users [DEBUG 2015-08-04 10:00:30 API] Params: { :search => "login = \"foremanAdmins\"" } [DEBUG 2015-08-04 10:00:30 API] Headers: { :params => { :search => "login = \"foremanAdmins\"" } } /usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread': Interrupt from /usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill' from /usr/lib/ruby/1.8/timeout.rb:67:in `timeout' from /usr/lib/ruby/1.8/timeout.rb:101:in `timeout' from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline' from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line' from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new' from /usr/lib/ruby/1.8/net/http.rb:1051:in `__request__' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in `request' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:176:in `transmit' from /usr/lib/ruby/1.8/net/http.rb:543:in `start' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/resource.rb:54:in `get' from /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.13/lib/apipie_bindings/api.rb:280:in `send' from /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.13/lib/apipie_bindings/api.rb:280:in `call_client' from /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.13/lib/apipie_bindings/api.rb:211:in `http_call' from /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.13/lib/apipie_bindings/api.rb:162:in `call' from /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.13/lib/apipie_bindings/resource.rb:14:in `call' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:178:in `resolved_call' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:164:in `find_resource_raw' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:158:in `find_resource' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:133:in `user_id' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:149:in `send' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:149:in `get_resource_id' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/host.rb:69:in `request_params' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/command.rb:43:in `send_request' from /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:185:in `send_request' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/command.rb:34:in `execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/../abstract.rb:23:in `run' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/../abstract.rb:23:in `run' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/../abstract.rb:23:in `run' from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run' from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/bin/hammer:108 from /usr/bin/hammer:19:in `load' from /usr/bin/hammer:19