Chef

Search in recipes does not allow for attribute selection, even though the REST API does.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.5.1, 0.5.2
  • Fix Version/s: 0.5.4
  • Component/s: Chef Client
  • Labels:
    None

Description

Search in the API currently takes two arguments and a block. It should take an optional third argument, which is a list of attributes to return.

Activity

Hide
Adam Jacob added a comment - 03/Feb/09 11:33 PM

This is fixed, and pushed. You can now do:

results = search(:node, '*', [ 'ipaddress', 'hostname' ])

And results will be an array of hashes.

(Or use it in a block, like normal, etc.)

Show
Adam Jacob added a comment - 03/Feb/09 11:33 PM This is fixed, and pushed. You can now do: results = search(:node, '*', [ 'ipaddress', 'hostname' ]) And results will be an array of hashes. (Or use it in a block, like normal, etc.)

People

Vote (0)
Watch (0)

Dates

  • Created:
    03/Feb/09 6:55 PM
    Updated:
    03/Feb/09 11:33 PM
    Resolved:
    03/Feb/09 11:33 PM