tumblr/collins — pull request #154 by byxorna (2014-04-30 17:40:54+00:00)
Title: Gabe extra provision attributes

This PR adds support for collins to add/remove arbitrary attributes on an asset at provision time, on a per-nodeclass basis. I.e. lets say you want to tag all nodes that are development hosts with ```DEVELOPMENT_MODE=true```, you could put this in ```profiles.yaml``` to have that attribute automatically set at provision time.

```
---
profiles:
devdbnode:
label: "Dev DB Node"
prefix: "devdb"
attributes:
development_mode: true
devnode:
label: "Dev Node"
prefix: "dev"
attributes:
development_mode: true
```

Similarly, you can clear specific attributes on specific nodeclasses, if you want to ensure there are no undesirable effects at provision time. (i.e. ```DEVELOPMENT_MODE``` attribute creates undesirable behavior on your production DB nodes):

```
---
profiles:
proddbnode:
label: "Prod DB Node"
prefix: "db"
clear_attributes:
- development_mode
- some_attribute_that_most_nodes_want_but_not_proddbs
```

The was this is written such that attributes specified in ```clear_attributes``` wont clobber any more important attrs set by collins (i.e. nodeclass). The ordering of what trumps what is, in order of trumpiness:
1) attrs set explicitly by collins during provision (nodeclass, build_contact, pool, etc) from the profile
2) attributes set in the ```attributes``` map in profile
3) attributes to clear on a nodeclass from ```clear_attributes``` in profile
4) attributes collins will clear on all assets (```Feature.deleteSomeMetaOnRepurpose```)

Let me know what you guys think!