AttribInstance refactoring checkpoint added RoleInstance (all tests passing) [1/1]


This refactoring pulls in a lot of the new model and begins to disable the old models.

My goal is to do the refactoring in a series of smaller pulls with passing tests.

NOTE: THIS MAY BREAK THE FULL INSTALL as discussed in community meetings.  We are refactoring the install too.

Please see the updated ![Dia Model](doc/devguide/model/crowbar-model.png)

The primary path built here is the BarclampInstance > RoleInstance > Role path.

   * The barclamp.import has been refactored to build the new roles using these models
   * The paths between roles and other things are being removed in favor of this approach
   * The barclamp graph has been updated to show these relations
   * Added tests for import based on sample data

The next path to build is the BarclampInstance > RoleInstance > AttribInstance path.

   * we should be able to eliminate the barclamp-role and node-role intermediate tables
   * will add the concept of the "private" role to store non-Jig data

Small tweaks in addition include

   * added "source_path" to barclamps so that we can leave the docs in place
   * using alias methods where possible



 BDD/barclamp.erl                                   |    3 +-
 BDD/bdd_webrat.erl                                 |    2 +
 BDD/features/barclamp_graph.feature                |   14 ++
 BDD/features/scaffolds.feature                     |    1 -
 BDD/features/support.feature                       |    6 +-
 crowbar_framework/app/models/barclamp.rb           |  209 +++++++--------
 .../app/models/barclamp_configuration.rb           |    8 +-
 crowbar_framework/app/models/barclamp_instance.rb  |   43 ++--
 crowbar_framework/app/models/crowbar/barclamp.rb   |   25 +-
 crowbar_framework/app/models/node.rb               |   13 +-
 crowbar_framework/app/models/role.rb               |   17 +-
 crowbar_framework/app/models/role_instance.rb      |   47 ++++
 .../app/views/barclamp/graph.html.haml             |   24 +-
 crowbar_framework/config/locales/crowbar/en.yml    |    6 +-
 .../db/migrate/20120731225405_create_barclamps.rb  |    5 +-
 .../20120731225476_create_barclamps_instances.rb   |    3 +-
 .../db/migrate/20120731225504_create_roles.rb      |    1 -
 .../20120731225510_create_role_instances.rb        |   29 +++
 .../20120731225600_create_attrib_instances.rb      |    2 +
 .../test/data/barclamp_node_data_test.json         |    4 +-
 crowbar_framework/test/data/bc-foo.json            |   38 ---
 .../chef/data_bags/crowbar/bc-template-foo.json    |   38 +++
 crowbar_framework/test/data/foo/crowbar.yml        |  266 ++++++++++++++++++++
 .../test/unit/attrib_instance_model_test.rb        |    2 +-
 .../test/unit/barclamp_attrib_model_test.rb        |    8 +-
 .../test/unit/barclamp_config_model_test.rb        |   20 +-
 .../test/unit/barclamp_import_test.rb              |   70 ++++++
 .../test/unit/barclamp_instance_model_test.rb      |   14 ++
 crowbar_framework/test/unit/barclamp_model_test.rb |   94 +------
 .../test/unit/role_instance_model_test.rb          |   78 ++++++
 doc/devguide/model/crowbar_model.dia               |  Bin 3367 -> 3138 bytes
 doc/devguide/model/crowbar_model.png               |  Bin 27430 -> 29227 bytes
 32 files changed, 777 insertions(+), 313 deletions(-)

Crowbar-Pull-ID: 9613cfb08bb606d5fd1dd14d67b9ed03202a05dd

Crowbar-Release: development