Project

General

Profile

Actions

Bug #1651

closed

foremancli fails on fact_values queries

Added by Tray Torrance almost 12 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

$ foremancli -s https://foreman.example.com --fact_values 'fact.name = operatingsystem'
/var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:185:in `print_response': undefined method `join' for #<Hash:0x7fb33b963598> (NoMethodError)
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:194
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189:in `each'
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189
        from /usr/local/bin/foremancli:19:in `load'
        from /usr/local/bin/foremancli:19

Debug Output:

$ foremancli -ds https://foreman.example.com --fact_values 'fact.name = operatingsystem'
RestClient.get "https://foreman.example.com/fact_values?search=fact.name%20=%20operatingsystem", "Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Content-Type"=>"application/json" 
# => 200 OK | application/json 14936 bytes
/var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:185:in `print_response': undefined method `join' for #<Hash:0x7ff91b0fec10> (NoMethodError)
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:194
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189:in `each'
        from /var/lib/gems/1.8/gems/foremancli-0.4.1/bin/foremancli:189
        from /usr/local/bin/foremancli:19:in `load'
        from /usr/local/bin/foremancli:19

Looks like the output here is an array of nested hashes, and the output filter is choking on it?

-torrancew

Actions

Also available in: Atom PDF