[ INFO 2016-02-23 10:53:35 Init] Initialization of Hammer CLI (0.5.1) has started... [DEBUG 2016-02-23 10:53:35 Init] Running at ruby 1.9.3-p484 [ INFO 2016-02-23 10:53:35 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded [ INFO 2016-02-23 10:53:35 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded [ INFO 2016-02-23 10:53:35 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2016-02-23 10:53:35 Connection] Registered: foreman [DEBUG 2016-02-23 10:53:35 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en" } [ INFO 2016-02-23 10:53:35 Modules] Extension module hammer_cli_foreman (0.5.1) loaded [DEBUG 2016-02-23 10:53:35 Init] Using locale 'en' [DEBUG 2016-02-23 10:53:35 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/locale' [DEBUG 2016-02-23 10:53:35 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/locale' [ INFO 2016-02-23 10:53:35 HammerCLI::MainCommand] Called with options: {"option_debug"=>true, "option_username"=>"admin", "option_password"=>"***"} [ INFO 2016-02-23 10:53:36 HammerCLIForeman::Host] Called with options: {} [ INFO 2016-02-23 10:53:36 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_managed"=>true, "option_build"=>true, "option_enabled"=>true, "option_overwrite"=>true, "option_compute_attributes"=>{"cpus"=>"4", "memory"=>"12884901888", "start"=>"1", "image_id"=>"/var/lib/libvirt/images/win7-appnode.qcow2"}, "option_volume_list"=>[{"pool_name"=>"virt-images", "capacity"=>"150G", "format_type"=>"qcow2", "allocation"=>"0G"}], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "compute_type"=>"bridge", "compute_bridge"=>"br0", "compute_model"=>"virtio", "ip"=>"172.17.31.10"}], "option_provision_method"=>"image", "option_environment_id"=>1, "option_architecture_id"=>1, "option_domain_id"=>1, "option_operatingsystem_id"=>2, "option_subnet_id"=>1, "option_compute_resource_id"=>1, "option_hostgroup_id"=>3, "option_name"=>"r80dm", "option_puppet_proxy_id"=>1, "option_puppet_ca_proxy_id"=>1} [ INFO 2016-02-23 10:53:36 API] POST /api/hosts [DEBUG 2016-02-23 10:53:36 API] Params: { "host" => { "name" => "r80dm", "environment_id" => 1, "architecture_id" => 1, "domain_id" => 1, "puppet_proxy_id" => 1, "operatingsystem_id" => 2, "subnet_id" => 1, "compute_resource_id" => 1, "hostgroup_id" => 3, "puppet_ca_proxy_id" => 1, "build" => true, "enabled" => true, "provision_method" => "image", "managed" => true, "compute_attributes" => { "cpus" => "4", "memory" => "12884901888", "start" => "1", "image_id" => "/var/lib/libvirt/images/win7-appnode.qcow2", "volumes_attributes" => { "0" => { "pool_name" => "virt-images", "capacity" => "150G", "format_type" => "qcow2", "allocation" => "0G" } } }, "overwrite" => true, "host_parameters_attributes" => {}, "interfaces_attributes" => { "0" => { "primary" => "true", "provision" => "true", "ip" => "172.17.31.10", "compute_attributes" => { "type" => "bridge", "bridge" => "br0", "model" => "virtio" } } } } } [DEBUG 2016-02-23 10:53:36 API] Headers: {} [DEBUG 2016-02-23 10:53:36 API] 500 Internal Server Error { "error" => { "message" => "Invalid MAC " } } [ERROR 2016-02-23 10:53:36 Exception] Invalid MAC Could not create the host: Invalid MAC [ERROR 2016-02-23 10:53:36 Exception] RestClient::InternalServerError (500 Internal Server Error): /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit' /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:746:in `start' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in `post' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:286:in `call_client' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:217:in `http_call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/api.rb:163:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.14/lib/apipie_bindings/resource.rb:14:in `call' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/apipie/command.rb:43:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:189:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/apipie/command.rb:34:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/bin/hammer:125:in `' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `
' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2890 0 2111 100 779 4 1 0:12:59 0:08:28 0:04:31 314 {"ip":"172.17.31.10","environment_id":1,"environment_name":"production","last_report":null,"mac":"52:54:00:4d:bf:79","realm_id":null,"realm_name":null,"sp_mac":null,"sp_ip":null,"sp_name":null,"domain_id":1,"domain_name":"localdomain","architecture_id":1,"architecture_name":"x86_64","operatingsystem_id":2,"operatingsystem_name":"windows 6.1","subnet_id":1,"subnet_name":"deployment","sp_subnet_id":null,"ptable_id":null,"ptable_name":null,"medium_id":null,"medium_name":null,"build":true,"comment":null,"disk":null,"installed_at":null,"model_id":null,"model_name":null,"hostgroup_id":3,"hostgroup_name":"ApplicationNode","owner_id":3,"owner_type":"User","enabled":true,"puppet_ca_proxy_id":1,"managed":true,"use_image":null,"image_file":"","uuid":"032b52df-0f5c-4018-843b-b9f1096678b1","compute_resource_id":1,"compute_resource_name":"z440dm","compute_profile_id":null,"compute_profile_name":null,"capabilities":["build","image"],"provision_method":"image","puppet_proxy_id":1,"certname":"r80dm.localdomain","image_id":2,"image_name":"Win7AppNode","created_at":"2016-02-23T09:53:52Z","updated_at":"2016-02-23T09:53:52Z","last_compile":null,"global_status":0,"global_status_label":"Warning","puppet_status":0,"configuration_status":0,"configuration_status_label":"No reports","build_status":1,"build_status_label":"Pending installation","name":"r80dm.localdomain","id":7,"parameters":[],"interfaces":[{"id":14,"name":"r80dm.localdomain","ip":"172.17.31.10","mac":"52:54:00:4d:bf:79","identifier":null,"primary":true,"provision":true,"type":"interface"}],"puppetclasses":[],"config_groups":[],"all_parameters":[{}],"all_puppetclasses":[{}]}