Refactoring step 2 - linking Roles and Attribs [1/3]

This is a major step forward in the refactoring effort.

In this pass, we linked the RoleInstances to AttribInstances.  This allows use to store
data in a way that can be consumed by Jigs.

In order to make inbound data processing work, we have to track maps to the different jigs.
This had been hardcoded and had to be moved into a dedicated table.  I made the decision
to have this at the barclamp/jig level rather than at the instance level.

Pending changes are needed to resolve times when we have a time series of data in the 
AttributeInstance data.  In the next stage, we will need to select the active instance data
for Attribs and not return all of them.

Some significant developments in this pull are
* process-inbound data works correctly
* attribuate are created from the bc-template files (that's moving to crowbar.yml)
* roles are create from the bc-template files (that's also moving)
* barclamp-attrib-maps are stored in a dedicated table
* example of the role/attrib data in the impi crowbar.yml

One important note: it looks like we are moving to a place where Attribs MUST have a role assigned.  
This is a simplifying assumption that we will start enforcing in the next pull request.

The next step is to replace the NodeRole and move it to AttribInst


 BDD/attrib_instance.erl                            |    2 +-
 BDD/bdd.erl                                        |    4 +-
 BDD/bdd_catchall.erl                               |   12 ++
 BDD/dashboard.erl                                  |    2 +-
 BDD/default.config                                 |    2 +-
 BDD/dev.erl                                        |    4 +-
 BDD/features/scaffolds.feature                     |    4 -
 BDD/features/support.feature                       |   11 +-
 BDD/jig.erl                                        |   16 +--
 BDD/local.config                                   |   13 ++
 BDD/node.erl                                       |    2 +-
 BDD/support.erl                                    |   41 ++++++
 .../app/controllers/crowbar_controller.rb          |   14 +-
 .../app/controllers/nodes_controller.rb            |    8 --
 .../scaffolds/attrib_instances_controller.rb       |   19 +++
 .../controllers/scaffolds/node_roles_controller.rb |   19 ---
 crowbar_framework/app/models/attrib.rb             |   41 +++++-
 crowbar_framework/app/models/attrib_instance.rb    |   30 +++-
 crowbar_framework/app/models/barclamp.rb           |  143 ++++++++++++--------
 crowbar_framework/app/models/barclamp_attrib.rb    |   99 --------------
 .../app/models/barclamp_crowbar/jig.rb             |   22 +++
 crowbar_framework/app/models/barclamp_instance.rb  |  137 ++++---------------
 crowbar_framework/app/models/jig.rb                |   19 ++-
 crowbar_framework/app/models/jig_map.rb            |   50 ++++++-
 crowbar_framework/app/models/jig_run.rb            |    3 +-
 crowbar_framework/app/models/jig_test.rb           |   22 ---
 crowbar_framework/app/models/node.rb               |   48 ++++---
 crowbar_framework/app/models/role.rb               |   32 ++++-
 crowbar_framework/app/models/role_instance.rb      |   24 +++-
 .../app/views/barclamp/graph.html.haml             |   12 +-
 crowbar_framework/config/locales/crowbar/en.yml    |    6 +
 crowbar_framework/config/routes.rb                 |    2 +-
 .../db/migrate/20120725023017_create_jig_maps.rb   |   14 +-
 .../db/migrate/20120730225300_create_jigs.rb       |    7 +-
 .../db/migrate/20120730230713_create_jig_events.rb |    2 +-
 .../20120731225456_create_barclamps_attribs.rb     |   31 -----
 .../db/migrate/20120731225504_create_roles.rb      |    5 +-
 .../20120731225600_create_attrib_instances.rb      |    5 +-
 .../test/unit/attrib_instance_model_test.rb        |   14 +-
 crowbar_framework/test/unit/attrib_model_test.rb   |   17 ++-
 .../test/unit/barclamp_attrib_model_test.rb        |   57 ++++----
 .../test/unit/barclamp_import_test.rb              |   11 +-
 crowbar_framework/test/unit/barclamp_model_test.rb |   56 ++------
 .../test/unit/barclamp_node_data_test.rb           |   78 +++++++++--
 crowbar_framework/test/unit/jig_map_model_test.rb  |   53 ++++----
 crowbar_framework/test/unit/jig_model_test.rb      |   29 ++--
 crowbar_framework/test/unit/node_model_test.rb     |    8 +-
 .../test/unit/role_instance_model_test.rb          |   20 +--
 crowbar_framework/test/unit/role_model_test.rb     |   31 +++++
 doc/devguide/model/crowbar_model.dia               |  Bin 3138 -> 3915 bytes
 doc/devguide/model/crowbar_model.png               |  Bin 29227 -> 36732 bytes
 51 files changed, 691 insertions(+), 610 deletions(-)

Crowbar-Pull-ID: d5070acd86c8ba863774a27e016b5327e7e0e41e

Crowbar-Release: development