|
[[32m INFO[0m [34m2015-01-19 15:00:37[0m [36mInit[0m] Initialization of Hammer CLI (0.1.3) has started...
|
|
[DEBUG [34m2015-01-19 15:00:37[0m [36mInit[0m] Running at ruby 1.8.7-p374
|
|
[[32m INFO[0m [34m2015-01-19 15:00:37[0m [36mInit[0m] Configuration from the file /etc/hammer/cli_config.yml has been loaded
|
|
[[32m INFO[0m [34m2015-01-19 15:00:37[0m [36mInit[0m] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
|
|
[[33m WARN[0m [34m2015-01-19 15:00:39[0m [36mModules[0m] Legacy configuration of modules detected. Check section about configuration in user manual
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mConnection[0m] Registered: foreman
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Global headers: {
|
|
:accept => "application/json;version=2",
|
|
"Accept-Language" => "en",
|
|
:content_type => "application/json"
|
|
}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mAPI[0m] GET /apidoc/apipie_checksum
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Params: {}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Headers: {
|
|
:params => {},
|
|
:accept => "application/json"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Response: {
|
|
"checksum" => "4681c58c71716de25c6227c13bac2893"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Response headers: {
|
|
:status => "200 OK",
|
|
:date => "Mon, 19 Jan 2015 15:00:39 GMT",
|
|
:x_powered_by => "Phusion Passenger 4.0.18",
|
|
:transfer_encoding => "chunked",
|
|
:cache_control => "must-revalidate, private, max-age=0",
|
|
:x_runtime => "0.004014",
|
|
:x_request_id => "9534f53933016ffeeef7da245ae31869",
|
|
:apipie_checksum => "4681c58c71716de25c6227c13bac2893",
|
|
:x_rack_cache => "miss",
|
|
:etag => "\"645d9d221a8bbf055e8f3552a774a61b\"",
|
|
:content_type => "application/json; charset=utf-8",
|
|
:server => "Apache/2.2.15 (CentOS)",
|
|
:x_ua_compatible => "IE=Edge,chrome=1"
|
|
}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mModules[0m] Extension module hammer_cli_foreman (0.1.3) loaded
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mModules[0m] Extension module hammer_cli_foreman (0.1.3) loaded
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mInit[0m] Using locale 'en'
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.3/locale'
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/share/locale'
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.3/locale'
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mInit[0m] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/share/locale'
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mHammerCLI::MainCommand[0m] Called with options: {"option_verbose"=>true, "option_show_ids"=>true, "option_debug"=>true}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mHammerCLIForeman::Host[0m] Called with options: {}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mHammerCLIForeman::Host::CreateCommand[0m] Called with options: {"option_build"=>true, "option_puppet_proxy_id"=>"1", "option_environment_name"=>"production", "option_domain_id"=>"3", "option_owner_id"=>"8", "option_name"=>"foo", "option_interface_list"=>[{"network"=>"network-30", "type"=>"network"}], "option_operatingsystem_id"=>"19", "option_compute_profile_id"=>"8", "option_enabled"=>true, "option_partition_table_id"=>"1", "option_volume_list"=>[{"datastore"=>"mushka", "size_gb"=>"10", "name"=>"'Hard disk'"}], "option_compute_attributes"=>{"path"=>"/Datacenters/Foo/vm", "cluster"=>"QA", "memory_mb"=>"2048"}, "option_compute_resource_id"=>"3", "option_architecture_id"=>"1", "option_hostgroup_id"=>"8", "option_managed"=>true}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mAPI[0m] GET /apidoc/apipie_checksum
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Params: {}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Headers: {
|
|
:params => {},
|
|
:accept => "application/json"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Response: {
|
|
"checksum" => "4681c58c71716de25c6227c13bac2893"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Response headers: {
|
|
:status => "200 OK",
|
|
:date => "Mon, 19 Jan 2015 15:00:39 GMT",
|
|
:x_powered_by => "Phusion Passenger 4.0.18",
|
|
:transfer_encoding => "chunked",
|
|
:cache_control => "must-revalidate, private, max-age=0",
|
|
:x_runtime => "0.003465",
|
|
:x_request_id => "8529258761dc1100a562a15fcb1b422f",
|
|
:apipie_checksum => "4681c58c71716de25c6227c13bac2893",
|
|
:x_rack_cache => "miss",
|
|
:etag => "\"645d9d221a8bbf055e8f3552a774a61b\"",
|
|
:content_type => "application/json; charset=utf-8",
|
|
:server => "Apache/2.2.15 (CentOS)",
|
|
:x_ua_compatible => "IE=Edge,chrome=1"
|
|
}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:39[0m [36mAPI[0m] GET /api/environments
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Params: {
|
|
:search => "name = \"production\""
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:39[0m [36mAPI[0m] Headers: {
|
|
:params => {
|
|
:search => "name = \"production\""
|
|
}
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Response: {
|
|
"results" => [
|
|
[0] {
|
|
"updated_at" => "2013-05-22T18:05:17Z",
|
|
"id" => 1,
|
|
"created_at" => "2013-05-22T18:05:17Z",
|
|
"name" => "production"
|
|
}
|
|
],
|
|
"page" => 1,
|
|
"total" => 6,
|
|
"per_page" => 100,
|
|
"sort" => {
|
|
"order" => nil,
|
|
"by" => nil
|
|
},
|
|
"search" => "name = \"production\"",
|
|
"subtotal" => 1
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Response headers: {
|
|
:status => "200 OK",
|
|
:date => "Mon, 19 Jan 2015 15:00:39 GMT",
|
|
:set_cookie => [
|
|
[0] "_session_id=11b69e92711cba9658b1235fac60eda4; path=/; HttpOnly"
|
|
],
|
|
:x_powered_by => "Phusion Passenger 4.0.18",
|
|
:transfer_encoding => "chunked",
|
|
:cache_control => "must-revalidate, private, max-age=0",
|
|
:x_runtime => "0.189001",
|
|
:x_request_id => "c0ac17336e0717c354e39ab23dc08bfe",
|
|
:apipie_checksum => "4681c58c71716de25c6227c13bac2893",
|
|
:x_rack_cache => "miss",
|
|
:foreman_version => "1.7.1",
|
|
:etag => "\"e576cd9d7230bfde10f002b5491ec1d9\"",
|
|
:content_type => "application/json; charset=utf-8",
|
|
:foreman_api_version => "2",
|
|
:server => "Apache/2.2.15 (CentOS)",
|
|
:x_ua_compatible => "IE=Edge,chrome=1"
|
|
}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:40[0m [36mAPI[0m] GET /apidoc/apipie_checksum
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Params: {}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Headers: {
|
|
:params => {},
|
|
:accept => "application/json"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Response: {
|
|
"checksum" => "4681c58c71716de25c6227c13bac2893"
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Response headers: {
|
|
:status => "200 OK",
|
|
:date => "Mon, 19 Jan 2015 15:00:40 GMT",
|
|
:x_powered_by => "Phusion Passenger 4.0.18",
|
|
:transfer_encoding => "chunked",
|
|
:cache_control => "must-revalidate, private, max-age=0",
|
|
:x_runtime => "0.004452",
|
|
:x_request_id => "3c10acd664bf2aa3103e9383d764d359",
|
|
:apipie_checksum => "4681c58c71716de25c6227c13bac2893",
|
|
:x_rack_cache => "miss",
|
|
:etag => "\"645d9d221a8bbf055e8f3552a774a61b\"",
|
|
:content_type => "application/json; charset=utf-8",
|
|
:server => "Apache/2.2.15 (CentOS)",
|
|
:x_ua_compatible => "IE=Edge,chrome=1"
|
|
}
|
|
[[32m INFO[0m [34m2015-01-19 15:00:40[0m [36mAPI[0m] POST /api/hosts
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Params: {
|
|
"host" => {
|
|
"architecture_id" => "1",
|
|
"domain_id" => "3",
|
|
"managed" => true,
|
|
"ptable_id" => "1",
|
|
"compute_profile_id" => "8",
|
|
"build" => true,
|
|
"hostgroup_id" => "8",
|
|
"compute_resource_id" => "3",
|
|
"compute_attributes" => {
|
|
"volumes_attributes" => {
|
|
"0" => {
|
|
"datastore" => "mushka",
|
|
"size_gb" => "10",
|
|
"name" => "'Hard disk'"
|
|
}
|
|
},
|
|
"path" => "/Datacenters/Foo/vm",
|
|
"cluster" => "QA",
|
|
"nics_attributes" => {
|
|
"0" => {
|
|
"network" => "network-30",
|
|
"type" => "network"
|
|
}
|
|
},
|
|
"interfaces_attributes" => {
|
|
"0" => {
|
|
"network" => "network-30",
|
|
"type" => "network"
|
|
}
|
|
},
|
|
"memory_mb" => "2048"
|
|
},
|
|
"operatingsystem_id" => "19",
|
|
"name" => "foo",
|
|
"host_parameters_attributes" => {},
|
|
"enabled" => true,
|
|
"owner_id" => "8",
|
|
"puppet_proxy_id" => "1",
|
|
"environment_id" => 1
|
|
}
|
|
}
|
|
[DEBUG [34m2015-01-19 15:00:40[0m [36mAPI[0m] Headers: {}
|
|
[DEBUG [34m2015-01-19 15:00:41[0m [36mAPI[0m] 422 Unprocessable Entity
|
|
{
|
|
"error" => {
|
|
"id" => nil,
|
|
"full_messages" => [
|
|
[0] "Failed to create a compute vsphere-foo (VMWare) instance foo.bar.com: failed to create vm: undefined method `new' for nil:NilClass\n "
|
|
],
|
|
"errors" => {
|
|
"base" => [
|
|
[0] "Failed to create a compute vsphere-foo (VMWare) instance foo.bar.com: failed to create vm: undefined method `new' for nil:NilClass\n "
|
|
]
|
|
}
|
|
}
|
|
}
|
|
[[31mERROR[0m [34m2015-01-19 15:00:41[0m [36mException[0m] Failed to create a compute vsphere-foo (VMWare) instance foo.bar.com: failed to create vm: undefined method `new' for nil:NilClass
|
|
|
|
Could not create the host:
|
|
Failed to create a compute vsphere-foo (VMWare) instance foo.bar.com: failed to create vm: undefined method `new' for nil:NilClass
|
|
|