crowbar/barclamp-crowbar — pull request #794 by VictorLowther (2013-12-05 20:08:22+00:00)
Title: Make role attributes work, and add some to play around with in CB 2.0 [1/8]

* 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.
* Add some attributes to various nodes to lay the groundwork for
adding logic to the annealer to make it consiter attribute visibility.
* 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 | 103 +++++++++++--
crowbar_framework/app/models/deployment_role.rb | 166 ++++++++++++---------
crowbar_framework/app/models/node.rb | 25 +++-
crowbar_framework/app/models/node_role.rb | 36 ++++-
crowbar_framework/app/models/role.rb | 10 +-
crowbar_framework/app/views/nodes/show.html.haml | 6 +-
8 files changed, 250 insertions(+), 109 deletions(-)

Crowbar-Pull-ID: cd953079fcc42015c6552d4b6d190cc54e898308

Crowbar-Release: development