Details
Description
Consider the following session from shef console:
chef > anode = nodes.all.first;true
=> true
chef > anode.attribute.kind_of? Hash
=> true
chef > anode.attribute.keys
=> ["nested", "tag", "value", "multi_word"]
chef > anode.attribute.delete("tag")
=> "tag"
chef > anode.attribute.keys
=> ["delete", "nested", "tag", "value", "multi_word"]
chef >
We should at least add support for easily deleting attributes. Ideally, if node.attribute is going to say it is a kind of Hash, then it should implement all Hash methods – or at least raise an exception for unsupported operations.
Activity
Daniel DeLeo
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 0.10.0 [ 10081 ] |
Daniel DeLeo
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Triage Status | [Triaged] | |
| Resolution | Fixed [ 1 ] |
Bryan McLellan [Opscode]
made changes -
| Workflow | jira [ 12536 ] | New OSS [ 19759 ] |
Bryan McLellan [Opscode]
made changes -
| Workflow | New OSS [ 19759 ] | OSS: Product Management [ 27671 ] |
| Transition | Time In Source Status | Execution Times | Last Executer | Last Execution Date | |||||
|---|---|---|---|---|---|---|---|---|---|
|
91d 3h 43m | 1 | Daniel DeLeo | 02/Feb/11 3:29 AM |
Implemented attribute delete here: http://github.com/danielsdeleo/chef/tree/CHEF-1844
Should be good enough for the "bronze" solution, though it would indeed be preferable to match the Hash API exactly.