Project

General

Profile

Bug #29652

Unable to provision using hammer: getting VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

Added by Ted Kozma over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

I can provision fine manually from Foreman Web UI.

When provisioning using hammer (how would one automate otherwise?), having tried a bunch of different permutations of the options, getting consistently:

Could not create the host:
  Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

Foreman version: 1.24.2
ruby-foreman-xen: 1.0.1-1

Last command I tried is:

❯ hammer  --debug  host create  --compute-profile-id 2 --name 'api10' --build=1 --managed=True --comment "Hammered" --compute-resource-id 4  --domain prod.tor.tpstk.ca --enabled true --puppet-environment production --hostgroup-id 9 --compute-attributes "vcpus_min=4,vcpus_max=4,memory_min=17179869184,memory_max=17179869184,physical_size=22,VIFs['print']='prod_2088',host_compute_attributes_start=1,hypervisor_host='xcp17.infra.tor.tpstk.ca',builtin_template=74ae424d-a1d3-4d96-9827-d1d60a4c7511"    --interface "primary=true,provision=true,managed=true"   --location-id 2 --medium-id 7 --operatingsystem-id 1 --organization-id=1
[ INFO 2020-04-29T09:25:48 Init] Initialization of Hammer CLI (0.19.2) has started...
[DEBUG 2020-04-29T09:25:48 Init] Running at ruby 2.6.3-p62
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli_config.yml has been loaded
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ssh.yml has been loaded
[ INFO 2020-04-29T09:25:48 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2020-04-29T09:25:49 SSLoptions] Matching CA cert was found in local CA store /Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem
[DEBUG 2020-04-29T09:25:49 SSLoptions] SSL options: {
     :verify_ssl => true,
    :ssl_ca_file => "/Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem" 
}
[DEBUG 2020-04-29T09:25:49 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2020-04-29T09:25:49 API] Follow redirects: never
[DEBUG 2020-04-29T09:25:49 Connection] Registered: foreman
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command:
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for *all* except *nothing* on HammerCLIForeman::Command.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::ListCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::InfoCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand.
[ INFO 2020-04-29T09:25:49 Modules] Extension module hammer_cli_foreman (0.19.7) loaded.
[ INFO 2020-04-29T09:25:49 Modules] Extension module hammer_cli_foreman_discovery (1.0.2) loaded.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::SmartClassParameter::ListCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::SmartClassParameter::ListCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::ListCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::ListCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::InfoCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::InfoCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::ListCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::ListCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f95368d8830@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:25:49 #<Class:0x00007f9536e28330>] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:25:49 #<Class:0x00007f9536e28330>] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f9536e28240@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:25:49 Extensions] Applied #<Class:0x00007f9536e28330> for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f953641e998>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f95368d8830@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:25:49 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:25:49 #<Class:0x00007f9536b90208>] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:25:49 #<Class:0x00007f9536b90208>] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f9536b90168@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:25:49 Extensions] Applied #<Class:0x00007f9536b90208> for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[ INFO 2020-04-29T09:25:49 Modules] Extension module hammer_cli_foreman_ssh (0.0.3) loaded.
[DEBUG 2020-04-29T09:25:49 Init] Using locale 'en'
[DEBUG 2020-04-29T09:25:49 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/locale'
[DEBUG 2020-04-29T09:25:49 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/locale'
[ INFO 2020-04-29T09:25:49 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f953642d650@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[ INFO 2020-04-29T09:25:49 HammerCLIForeman::Host] Called with options: {}
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f953642d650@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[DEBUG 2020-04-29T09:25:49 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called block for HammerCLIForeman::Host::UpdateCommand option sources:
    #<Proc:0x00007f953641e560@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:13>
[ INFO 2020-04-29T09:25:49 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:25:49 API] GET /api/environments
[DEBUG 2020-04-29T09:25:49 API] Params: {
      :search => "name = \"production\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:25:49 API] Headers: {
    :params => {
          :search => "name = \"production\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:25:49 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:25:50 API] Response: {
       "total" => 3,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"production\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
            "created_at" => "2020-02-14T22:19:20.156Z",
            "updated_at" => "2020-02-14T22:19:20.156Z",
                  "name" => "production",
                    "id" => 1
        }
    ]
}
[DEBUG 2020-04-29T09:25:50 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:25:49 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "c674c234-b953-47c6-8d10-8a7a60c4c1e5",
                   :x_download_options => "noopen",
                            :x_runtime => "0.300108",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=c583f31dbabb2f364141e90042752ea4; path=/; expires=Thu, 30 Apr 2020 13:25:50 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"42ef2ec18d55cb0e4ba2ab19aa3a6ef4-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "184",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:25:50 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:25:50 API] GET /api/domains
[DEBUG 2020-04-29T09:25:50 API] Params: {
      :search => "name = \"prod.tor.tpstk.ca\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:25:50 API] Headers: {
    :params => {
          :search => "name = \"prod.tor.tpstk.ca\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:25:50 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:25:50 API] Response: {
       "total" => 4,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"prod.tor.tpstk.ca\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
              "fullname" => "prod.tor.tpstk.ca",
            "created_at" => "2020-03-02T16:33:38.779Z",
            "updated_at" => "2020-03-02T16:33:38.779Z",
                    "id" => 2,
                  "name" => "prod.tor.tpstk.ca",
                "dns_id" => 1,
                   "dns" => {
                "name" => "foreman01.tor.tpstk.ca",
                  "id" => 1,
                 "url" => "https://foreman01.tor.tpstk.ca:8443" 
            }
        }
    ]
}
[DEBUG 2020-04-29T09:25:50 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:25:50 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "2ea1bc98-544e-43a4-93df-df172817357b",
                   :x_download_options => "noopen",
                            :x_runtime => "0.307444",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=9cf55daf3ace1421b6a632b07b22b7b4; path=/; expires=Thu, 30 Apr 2020 13:25:50 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"c59f8660b47db5d95feade278c61cd54-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "237",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:25:50 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_overwrite"=>true, "option_compute_attributes"=>{"vcpus_min"=>"4", "vcpus_max"=>"4", "memory_min"=>"17179869184", "memory_max"=>"17179869184", "physical_size"=>"22", "VIFs['print']"=>"prod_2088", "host_compute_attributes_start"=>"1", "hypervisor_host"=>"xcp17.infra.tor.tpstk.ca", "builtin_template"=>"74ae424d-a1d3-4d96-9827-d1d60a4c7511"}, "option_volume_list"=>[], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "managed"=>"true"}], "option_location_id"=>2, "option_organization_id"=>1, "option_environment_name"=>"production", "option_environment_id"=>1, "option_domain_name"=>"prod.tor.tpstk.ca", "option_domain_id"=>2, "option_operatingsystem_id"=>1, "option_medium_id"=>7, "option_compute_resource_id"=>4, "option_hostgroup_id"=>9, "option_compute_profile_id"=>2, "option_name"=>"api10", "option_build"=>true, "option_enabled"=>true, "option_managed"=>true, "option_comment"=>"Hammered"}
[ INFO 2020-04-29T09:25:50 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:25:50 API] POST /api/hosts
[DEBUG 2020-04-29T09:25:50 API] Params: {
        "location_id" => 2,
    "organization_id" => 1,
               "host" => {
                         "name" => "api10",
                  "location_id" => 2,
              "organization_id" => 1,
               "environment_id" => 1,
                    "domain_id" => 2,
              "puppetclass_ids" => [],
           "operatingsystem_id" => 1,
                    "medium_id" => 7,
          "compute_resource_id" => 4,
                 "hostgroup_id" => 9,
                        "build" => true,
                      "enabled" => true,
                      "managed" => true,
                      "comment" => "Hammered",
           "compute_profile_id" => 2,
           "compute_attributes" => {
                                "vcpus_min" => "4",
                                "vcpus_max" => "4",
                               "memory_min" => "17179869184",
                               "memory_max" => "17179869184",
                            "physical_size" => "22",
                            "VIFs['print']" => "prod_2088",
            "host_compute_attributes_start" => "1",
                          "hypervisor_host" => "xcp17.infra.tor.tpstk.ca",
                         "builtin_template" => "74ae424d-a1d3-4d96-9827-d1d60a4c7511",
                       "volumes_attributes" => {}
        },
                    "overwrite" => true,
        "interfaces_attributes" => [
            [0] {
                  "primary" => "true",
                "provision" => "true",
                  "managed" => "true" 
            }
        ]
    }
}
[DEBUG 2020-04-29T09:25:50 API] Headers: {}
[DEBUG 2020-04-29T09:25:50 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2020-04-29T09:25:59 API] 422 Unprocessable Entity
[DEBUG 2020-04-29T09:25:59 API] {
    "error" => {
                   "id" => nil,
               "errors" => {
                       "conflict" => [],
            "interfaces.conflict" => [],
                           "base" => [
                [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: [\"MESSAGE_PARAMETER_COUNT_MISMATCH\", \"VM.set_affinity\", \"2\", \"1\"]\n " 
            ]
        },
        "full_messages" => [
            [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: [\"MESSAGE_PARAMETER_COUNT_MISMATCH\", \"VM.set_affinity\", \"2\", \"1\"]\n " 
        ]
    }
}
[DEBUG 2020-04-29T09:25:59 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_unprocessable_entity
[ERROR 2020-04-29T09:25:59 Exception] Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

Could not create the host:
  Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

~   11s
❯ hammer  --debug  host create  --compute-profile-id 2 --name 'api10' --build=1 --managed=True --comment "Hammered" --compute-resource-id 4  --domain prod.tor.tpstk.ca --enabled true --puppet-environment production --hostgroup-id 9 --compute-attributes "vcpus_min=4,vcpus_max=4,memory_min=17179869184,memory_max=17179869184,physical_size=22,VIFs['print']='prod_2088',host_compute_attributes_start=1,hypervisor_host='ac6ea8f4-7b5f-4416-a9a3-ca33178e4ff8',builtin_template=74ae424d-a1d3-4d96-9827-d1d60a4c7511"    --interface "primary=true,provision=true,managed=true"   --location-id 2 --medium-id 7 --operatingsystem-id 1 --organization-id=1
[ INFO 2020-04-29T09:26:38 Init] Initialization of Hammer CLI (0.19.2) has started...
[DEBUG 2020-04-29T09:26:38 Init] Running at ruby 2.6.3-p62
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli_config.yml has been loaded
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ssh.yml has been loaded
[ INFO 2020-04-29T09:26:38 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2020-04-29T09:26:39 SSLoptions] Matching CA cert was found in local CA store /Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem
[DEBUG 2020-04-29T09:26:39 SSLoptions] SSL options: {
     :verify_ssl => true,
    :ssl_ca_file => "/Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem" 
}
[DEBUG 2020-04-29T09:26:39 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2020-04-29T09:26:39 API] Follow redirects: never
[DEBUG 2020-04-29T09:26:39 Connection] Registered: foreman
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command:
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for *all* except *nothing* on HammerCLIForeman::Command.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::ListCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::InfoCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand.
[ INFO 2020-04-29T09:26:39 Modules] Extension module hammer_cli_foreman (0.19.7) loaded.
[ INFO 2020-04-29T09:26:39 Modules] Extension module hammer_cli_foreman_discovery (1.0.2) loaded.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::SmartClassParameter::ListCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::SmartClassParameter::ListCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::ListCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::ListCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::InfoCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::InfoCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::ListCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::ListCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007fcc050743f0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:26:39 #<Class:0x00007fcc05423898>] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:26:39 #<Class:0x00007fcc05423898>] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007fcc054237a8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:26:39 Extensions] Applied #<Class:0x00007fcc05423898> for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007fcc05939800>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007fcc050743f0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:26:39 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:26:39 #<Class:0x00007fcc05239780>] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:26:39 #<Class:0x00007fcc05239780>] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007fcc052396e0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:26:39 Extensions] Applied #<Class:0x00007fcc05239780> for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[ INFO 2020-04-29T09:26:39 Modules] Extension module hammer_cli_foreman_ssh (0.0.3) loaded.
[DEBUG 2020-04-29T09:26:39 Init] Using locale 'en'
[DEBUG 2020-04-29T09:26:39 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/locale'
[DEBUG 2020-04-29T09:26:39 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/locale'
[ INFO 2020-04-29T09:26:39 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007fcc0505ed48@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[ INFO 2020-04-29T09:26:39 HammerCLIForeman::Host] Called with options: {}
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007fcc0505ed48@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[DEBUG 2020-04-29T09:26:39 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called block for HammerCLIForeman::Host::UpdateCommand option sources:
    #<Proc:0x00007fcc059396c0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:13>
[ INFO 2020-04-29T09:26:39 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:26:39 API] GET /api/environments
[DEBUG 2020-04-29T09:26:39 API] Params: {
      :search => "name = \"production\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:26:39 API] Headers: {
    :params => {
          :search => "name = \"production\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:26:39 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:26:40 API] Response: {
       "total" => 3,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"production\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
            "created_at" => "2020-02-14T22:19:20.156Z",
            "updated_at" => "2020-02-14T22:19:20.156Z",
                  "name" => "production",
                    "id" => 1
        }
    ]
}
[DEBUG 2020-04-29T09:26:40 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:26:39 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "2f0a9ee6-96a2-452a-b934-6ca15bf0b302",
                   :x_download_options => "noopen",
                            :x_runtime => "0.317888",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=9ab86f921f4bf00c0277e29343362c66; path=/; expires=Thu, 30 Apr 2020 13:26:40 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"42ef2ec18d55cb0e4ba2ab19aa3a6ef4-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "184",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:26:40 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:26:40 API] GET /api/domains
[DEBUG 2020-04-29T09:26:40 API] Params: {
      :search => "name = \"prod.tor.tpstk.ca\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:26:40 API] Headers: {
    :params => {
          :search => "name = \"prod.tor.tpstk.ca\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:26:40 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:26:40 API] Response: {
       "total" => 4,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"prod.tor.tpstk.ca\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
              "fullname" => "prod.tor.tpstk.ca",
            "created_at" => "2020-03-02T16:33:38.779Z",
            "updated_at" => "2020-03-02T16:33:38.779Z",
                    "id" => 2,
                  "name" => "prod.tor.tpstk.ca",
                "dns_id" => 1,
                   "dns" => {
                "name" => "foreman01.tor.tpstk.ca",
                  "id" => 1,
                 "url" => "https://foreman01.tor.tpstk.ca:8443" 
            }
        }
    ]
}
[DEBUG 2020-04-29T09:26:40 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:26:40 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "7ae3a598-f532-4544-bf5f-056cdff48e5d",
                   :x_download_options => "noopen",
                            :x_runtime => "0.289959",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=62bdaa72d8f96a77441048ef4ab3f2e7; path=/; expires=Thu, 30 Apr 2020 13:26:40 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"c59f8660b47db5d95feade278c61cd54-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "237",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:26:40 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_overwrite"=>true, "option_compute_attributes"=>{"vcpus_min"=>"4", "vcpus_max"=>"4", "memory_min"=>"17179869184", "memory_max"=>"17179869184", "physical_size"=>"22", "VIFs['print']"=>"prod_2088", "host_compute_attributes_start"=>"1", "hypervisor_host"=>"ac6ea8f4-7b5f-4416-a9a3-ca33178e4ff8", "builtin_template"=>"74ae424d-a1d3-4d96-9827-d1d60a4c7511"}, "option_volume_list"=>[], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "managed"=>"true"}], "option_location_id"=>2, "option_organization_id"=>1, "option_environment_name"=>"production", "option_environment_id"=>1, "option_domain_name"=>"prod.tor.tpstk.ca", "option_domain_id"=>2, "option_operatingsystem_id"=>1, "option_medium_id"=>7, "option_compute_resource_id"=>4, "option_hostgroup_id"=>9, "option_compute_profile_id"=>2, "option_name"=>"api10", "option_build"=>true, "option_enabled"=>true, "option_managed"=>true, "option_comment"=>"Hammered"}
[ INFO 2020-04-29T09:26:40 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:26:40 API] POST /api/hosts
[DEBUG 2020-04-29T09:26:40 API] Params: {
        "location_id" => 2,
    "organization_id" => 1,
               "host" => {
                         "name" => "api10",
                  "location_id" => 2,
              "organization_id" => 1,
               "environment_id" => 1,
                    "domain_id" => 2,
              "puppetclass_ids" => [],
           "operatingsystem_id" => 1,
                    "medium_id" => 7,
          "compute_resource_id" => 4,
                 "hostgroup_id" => 9,
                        "build" => true,
                      "enabled" => true,
                      "managed" => true,
                      "comment" => "Hammered",
           "compute_profile_id" => 2,
           "compute_attributes" => {
                                "vcpus_min" => "4",
                                "vcpus_max" => "4",
                               "memory_min" => "17179869184",
                               "memory_max" => "17179869184",
                            "physical_size" => "22",
                            "VIFs['print']" => "prod_2088",
            "host_compute_attributes_start" => "1",
                          "hypervisor_host" => "ac6ea8f4-7b5f-4416-a9a3-ca33178e4ff8",
                         "builtin_template" => "74ae424d-a1d3-4d96-9827-d1d60a4c7511",
                       "volumes_attributes" => {}
        },
                    "overwrite" => true,
        "interfaces_attributes" => [
            [0] {
                  "primary" => "true",
                "provision" => "true",
                  "managed" => "true" 
            }
        ]
    }
}
[DEBUG 2020-04-29T09:26:40 API] Headers: {}
[DEBUG 2020-04-29T09:26:40 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2020-04-29T09:26:48 API] 500 Internal Server Error
[DEBUG 2020-04-29T09:26:48 API] {
    "status" => 500,
     "error" => "Internal Server Error" 
}
[DEBUG 2020-04-29T09:26:48 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_internal_error
[ERROR 2020-04-29T09:26:48 Exception] 500 Internal Server Error
Could not create the host:
  500 Internal Server Error
[ERROR 2020-04-29T09:26:48 Exception]

RestClient::InternalServerError (500 Internal Server Error):
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:249:in `exception_with_response'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:129:in `return!'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:353:in `block in rest_client_call_block'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/request.rb:834:in `process_result'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/request.rb:743:in `block in transmit'
    /Users/ted.kozma/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/net/http.rb:920:in `start'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/request.rb:727:in `transmit'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/request.rb:163:in `execute'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/request.rb:63:in `execute'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/rest-client-2.1.0/lib/restclient/resource.rb:69:in `post'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:327:in `call_client'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:240:in `http_call'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:190:in `call_action'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/api.rb:185:in `call'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/apipie-bindings-0.3.0/lib/apipie_bindings/resource.rb:21:in `call'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/lib/hammer_cli/apipie/command.rb:53:in `send_request'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/commands.rb:188:in `send_request'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/lib/hammer_cli/abstract.rb:76:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/lib/hammer_cli/abstract.rb:76:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/lib/hammer_cli/abstract.rb:76:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/bin/hammer:147:in `<top (required)>'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/bin/hammer:23:in `load'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/bin/hammer:23:in `<main>'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
    /Users/ted.kozma/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'

~   10s
❯ hammer  --debug  host create  --compute-profile-id 2 --name 'api10' --build=1 --managed=True --comment "Hammered" --compute-resource-id 4  --domain prod.tor.tpstk.ca --enabled true --puppet-environment production --hostgroup-id 9 --compute-attributes "vcpus_min=4,vcpus_max=4,memory_min=17179869184,memory_max=17179869184,physical_size=22,VIFs['print']='prod_2088',host_compute_attributes_start=1,hypervisor_host='',builtin_template=74ae424d-a1d3-4d96-9827-d1d60a4c7511"    --interface "primary=true,provision=true,managed=true"   --location-id 2 --medium-id 7 --operatingsystem-id 1 --organization-id=1
[ INFO 2020-04-29T09:27:28 Init] Initialization of Hammer CLI (0.19.2) has started...
[DEBUG 2020-04-29T09:27:28 Init] Running at ruby 2.6.3-p62
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli_config.yml has been loaded
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ssh.yml has been loaded
[ INFO 2020-04-29T09:27:28 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2020-04-29T09:27:28 SSLoptions] Matching CA cert was found in local CA store /Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem
[DEBUG 2020-04-29T09:27:28 SSLoptions] SSL options: {
     :verify_ssl => true,
    :ssl_ca_file => "/Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem" 
}
[DEBUG 2020-04-29T09:27:28 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2020-04-29T09:27:28 API] Follow redirects: never
[DEBUG 2020-04-29T09:27:28 Connection] Registered: foreman
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command:
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for *all* except *nothing* on HammerCLIForeman::Command.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::ListCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::InfoCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand.
[ INFO 2020-04-29T09:27:28 Modules] Extension module hammer_cli_foreman (0.19.7) loaded.
[ INFO 2020-04-29T09:27:28 Modules] Extension module hammer_cli_foreman_discovery (1.0.2) loaded.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::SmartClassParameter::ListCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::SmartClassParameter::ListCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::ListCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::ListCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::InfoCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::InfoCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::ListCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::ListCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f9afac478f8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:27:28 #<Class:0x00007f9afc2e9bb0>] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:27:28 #<Class:0x00007f9afc2e9bb0>] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f9afc2e9ac0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:27:28 Extensions] Applied #<Class:0x00007f9afc2e9bb0> for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f9afc956278>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:27:28 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f9afac478f8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:27:28 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:27:28 #<Class:0x00007f9afacce2e0>] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:27:28 #<Class:0x00007f9afacce2e0>] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f9afacce240@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:27:28 Extensions] Applied #<Class:0x00007f9afacce2e0> for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[ INFO 2020-04-29T09:27:28 Modules] Extension module hammer_cli_foreman_ssh (0.0.3) loaded.
[DEBUG 2020-04-29T09:27:29 Init] Using locale 'en'
[DEBUG 2020-04-29T09:27:29 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/locale'
[DEBUG 2020-04-29T09:27:29 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/locale'
[ INFO 2020-04-29T09:27:29 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[DEBUG 2020-04-29T09:27:29 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f9afc95f9b8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[ INFO 2020-04-29T09:27:29 HammerCLIForeman::Host] Called with options: {}
[DEBUG 2020-04-29T09:27:29 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f9afc95f9b8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[DEBUG 2020-04-29T09:27:29 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called block for HammerCLIForeman::Host::UpdateCommand option sources:
    #<Proc:0x00007f9afc956188@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:13>
[ INFO 2020-04-29T09:27:29 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:27:29 API] GET /api/environments
[DEBUG 2020-04-29T09:27:29 API] Params: {
      :search => "name = \"production\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:27:29 API] Headers: {
    :params => {
          :search => "name = \"production\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:27:29 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:27:29 API] Response: {
       "total" => 3,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"production\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
            "created_at" => "2020-02-14T22:19:20.156Z",
            "updated_at" => "2020-02-14T22:19:20.156Z",
                  "name" => "production",
                    "id" => 1
        }
    ]
}
[DEBUG 2020-04-29T09:27:29 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:27:29 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "a4172836-98d0-4865-82b5-dc14740e26fe",
                   :x_download_options => "noopen",
                            :x_runtime => "0.265009",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=33c5b8c7062d881b759c7541b9da9959; path=/; expires=Thu, 30 Apr 2020 13:27:29 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"42ef2ec18d55cb0e4ba2ab19aa3a6ef4-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "184",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:27:29 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:27:29 API] GET /api/domains
[DEBUG 2020-04-29T09:27:29 API] Params: {
      :search => "name = \"prod.tor.tpstk.ca\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:27:29 API] Headers: {
    :params => {
          :search => "name = \"prod.tor.tpstk.ca\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:27:29 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:27:29 API] Response: {
       "total" => 4,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"prod.tor.tpstk.ca\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
              "fullname" => "prod.tor.tpstk.ca",
            "created_at" => "2020-03-02T16:33:38.779Z",
            "updated_at" => "2020-03-02T16:33:38.779Z",
                    "id" => 2,
                  "name" => "prod.tor.tpstk.ca",
                "dns_id" => 1,
                   "dns" => {
                "name" => "foreman01.tor.tpstk.ca",
                  "id" => 1,
                 "url" => "https://foreman01.tor.tpstk.ca:8443" 
            }
        }
    ]
}
[DEBUG 2020-04-29T09:27:29 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:27:29 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "f0ef59b3-01ea-4fbc-b654-4103503de804",
                   :x_download_options => "noopen",
                            :x_runtime => "0.279628",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=80fa86f877aaf379783e40f8090ac647; path=/; expires=Thu, 30 Apr 2020 13:27:29 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"c59f8660b47db5d95feade278c61cd54-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "237",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:27:29 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_overwrite"=>true, "option_compute_attributes"=>{"vcpus_min"=>"4", "vcpus_max"=>"4", "memory_min"=>"17179869184", "memory_max"=>"17179869184", "physical_size"=>"22", "VIFs['print']"=>"prod_2088", "host_compute_attributes_start"=>"1", "hypervisor_host"=>"", "builtin_template"=>"74ae424d-a1d3-4d96-9827-d1d60a4c7511"}, "option_volume_list"=>[], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "managed"=>"true"}], "option_location_id"=>2, "option_organization_id"=>1, "option_environment_name"=>"production", "option_environment_id"=>1, "option_domain_name"=>"prod.tor.tpstk.ca", "option_domain_id"=>2, "option_operatingsystem_id"=>1, "option_medium_id"=>7, "option_compute_resource_id"=>4, "option_hostgroup_id"=>9, "option_compute_profile_id"=>2, "option_name"=>"api10", "option_build"=>true, "option_enabled"=>true, "option_managed"=>true, "option_comment"=>"Hammered"}
[ INFO 2020-04-29T09:27:29 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:27:29 API] POST /api/hosts
[DEBUG 2020-04-29T09:27:29 API] Params: {
        "location_id" => 2,
    "organization_id" => 1,
               "host" => {
                         "name" => "api10",
                  "location_id" => 2,
              "organization_id" => 1,
               "environment_id" => 1,
                    "domain_id" => 2,
              "puppetclass_ids" => [],
           "operatingsystem_id" => 1,
                    "medium_id" => 7,
          "compute_resource_id" => 4,
                 "hostgroup_id" => 9,
                        "build" => true,
                      "enabled" => true,
                      "managed" => true,
                      "comment" => "Hammered",
           "compute_profile_id" => 2,
           "compute_attributes" => {
                                "vcpus_min" => "4",
                                "vcpus_max" => "4",
                               "memory_min" => "17179869184",
                               "memory_max" => "17179869184",
                            "physical_size" => "22",
                            "VIFs['print']" => "prod_2088",
            "host_compute_attributes_start" => "1",
                          "hypervisor_host" => "",
                         "builtin_template" => "74ae424d-a1d3-4d96-9827-d1d60a4c7511",
                       "volumes_attributes" => {}
        },
                    "overwrite" => true,
        "interfaces_attributes" => [
            [0] {
                  "primary" => "true",
                "provision" => "true",
                  "managed" => "true" 
            }
        ]
    }
}
[DEBUG 2020-04-29T09:27:29 API] Headers: {}
[DEBUG 2020-04-29T09:27:29 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2020-04-29T09:27:38 API] 422 Unprocessable Entity
[DEBUG 2020-04-29T09:27:38 API] {
    "error" => {
                   "id" => nil,
               "errors" => {
                       "conflict" => [],
            "interfaces.conflict" => [],
                           "base" => [
                [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: undefined method `reference' for nil:NilClass\n " 
            ]
        },
        "full_messages" => [
            [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: undefined method `reference' for nil:NilClass\n " 
        ]
    }
}
[DEBUG 2020-04-29T09:27:38 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_unprocessable_entity
[ERROR 2020-04-29T09:27:38 Exception] Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: undefined method `reference' for nil:NilClass

Could not create the host:
  Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: undefined method `reference' for nil:NilClass

~   11s
❯ hammer  --debug  host create  --compute-profile-id 2 --name 'api10' --build=1 --managed=True --comment "Hammered" --compute-resource-id 4  --domain prod.tor.tpstk.ca --enabled true --puppet-environment production --hostgroup-id 9 --compute-attributes "vcpus_min=4,vcpus_max=4,memory_min=17179869184,memory_max=17179869184,physical_size=22,VIFs['print']='prod_2088',host_compute_attributes_start=1,hypervisor_host='xcp17.infra.tor.tpstk.ca',builtin_template=74ae424d-a1d3-4d96-9827-d1d60a4c7511"    --interface "primary=true,provision=true,managed=true"   --location-id 2 --medium-id 7 --operatingsystem-id 1 --organization-id=1
[ INFO 2020-04-29T09:28:09 Init] Initialization of Hammer CLI (0.19.2) has started...
[DEBUG 2020-04-29T09:28:09 Init] Running at ruby 2.6.3-p62
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli_config.yml has been loaded
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ansible.yml has been loaded
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_discovery.yml has been loaded
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_ssh.yml has been loaded
[ INFO 2020-04-29T09:28:09 Init] Configuration from the file /Users/ted.kozma/.hammer/cli.modules.d/foreman_tasks.yml has been loaded
[ INFO 2020-04-29T09:28:09 SSLoptions] Matching CA cert was found in local CA store /Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem
[DEBUG 2020-04-29T09:28:09 SSLoptions] SSL options: {
     :verify_ssl => true,
    :ssl_ca_file => "/Users/ted.kozma/.hammer/certs/foreman01.tor.tpstk.ca_443.pem" 
}
[DEBUG 2020-04-29T09:28:09 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2020-04-29T09:28:09 API] Follow redirects: never
[DEBUG 2020-04-29T09:28:09 Connection] Registered: foreman
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command:
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for *all* except *nothing* on HammerCLIForeman::Command.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::ListCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::InfoCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand.
[ INFO 2020-04-29T09:28:09 Modules] Extension module hammer_cli_foreman (0.19.7) loaded.
[ INFO 2020-04-29T09:28:09 Modules] Extension module hammer_cli_foreman_discovery (1.0.2) loaded.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::SmartClassParameter::ListCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::SmartClassParameter::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::SmartClassParameter::ListCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::ListCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::ListCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::PuppetClass::InfoCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::PuppetClass::InfoCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::PuppetClass::InfoCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::ListCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::ListCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::ListCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::CreateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f895633b2d8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:28:09 #<Class:0x00007f89590476f0>] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2020-04-29T09:28:09 #<Class:0x00007f89590476f0>] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
    #<Proc:0x00007f8959047600@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:28:09 Extensions] Applied #<Class:0x00007f89590476f0> for *all* except *nothing* on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment", :type=>"ENVIRONMENT_NAME", :description=>"Environment name", :opts=>{:attribute_name=>:option_environment_name, :deprecated=>{"--environment"=>"Use --puppet-environment instead"}}, :block=>nil}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added option for HammerCLIForeman::Host::UpdateCommand: {:switches=>"--environment-id", :type=>"ENVIRONMENT_ID", :description=>"", :opts=>{:format=>#<HammerCLI::Options::Normalizers::Number:0x00007f89551d5200>, :attribute_name=>:option_environment_id, :deprecated=>{"--environment-id"=>"Use --puppet-environment-id instead"}}, :block=>nil}
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f895633b2d8@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2020-04-29T09:28:09 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2020-04-29T09:28:09 #<Class:0x00007f8953965620>] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2020-04-29T09:28:09 #<Class:0x00007f8953965620>] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
    #<Proc:0x00007f8953965580@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2020-04-29T09:28:09 Extensions] Applied #<Class:0x00007f8953965620> for *all* except *nothing* on HammerCLIForeman::Host::UpdateCommand.
[ INFO 2020-04-29T09:28:09 Modules] Extension module hammer_cli_foreman_ssh (0.0.3) loaded.
[DEBUG 2020-04-29T09:28:09 Init] Using locale 'en'
[DEBUG 2020-04-29T09:28:09 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli-0.19.2/locale'
[DEBUG 2020-04-29T09:28:09 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/locale'
[ INFO 2020-04-29T09:28:09 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f8954145890@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[ INFO 2020-04-29T09:28:09 HammerCLIForeman::Host] Called with options: {}
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x00007f8954145890@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[DEBUG 2020-04-29T09:28:09 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called block for HammerCLIForeman::Host::UpdateCommand option sources:
    #<Proc:0x00007f89551d50c0@/Users/ted.kozma/.rvm/gems/ruby-2.6.3/gems/hammer_cli_foreman-0.19.7/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:13>
[ INFO 2020-04-29T09:28:09 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:28:09 API] GET /api/environments
[DEBUG 2020-04-29T09:28:09 API] Params: {
      :search => "name = \"production\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:28:09 API] Headers: {
    :params => {
          :search => "name = \"production\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:28:09 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:28:10 API] Response: {
       "total" => 3,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"production\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
            "created_at" => "2020-02-14T22:19:20.156Z",
            "updated_at" => "2020-02-14T22:19:20.156Z",
                  "name" => "production",
                    "id" => 1
        }
    ]
}
[DEBUG 2020-04-29T09:28:10 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:28:10 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "b0ddaa4f-1d99-4a13-b363-71a0bad9b18b",
                   :x_download_options => "noopen",
                            :x_runtime => "0.289328",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=0958fe9b63704cc922d0297bcf307529; path=/; expires=Thu, 30 Apr 2020 13:28:10 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"42ef2ec18d55cb0e4ba2ab19aa3a6ef4-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "184",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:28:10 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:28:10 API] GET /api/domains
[DEBUG 2020-04-29T09:28:10 API] Params: {
      :search => "name = \"prod.tor.tpstk.ca\"",
    :per_page => 1000,
        :page => 1
}
[DEBUG 2020-04-29T09:28:10 API] Headers: {
    :params => {
          :search => "name = \"prod.tor.tpstk.ca\"",
        :per_page => 1000,
            :page => 1
    }
}
[DEBUG 2020-04-29T09:28:10 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[DEBUG 2020-04-29T09:28:10 API] Response: {
       "total" => 4,
    "subtotal" => 1,
        "page" => 1,
    "per_page" => 1000,
      "search" => "name = \"prod.tor.tpstk.ca\"",
        "sort" => {
           "by" => nil,
        "order" => nil
    },
     "results" => [
        [0] {
              "fullname" => "prod.tor.tpstk.ca",
            "created_at" => "2020-03-02T16:33:38.779Z",
            "updated_at" => "2020-03-02T16:33:38.779Z",
                    "id" => 2,
                  "name" => "prod.tor.tpstk.ca",
                "dns_id" => 1,
                   "dns" => {
                "name" => "foreman01.tor.tpstk.ca",
                  "id" => 1,
                 "url" => "https://foreman01.tor.tpstk.ca:8443" 
            }
        }
    ]
}
[DEBUG 2020-04-29T09:28:10 API] Response headers: {
                                 :date => "Wed, 29 Apr 2020 13:28:10 GMT",
                               :server => "Apache",
                        :cache_control => "max-age=0, private, must-revalidate",
            :strict_transport_security => "max-age=631139040; includeSubdomains",
         :foreman_current_organization => "; ANY",
             :foreman_current_location => "; ANY",
                     :x_xss_protection => "1; mode=block",
    :x_permitted_cross_domain_policies => "none",
                         :x_request_id => "c800b2c5-e72c-45e8-829e-84df89efe210",
                   :x_download_options => "noopen",
                            :x_runtime => "0.271419",
                      :foreman_version => "1.24.2",
                  :foreman_api_version => "2",
                      :apipie_checksum => "8c40bdc9550387485d746e28ceeb89fc466c53b7",
                      :x_frame_options => "sameorigin",
               :x_content_type_options => "nosniff",
              :content_security_policy => "default-src 'self'; child-src 'self'; connect-src 'self' ws: wss:; img-src 'self' data: *.gravatar.com; script-src 'unsafe-eval' 'unsafe-inline' 'self'; style-src 'unsafe-inline' 'self'",
                         :x_powered_by => "Phusion Passenger 5.0.30",
                           :set_cookie => [
        [0] "_session_id=a5cf55a9df28e93dc451fe57e0b760a3; path=/; expires=Thu, 30 Apr 2020 13:28:10 GMT; HttpOnly; secure; SameSite=Lax" 
    ],
                                 :etag => "W/\"c59f8660b47db5d95feade278c61cd54-gzip\"",
                               :status => "200 OK",
                                 :vary => "Accept-Encoding",
                       :content_length => "237",
                         :content_type => "application/json; charset=utf-8" 
}
[ INFO 2020-04-29T09:28:10 HammerCLIForeman::Host::CreateCommand] Called with options: {"option_puppetclass_ids"=>[], "option_overwrite"=>true, "option_compute_attributes"=>{"vcpus_min"=>"4", "vcpus_max"=>"4", "memory_min"=>"17179869184", "memory_max"=>"17179869184", "physical_size"=>"22", "VIFs['print']"=>"prod_2088", "host_compute_attributes_start"=>"1", "hypervisor_host"=>"xcp17.infra.tor.tpstk.ca", "builtin_template"=>"74ae424d-a1d3-4d96-9827-d1d60a4c7511"}, "option_volume_list"=>[], "option_interface_list"=>[{"primary"=>"true", "provision"=>"true", "managed"=>"true"}], "option_location_id"=>2, "option_organization_id"=>1, "option_environment_name"=>"production", "option_environment_id"=>1, "option_domain_name"=>"prod.tor.tpstk.ca", "option_domain_id"=>2, "option_operatingsystem_id"=>1, "option_medium_id"=>7, "option_compute_resource_id"=>4, "option_hostgroup_id"=>9, "option_compute_profile_id"=>2, "option_name"=>"api10", "option_build"=>true, "option_enabled"=>true, "option_managed"=>true, "option_comment"=>"Hammered"}
[ INFO 2020-04-29T09:28:10 API] Server: https://foreman01.tor.tpstk.ca/
[ INFO 2020-04-29T09:28:10 API] POST /api/hosts
[DEBUG 2020-04-29T09:28:10 API] Params: {
        "location_id" => 2,
    "organization_id" => 1,
               "host" => {
                         "name" => "api10",
                  "location_id" => 2,
              "organization_id" => 1,
               "environment_id" => 1,
                    "domain_id" => 2,
              "puppetclass_ids" => [],
           "operatingsystem_id" => 1,
                    "medium_id" => 7,
          "compute_resource_id" => 4,
                 "hostgroup_id" => 9,
                        "build" => true,
                      "enabled" => true,
                      "managed" => true,
                      "comment" => "Hammered",
           "compute_profile_id" => 2,
           "compute_attributes" => {
                                "vcpus_min" => "4",
                                "vcpus_max" => "4",
                               "memory_min" => "17179869184",
                               "memory_max" => "17179869184",
                            "physical_size" => "22",
                            "VIFs['print']" => "prod_2088",
            "host_compute_attributes_start" => "1",
                          "hypervisor_host" => "xcp17.infra.tor.tpstk.ca",
                         "builtin_template" => "74ae424d-a1d3-4d96-9827-d1d60a4c7511",
                       "volumes_attributes" => {}
        },
                    "overwrite" => true,
        "interfaces_attributes" => [
            [0] {
                  "primary" => "true",
                "provision" => "true",
                  "managed" => "true" 
            }
        ]
    }
}
[DEBUG 2020-04-29T09:28:10 API] Headers: {}
[DEBUG 2020-04-29T09:28:10 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth
[ERROR 2020-04-29T09:28:18 API] 422 Unprocessable Entity
[DEBUG 2020-04-29T09:28:18 API] {
    "error" => {
                   "id" => nil,
               "errors" => {
                       "conflict" => [],
            "interfaces.conflict" => [],
                           "base" => [
                [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: [\"MESSAGE_PARAMETER_COUNT_MISMATCH\", \"VM.set_affinity\", \"2\", \"1\"]\n " 
            ]
        },
        "full_messages" => [
            [0] "Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: [\"MESSAGE_PARAMETER_COUNT_MISMATCH\", \"VM.set_affinity\", \"2\", \"1\"]\n " 
        ]
    }
}
[DEBUG 2020-04-29T09:28:18 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_unprocessable_entity
[ERROR 2020-04-29T09:28:18 Exception] Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

Could not create the host:
  Failed to create a compute pool2 (Xenserver) instance api10.prod.tor.tpstk.ca: VM.set_affinity: ["MESSAGE_PARAMETER_COUNT_MISMATCH", "VM.set_affinity", "2", "1"]

What am I doing wrong?

Also available in: Atom PDF