crowbar/barclamp-crowbar — pull request #793 by VictorLowther (2013-12-04 21:59:12+00:00)
Title: Attribute updates for annealer hygene, round 2 [1/1]

* Make Attrib.get smart.
Instead of passing a blob of JSON, it now accepts the object it should
try to work with. This centralizes the logic around what fields in an
object are valid places to get attributes from, and will fail hard if
you pass it something that should not work with the attribute system.
* Add matching Attrib.set methods.
This provides an abstract interface for setting attributes on objects
that matches the use of Attrib.get.
* Numerous trivial cleanups to make things work with the above changes.

BDD/features/attrib.feature | 5 +-
.../app/controllers/attribs_controller.rb | 8 +-
crowbar_framework/app/models/attrib.rb | 94 +++++++++++--
crowbar_framework/app/models/deployment_role.rb | 150 +++++++++++----------
crowbar_framework/app/models/node.rb | 17 ++-
crowbar_framework/app/models/node_role.rb | 5 +
crowbar_framework/app/models/role.rb | 2 +-
crowbar_framework/app/views/nodes/show.html.haml | 6 +-
8 files changed, 183 insertions(+), 104 deletions(-)

Crowbar-Pull-ID: bb6e98e76bf69457189462b48d3327adafdbdcb0

Crowbar-Release: development