EPIC rename of config and instance to deployment and snapshot CHECKPOINT [1/2]

This pull is HUGE (sorry)

There are THREE items in this pull (they are interconnected)

1. Introduction of the crowbar/v2/resource API pattern
      This was needed to enable API work on deployment proposals

2. Renaming config & instance to be deployment and snapshot
      Other items were also renamed Attrib -> AttribType, Role -> RoleType
      In general, the concept of Instance is GONE.
      All the tests have been updated and are passing (some BDD fails)

3. Cleanup/removal of old models, routes, and code
      I have deleted dead code where possible
      Models have been renamed from .rb to .old if they are no longer used


For the API pattern, I've continued to move towards:
   [:barclamp]/v2/[:resource]/[:id] pattern
   for status, it will be /framework/status/[:resource]
   all the models are now wrapped

Some work remains on fixing BDD tests and joining new models into the API.
  That work is the next pull, I wanted to expose these so people would be unblocked.


 .gitignore                                         |    4 +-
 BDD/attrib.erl                                     |    9 +-
 BDD/attrib_instance.erl                            |   59 --
 BDD/attrib_type.erl                                |   62 ++
 BDD/authenticate.erl                               |   17 +-
 BDD/barclamp.erl                                   |   12 +-
 BDD/bdd.hrl                                        |   20 +
 BDD/bdd_restrat.erl                                |   40 +-
 BDD/bdd_selftest.data                              |   21 -
 BDD/bdd_selftest.erl                               |  108 ---
 BDD/bdd_utils.erl                                  |    3 +-
 BDD/config.erl                                     |   52 --
 BDD/crowbar.erl                                    |   11 +-
 BDD/crowbar_rest.erl                               |   26 +-
 BDD/dashboard.erl                                  |    6 +-
 BDD/default.config                                 |   13 -
 BDD/deployment.erl                                 |   52 ++
 BDD/example.config                                 |   13 +
 BDD/features/attrib.feature                        |   27 -
 BDD/features/attrib_type.feature                   |   27 +
 BDD/features/authenticate.feature                  |    5 +-
 BDD/features/barclamp.feature                      |   42 +-
 BDD/features/barclamp_api.feature                  |   62 +-
 BDD/features/barclamp_graph.feature                |    4 +-
 BDD/features/config.feature                        |   44 -
 BDD/features/dashboard.feature                     |    7 +
 BDD/features/deployment.feature                    |   44 +
 BDD/features/jig.feature                           |    2 +-
 BDD/features/role.feature                          |   24 -
 BDD/features/role_type.feature                     |   24 +
 BDD/features/scaffolds.feature                     |   79 +-
 BDD/features/snapshot.feature                      |   24 +
 BDD/instance.erl                                   |   55 --
 BDD/jig.erl                                        |   12 +-
 BDD/node.erl                                       |   18 +-
 BDD/nodes.erl                                      |   25 -
 BDD/role.erl                                       |   58 --
 BDD/role_type.erl                                  |   58 ++
 BDD/simple_auth.erl                                |    6 +-
 BDD/snapshot.erl                                   |   55 ++
 config-template.yml                                |  112 +++
 crowbar.yml                                        |  101 +--
 .../app/assets/stylesheets/application.sass        |   40 +-
 .../app/controllers/application_controller.rb      |   62 +-
 .../app/controllers/attrib_types_controller.rb     |   35 +
 .../app/controllers/attribs_controller.rb          |   35 +
 .../app/controllers/barclamp_controller.rb         |  345 +-------
 .../barclamp_configs_controller.rb                 |   24 -
 .../barclamp_instances_controller.rb               |   24 -
 .../barclamp_crowbar/barclamp_roles_controller.rb  |   24 -
 .../barclamp_crowbar/barclamps_controller.rb       |   24 -
 .../app/controllers/barclamp_roles_controller.rb   |   46 +
 .../app/controllers/barclamps_controller.rb        |   46 +
 .../app/controllers/crowbar_controller.rb          |  153 +---
 .../app/controllers/deployments_controller.rb      |   57 ++
 .../app/controllers/digest_controller.rb           |   32 -
 .../app/controllers/groups_controller.rb           |   47 +-
 .../app/controllers/jig_controller.rb              |   21 -
 .../app/controllers/jigs_controller.rb             |   35 +
 .../app/controllers/machines_controller.rb         |    3 +-
 .../app/controllers/nodes_controller.rb            |   81 +-
 .../app/controllers/proposals_controller.rb        |   51 --
 .../app/controllers/role_types_controller.rb       |   35 +
 .../app/controllers/roles_controller.rb            |   26 +
 .../scaffolds/attrib_instances_controller.rb       |   19 -
 .../scaffolds/attrib_types_controller.rb           |   19 +
 .../controllers/scaffolds/attribs_controller.rb    |    4 +-
 .../controllers/scaffolds/barclamps_controller.rb  |    2 +-
 .../scaffolds/deployments_controller.rb            |   19 +
 .../controllers/scaffolds/jig_events_controller.rb |   19 +
 .../controllers/scaffolds/jig_maps_controller.rb   |   19 +
 .../controllers/scaffolds/jig_runs_controller.rb   |   19 +
 .../app/controllers/scaffolds/jigs_controller.rb   |   19 +
 .../scaffolds/proposal_queue_items_controller.rb   |   19 -
 .../scaffolds/proposal_queues_controller.rb        |   19 -
 .../controllers/scaffolds/role_types_controller.rb |   19 +
 .../controllers/scaffolds/snapshots_controller.rb  |   19 +
 .../app/controllers/snapshots_controller.rb        |   26 +
 .../app/controllers/support_controller.rb          |   16 +-
 .../app/controllers/users_controller.rb            |   17 +-
 crowbar_framework/app/helpers/proposals_helper.rb  |   18 -
 crowbar_framework/app/models/attrib.rb             |  172 +++-
 crowbar_framework/app/models/attrib_instance.rb    |  144 ----
 crowbar_framework/app/models/attrib_type.rb        |   59 ++
 crowbar_framework/app/models/barclamp.rb           |  275 +++---
 .../app/models/barclamp_configuration.rb           |   77 --
 .../app/models/barclamp_crowbar/attrib_default.rb  |   43 +
 .../app/models/barclamp_crowbar/attrib_has_node.rb |   41 +
 .../barclamp_crowbar/attrib_instance_default.rb    |   43 -
 .../barclamp_crowbar/attrib_instance_has_node.rb   |   41 -
 crowbar_framework/app/models/barclamp_instance.rb  |  119 ---
 .../app/models/barclamps_controller.rb             |   35 -
 crowbar_framework/app/models/chef_object.old       |   64 ++
 crowbar_framework/app/models/chef_object.rb        |   64 --
 crowbar_framework/app/models/client_object.old     |   46 +
 crowbar_framework/app/models/client_object.rb      |   46 -
 crowbar_framework/app/models/crowbar_service.old   |  248 ++++++
 crowbar_framework/app/models/crowbar_service.rb    |  248 ------
 crowbar_framework/app/models/deployment.rb         |   76 ++
 crowbar_framework/app/models/doc.rb                |    2 -
 crowbar_framework/app/models/jig.rb                |   24 +-
 crowbar_framework/app/models/jig_event.rb          |    4 +-
 crowbar_framework/app/models/jig_event_test.rb     |    4 +-
 crowbar_framework/app/models/jig_map.rb            |   18 +-
 crowbar_framework/app/models/jig_run.rb            |    4 +-
 crowbar_framework/app/models/node.rb               |  161 +---
 crowbar_framework/app/models/node_object.old       |  897 ++++++++++++++++++++
 crowbar_framework/app/models/node_object.rb        |  897 --------------------
 crowbar_framework/app/models/proposal_queue.old    |  366 ++++++++
 crowbar_framework/app/models/proposal_queue.rb     |  366 --------
 .../app/models/proposal_queue_item.old             |   22 +
 .../app/models/proposal_queue_item.rb              |   22 -
 crowbar_framework/app/models/role.rb               |  102 ++-
 crowbar_framework/app/models/role_element_order.rb |    4 +-
 crowbar_framework/app/models/role_instance.rb      |   99 ---
 crowbar_framework/app/models/role_object.old       |  157 ++++
 crowbar_framework/app/models/role_object.rb        |  157 ----
 crowbar_framework/app/models/role_type.rb          |   60 ++
 crowbar_framework/app/models/snapshot.rb           |   88 ++
 .../app/views/barclamp/_index.html.haml            |   26 +-
 .../app/views/barclamp/graph.html.haml             |   18 +-
 .../app/views/devise/sessions/new.html.haml        |    2 +-
 crowbar_framework/app/views/nodes/index.html.haml  |    2 +-
 .../app/views/support/index.html.haml              |    8 +-
 crowbar_framework/config/locales/crowbar/en.yml    |   21 +-
 crowbar_framework/config/routes.rb                 |  178 ++--
 .../db/migrate/20120725023017_create_jig_maps.rb   |   10 +-
 .../migrate/20120730227000_create_attrib_types.rb  |   29 +
 .../db/migrate/20120730227000_create_attribs.rb    |   29 -
 .../db/migrate/20120730230713_create_jig_events.rb |    2 +-
 .../db/migrate/20120731225405_create_barclamps.rb  |    4 +-
 .../20120731225466_create_barclamps_configs.rb     |   30 -
 .../migrate/20120731225466_create_deployments.rb   |   30 +
 .../20120731225476_create_barclamps_instances.rb   |   30 -
 .../db/migrate/20120731225476_create_snapshots.rb  |   30 +
 .../db/migrate/20120731225504_create_role_types.rb |   26 +
 .../db/migrate/20120731225504_create_roles.rb      |   26 -
 .../20120731225510_create_role_instances.rb        |   29 -
 .../db/migrate/20120731225510_create_roles.rb      |   29 +
 .../20120731225600_create_attrib_instances.rb      |   35 -
 .../db/migrate/20120731225600_create_attribs.rb    |   35 +
 .../20120731225838_create_proposal_configs.rb      |   26 -
 .../db/migrate/20120731225914_create_proposals.rb  |   30 -
 .../20120731225993_create_role_element_orders.rb   |    2 +-
 .../20120731230001_barclamp_import_crowbar.rb      |    2 +-
 .../db/migrate/20120801190200_scaffold_nav.rb      |   16 +-
 .../20120809081700_create_proposal_queues.rb       |   22 -
 .../20120809082000_create_proposal_queue_items.rb  |   25 -
 crowbar_framework/public/crowbar_users_guide.pdf   |  Bin 1047970 -> 0 bytes
 crowbar_framework/spec/models/jig_spec.rb          |    2 +-
 .../test/data/foo/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 -
 .../test/unit/attrib_has_node_test.rb              |  105 +++
 .../test/unit/attrib_instance_has_node_test.rb     |  105 ---
 .../test/unit/attrib_instance_model_test.rb        |  282 ------
 crowbar_framework/test/unit/attrib_model_test.rb   |  281 +++++-
 .../test/unit/attrib_type_model_test.rb            |   74 ++
 .../test/unit/barclamp_attrib_model_test.rb        |   47 +-
 .../test/unit/barclamp_config_model_test.rb        |  190 -----
 .../test/unit/barclamp_import_test.rb              |   31 +-
 .../test/unit/barclamp_instance_model_test.rb      |   61 --
 crowbar_framework/test/unit/barclamp_model_test.rb |   38 +-
 .../test/unit/barclamp_node_data_test.rb           |   70 +-
 .../test/unit/deployment_model_test.rb             |  187 ++++
 crowbar_framework/test/unit/jig_map_model_test.rb  |    2 +-
 crowbar_framework/test/unit/jig_model_test.rb      |    4 +-
 crowbar_framework/test/unit/node_model_test.rb     |   26 +-
 .../test/unit/role_instance_model_test.rb          |   96 ---
 crowbar_framework/test/unit/role_model_test.rb     |   46 +-
 .../test/unit/role_type_model_test.rb              |   97 +++
 crowbar_framework/test/unit/snapshot_model_test.rb |   61 ++
 crowbar_framework/units.sh                         |   24 +
 doc/devguide/api/barclamp.md                       |   48 --
 doc/devguide/api/deployment.md                     |   28 +
 doc/devguide/api/proposal.md                       |   29 -
 doc/devguide/api/role.md                           |   21 +
 doc/devguide/api/snapshot.md                       |   12 +
 doc/devguide/model/crowbar_model.dia               |  Bin 3915 -> 3916 bytes
 doc/devguide/model/crowbar_model.png               |  Bin 36732 -> 33360 bytes
 181 files changed, 5539 insertions(+), 6064 deletions(-)

Crowbar-Pull-ID: e0aabc130001678192ae1d8b7a0a6688da09625f

Crowbar-Release: development