Role HasNode via AttribInstance (death to NodeRole) redux [1/1]

REPULL FROM #382

This is the next-to-last major refactoring pull request!

In this pull, I have eliminated the NodeRole habtm table in favor of joining
through the AttribInstance table. This has the benefit of being simpler
and automatically managed by the BarclampInstance clone process.

The relationship has it's own class: AttribInstanceHasNode that provides
the needed filtering and relationship aspects to Node and RoleInstance.

Part of the needed behavior was to have make the RoleInstance required
for the AttribInstance model. This required the addition of the "user_defined"
role for the Crowbar model. If an attrib is created without a role then
crowbar will automatically use that role.

Eventually (not NOT implemented) this relationship could carry extra data via
the AttribInstance actual/request state information.

This change finally broke most of the hold Proposal logic so that was also
removed.

The #384 pull included some WIP changes to the BDD system that allowed for
testing the CLI in anticipation of the step below.

The next step is to add the BarclampConfiguration work including the CLI 
and API for managing BarclampConfigurations. This will likely require
adding the concept of "active" vs "inactive" instances.

NOTE: There are some minor tweaks needed to address breaking or changed tests.


 BDD/bdd.erl                                        |   26 +-
 BDD/bdd_clirat.erl                                 |   47 ++++
 BDD/bdd_utils.erl                                  |    2 +-
 BDD/crowbar.config                                 |    3 +-
 BDD/crowbar.erl                                    |    2 +
 BDD/default.config                                 |    4 +-
 BDD/devtool.config                                 |    3 +-
 BDD/features/crowbar_cli.feature                   |   31 +++
 BDD/features/navigation.feature                    |    4 +
 BDD/features/scaffolds.feature                     |   72 ++----
 BDD/local.config                                   |    4 +-
 bin/barclamp_lib.rb                                |   10 +-
 bin/crowbar                                        |    2 +-
 bin/crowbar_cli_lib.rb                             |  117 +++++++++
 bin/crowbar_machines                               |   14 +-
 crowbar.yml                                        |  101 +++++++-
 .../scaffolds/proposal_configs_controller.rb       |   19 --
 .../controllers/scaffolds/proposals_controller.rb  |   19 --
 crowbar_framework/app/models/attrib_instance.rb    |   17 +-
 crowbar_framework/app/models/barclamp.rb           |   17 +-
 .../barclamp_crowbar/attrib_instance_default.rb    |   43 ++++
 .../barclamp_crowbar/attrib_instance_has_node.rb   |   41 +++
 .../app/models/barclamp_crowbar/barclamp.rb        |   19 ++
 .../app/models/crowbar/attrib_instance_default.rb  |   43 ----
 crowbar_framework/app/models/crowbar/barclamp.rb   |   60 -----
 crowbar_framework/app/models/node.rb               |  173 +++++++------
 crowbar_framework/app/models/node_role.rb          |   52 ----
 crowbar_framework/app/models/proposal_config.rb    |  230 -----------------
 crowbar_framework/app/models/role_instance.rb      |   28 ++-
 crowbar_framework/app/models/role_map.rb           |   31 ---
 crowbar_framework/config/locales/crowbar/en.yml    |    2 +
 crowbar_framework/config/routes.rb                 |    4 +-
 .../db/migrate/20120731225505_create_node_roles.rb |   27 --
 .../20120731225600_create_attrib_instances.rb      |    4 +-
 .../db/migrate/20120801190200_scaffold_nav.rb      |    3 +-
 .../db/migrate/20120810233501_create_role_maps.rb  |   27 --
 .../chef/data_bags/crowbar/bc-template-foo.json    |   38 ---
 crowbar_framework/test/data/foo/crowbar.yml        |  266 --------------------
 crowbar_framework/test/data/foo/foo.yml            |  266 ++++++++++++++++++++
 .../test/data/foo/templates/bc-template-foo.json   |   38 +++
 crowbar_framework/test/test_helper.rb              |    5 +
 .../test/unit/attrib_instance_has_node_test.rb     |  105 ++++++++
 .../test/unit/barclamp_import_test.rb              |    7 +-
 .../test/unit/barclamp_node_data_test.rb           |    9 +-
 crowbar_framework/test/unit/node_model_test.rb     |   15 +-
 .../test/unit/node_role_model_test.rb              |   40 ---
 crowbar_framework/test/unit/role_map_model_test.rb |   30 ---
 doc/crowbar.yml                                    |   40 +--
 doc/devguide/testing/bdd/internals/config.md       |   29 ++-
 doc/devguide/testing/bdd/rats.md                   |   17 ++
 doc/devguide/testing/bdd/rats/clirat.md            |   36 +++
 doc/gettingstarted/additional_info.md              |   26 ++
 doc/gettingstarted/configuring_network.md          |   16 ++
 doc/gettingstarted/discovering_nodes.md            |    8 +
 doc/gettingstarted/installing_admin_node.md        |   31 +++
 doc/gettingstarted/installing_crowbar.md           |   31 +++
 doc/gettingstarted/installing_hadoop.md            |  123 +++++++++
 doc/gettingstarted/installing_openstack.md         |   11 +
 doc/gettingstarted/quickstart_guide.md             |   26 ++
 doc/quickstart/additional_info.md                  |   26 --
 doc/quickstart/configuring_network.md              |   16 --
 doc/quickstart/discovering_nodes.md                |    8 -
 doc/quickstart/installing_admin_node.md            |   31 ---
 doc/quickstart/installing_crowbar.md               |   31 ---
 doc/quickstart/installing_hadoop.md                |  123 ---------
 doc/quickstart/installing_openstack.md             |   11 -
 doc/quickstart/quickstart_guide.md                 |   26 --
 67 files changed, 1441 insertions(+), 1345 deletions(-)

Crowbar-Pull-ID: 64482b5a5b874b88f39d540646025e0ffc0f1995

Crowbar-Release: development