[ INFO 2015-04-21 08:45:12 Init] Initialization of Hammer CLI (0.1.4) has started... [DEBUG 2015-04-21 08:45:12 Init] Running at ruby 2.0.0-p598 [ INFO 2015-04-21 08:45:12 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2015-04-21 08:45:12 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2015-04-21 08:45:12 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2015-04-21 08:45:12 Connection] Registered: foreman [DEBUG 2015-04-21 08:45:12 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en_GB" } [ INFO 2015-04-21 08:45:12 Modules] Extension module hammer_cli_foreman (0.1.4) loaded [DEBUG 2015-04-21 08:45:12 Init] Using locale 'en_GB' [DEBUG 2015-04-21 08:45:12 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/gems/gems/hammer_cli-0.1.4/locale' [DEBUG 2015-04-21 08:45:12 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/gems/gems/hammer_cli_foreman-0.1.4/locale' [ INFO 2015-04-21 08:45:12 HammerCLI::MainCommand] Called with options: {"option_debug"=>true} [ INFO 2015-04-21 08:45:13 HammerCLIForeman::Host] Called with options: {} [ INFO 2015-04-21 08:45:13 HammerCLIForeman::Host::UpdateCommand] Called with options: {"option_volume_list"=>[], "option_interface_list"=>[], "option_name"=>"foreman.example.com", "option_comment"=>"test5"} [ INFO 2015-04-21 08:45:13 API] GET /api/hosts [DEBUG 2015-04-21 08:45:13 API] Params: { :search => "name = \"foreman.example.com\"" } [DEBUG 2015-04-21 08:45:13 API] Headers: { :params => { :search => "name = \"foreman.example.com\"" } } [DEBUG 2015-04-21 08:45:15 API] Response: { "total" => 1, "subtotal" => 1, "page" => 1, "per_page" => 20, "search" => "name = \"foreman.example.com\"", "sort" => { "by" => nil, "order" => nil }, "results" => [ [0] { "ip" => "192.168.122.136", "environment_id" => 1, "environment_name" => "production", "last_report" => "2015-04-21T08:26:33Z", "mac" => "52:54:00:05:02:1b", "realm_id" => nil, "realm_name" => nil, "sp_mac" => nil, "sp_ip" => nil, "sp_name" => nil, "domain_id" => 1, "domain_name" => "example.com", "architecture_id" => 1, "architecture_name" => "x86_64", "operatingsystem_id" => 1, "operatingsystem_name" => "CentOS 7.0", "subnet_id" => nil, "subnet_name" => nil, "sp_subnet_id" => nil, "ptable_id" => nil, "ptable_name" => nil, "medium_id" => nil, "medium_name" => nil, "build" => false, "comment" => "test5", "disk" => nil, "installed_at" => nil, "model_id" => 1, "model_name" => "Standard PC (i440FX + PIIX, 1996)", "hostgroup_id" => nil, "hostgroup_name" => nil, "owner_id" => 3, "owner_type" => "User", "enabled" => true, "puppet_ca_proxy_id" => nil, "managed" => false, "use_image" => nil, "image_file" => "", "uuid" => nil, "compute_resource_id" => nil, "compute_resource_name" => nil, "compute_profile_id" => nil, "compute_profile_name" => nil, "capabilities" => [ [0] "build" ], "provision_method" => "build", "puppet_proxy_id" => nil, "certname" => "foreman.example.com", "image_id" => nil, "image_name" => nil, "created_at" => "2015-04-08T15:08:39Z", "updated_at" => "2015-04-21T08:44:42Z", "last_compile" => "2015-04-21T08:26:36Z", "last_freshcheck" => nil, "serial" => nil, "source_file_id" => nil, "puppet_status" => 0, "name" => "foreman.example.com", "id" => 1 } ] } [DEBUG 2015-04-21 08:45:15 API] Response headers: { :date => "Tue, 21 Apr 2015 08:45:13 GMT", :server => "Apache/2.4.6 (CentOS)", :foreman_version => "1.9.0-develop", :foreman_api_version => "2", :apipie_checksum => "4d656d75ef7782aedb2e0fd86c750aa4", :x_ua_compatible => "IE=Edge,chrome=1", :cache_control => "must-revalidate, private, max-age=0", :x_request_id => "f5acd7b70ccb05ebefb86f0dc162d22b", :x_runtime => "2.093286", :x_rack_cache => "miss", :x_powered_by => "Phusion Passenger 4.0.18", :set_cookie => [ [0] "_session_id=34f3f27d160ca441539200ad18c06a5d; path=/; HttpOnly", [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" ], :etag => "\"c0492f011eac2c44657beaefbf1fb3f6\"", :status => "200 OK", :connection => "close", :transfer_encoding => "chunked", :content_type => "application/json; charset=utf-8" } [ INFO 2015-04-21 08:45:15 API] PUT /api/hosts/1 [DEBUG 2015-04-21 08:45:15 API] Params: { "host" => { "name" => "foreman.example.com", "comment" => "test5", "compute_attributes" => { "volumes_attributes" => {} }, "owner_id" => nil, "puppet_proxy_id" => nil, "puppet_ca_proxy_id" => nil, "puppetclass_ids" => nil, "host_parameters_attributes" => {}, "interfaces_attributes" => {} } } [DEBUG 2015-04-21 08:45:15 API] Headers: {} [DEBUG 2015-04-21 08:45:15 API] Response: { "ip" => "192.168.122.136", "environment_id" => 1, "environment_name" => "production", "last_report" => "2015-04-21T08:26:33Z", "mac" => "52:54:00:05:02:1b", "realm_id" => nil, "realm_name" => nil, "sp_mac" => nil, "sp_ip" => nil, "sp_name" => nil, "domain_id" => 1, "domain_name" => "example.com", "architecture_id" => 1, "architecture_name" => "x86_64", "operatingsystem_id" => 1, "operatingsystem_name" => "CentOS 7.0", "subnet_id" => nil, "subnet_name" => nil, "sp_subnet_id" => nil, "ptable_id" => nil, "ptable_name" => nil, "medium_id" => nil, "medium_name" => nil, "build" => false, "comment" => "test5", "disk" => nil, "installed_at" => nil, "model_id" => 1, "model_name" => "Standard PC (i440FX + PIIX, 1996)", "hostgroup_id" => nil, "hostgroup_name" => nil, "owner_id" => 3, "owner_type" => "User", "enabled" => true, "puppet_ca_proxy_id" => nil, "managed" => false, "use_image" => nil, "image_file" => "", "uuid" => nil, "compute_resource_id" => nil, "compute_resource_name" => nil, "compute_profile_id" => nil, "compute_profile_name" => nil, "capabilities" => [ [0] "build" ], "provision_method" => "build", "puppet_proxy_id" => nil, "certname" => "foreman.example.com", "image_id" => nil, "image_name" => nil, "created_at" => "2015-04-08T15:08:39Z", "updated_at" => "2015-04-21T08:44:42Z", "last_compile" => "2015-04-21T08:26:36Z", "last_freshcheck" => nil, "serial" => nil, "source_file_id" => nil, "puppet_status" => 0, "name" => "foreman.example.com", "id" => 1, "parameters" => [], "interfaces" => [ [0] { "id" => 1, "name" => "foreman.example.com", "ip" => "192.168.122.136", "mac" => "52:54:00:05:02:1b", "identifier" => "eth0", "primary" => true, "provision" => true, "type" => "interface" }, [1] { "id" => 2, "name" => nil, "ip" => "192.168.30.10", "mac" => "52:54:00:20:de:ed", "identifier" => "eth1", "primary" => false, "provision" => false, "type" => "interface" } ], "puppetclasses" => [], "config_groups" => [], "all_puppetclasses" => [] } [DEBUG 2015-04-21 08:45:15 API] Response headers: { :date => "Tue, 21 Apr 2015 08:45:15 GMT", :server => "Apache/2.4.6 (CentOS)", :foreman_version => "1.9.0-develop", :foreman_api_version => "2", :apipie_checksum => "4d656d75ef7782aedb2e0fd86c750aa4", :x_ua_compatible => "IE=Edge,chrome=1", :cache_control => "max-age=0, private, must-revalidate", :x_request_id => "b78fa5c48ed727cfaee088fb20e86dbd", :x_runtime => "0.321076", :x_rack_cache => "invalidate, pass", :x_powered_by => "Phusion Passenger 4.0.18", :set_cookie => [ [0] "_session_id=28a67e8633e87636784f031105c95526; path=/; HttpOnly", [1] "request_method=PUT; path=/" ], :etag => "\"84ee775aa152508a70fbef661680aea6\"", :status => "200 OK", :connection => "close", :transfer_encoding => "chunked", :content_type => "application/json; charset=utf-8" }