|
hammer -d host create --name dn101 --hostgroup-id 7 --compute-resource-id 2 --provision-method image --image-id 5 --enabled true --managed true --environment-id 1 --domain-id 2 --interface "compute_network=SDC1_111" --subnet-id 2 --compute-attributes "cluster=BD_LAB,memory_mb=16384,cpus=4,start=1" --volume "datastore=BDH04_DISK3,name=HDD,size_gb=100"
|
|
No permissions to create log dir /var/log/hammer
|
|
File /var/log/hammer/hammer.log not writeable, won't log anything to the file!
|
|
[ INFO 2015-03-31T11:42:56 Init] Initialization of Hammer CLI (0.1.4) has started...
|
|
[DEBUG 2015-03-31T11:42:56 Init] Running at ruby 2.0.0-p481
|
|
[ INFO 2015-03-31T11:42:56 Init] Configuration from the file /Users/imordey/.hammer/cli.modules.d/foreman.yml has been loaded
|
|
[DEBUG 2015-03-31T11:42:57 Connection] Registered: foreman
|
|
[DEBUG 2015-03-31T11:42:57 API] Global headers: {
|
|
:content_type => "application/json",
|
|
:accept => "application/json;version=2",
|
|
"Accept-Language" => "en_GB"
|
|
}
|
|
[ INFO 2015-03-31T11:42:57 Modules] Extension module hammer_cli_foreman (0.1.4) loaded
|
|
[DEBUG 2015-03-31T11:42:57 Init] Using locale 'en_GB'
|
|
[DEBUG 2015-03-31T11:42:57 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/Library/Ruby/Gems/2.0.0/gems/hammer_cli-0.1.4/locale'
|
|
[DEBUG 2015-03-31T11:42:57 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/Library/Ruby/Gems/2.0.0/gems/hammer_cli_foreman-0.1.4/locale'
|
|
[ INFO 2015-03-31T11:42:57 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
|
|
[ INFO 2015-03-31T11:42:57 HammerCLIForeman::Host] Called with options: {}
|
|
[ INFO 2015-03-31T11:42:57 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_managed"=>true, "option_build"=>true, "option_enabled"=>true, "option_compute_attributes"=>{"cluster"=>"BD_LAB", "memory_mb"=>"16384", "cpus"=>"4", "start"=>"1"}, "option_volume_list"=>[{"datastore"=>"BDH04_DISK3", "name"=>"HDD", "size_gb"=>"100"}], "option_interface_list"=>[{"compute_network"=>"SDC1_111"}], "option_provision_method"=>"image", "option_environment_id"=>"1", "option_domain_id"=>"2", "option_subnet_id"=>"2", "option_compute_resource_id"=>"2", "option_hostgroup_id"=>"7", "option_image_id"=>"5", "option_name"=>"dn101"}
|
|
[ INFO 2015-03-31T11:42:58 API] POST /api/hosts
|
|
[DEBUG 2015-03-31T11:42:58 API] Params: {
|
|
"host" => {
|
|
"name" => "dn101",
|
|
"environment_id" => "1",
|
|
"domain_id" => "2",
|
|
"subnet_id" => "2",
|
|
"compute_resource_id" => "2",
|
|
"hostgroup_id" => "7",
|
|
"image_id" => "5",
|
|
"build" => true,
|
|
"enabled" => true,
|
|
"provision_method" => "image",
|
|
"managed" => true,
|
|
"compute_attributes" => {
|
|
"cluster" => "BD_LAB",
|
|
"memory_mb" => "16384",
|
|
"cpus" => "4",
|
|
"start" => "1",
|
|
"volumes_attributes" => {
|
|
"0" => {
|
|
"datastore" => "BDH04_DISK3",
|
|
"name" => "HDD",
|
|
"size_gb" => "100"
|
|
}
|
|
}
|
|
},
|
|
"owner_id" => nil,
|
|
"puppet_proxy_id" => nil,
|
|
"puppet_ca_proxy_id" => nil,
|
|
"puppetclass_ids" => nil,
|
|
"host_parameters_attributes" => {},
|
|
"interfaces_attributes" => {
|
|
"0" => {
|
|
"compute_attributes" => {
|
|
"network" => "SDC1_111"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
[DEBUG 2015-03-31T11:42:58 API] Headers: {}
|
|
[DEBUG 2015-03-31T11:43:01 API] 422 Unprocessable Entity
|
|
{
|
|
"error" => {
|
|
"id" => nil,
|
|
"errors" => {
|
|
"base" => [
|
|
[0] "Failed to create a compute VC02_BIGD (VMware) instance dn101.pldc1.example.com: Unknown Network ID: \n "
|
|
]
|
|
},
|
|
"full_messages" => [
|
|
[0] "Failed to create a compute VC02_BIGD (VMware) instance dn101.pldc1.example.com: Unknown Network ID: \n "
|
|
]
|
|
}
|
|
}
|
|
[ERROR 2015-03-31T11:43:01 Exception] Failed to create a compute VC02_BIGD (VMware) instance dn101.pldc1.example.com: Unknown Network ID:
|
|
|
|
Could not create the host:
|
|
Failed to create a compute VC02_BIGD (VMware) instance dn101.pldc1.example.com: Unknown Network ID:
|
|
|