crowbar/barclamp-crowbar — pull request #395 by cloudedge (2013-02-16 20:12:46+00:00)
Title: Intermediate Refactoring of BarclampConfig to allow creating proposal [1/2]

This is an intermediate pull for the larger BarclampConfig.create_proposal action.

At this point, I have exposed the core model actions with tests; however
the API and CLIs needed to access this model method are NOT exposed.

There is partial progress on the APIs, but I wanted to allow others to consume the
model methods early.

WARNING: There is substantial CLEAN-UP of the proposal models out of the code base
in this pull. That includes all the old CB1 routes.

Next steps are the hook the API into the BarclampConfig/Instance/Role.
I have added a preminimary doc page to support this.

BDD/barclamp.erl | 2 +-
BDD/config.erl | 52 +++++
BDD/crowbar.erl | 9 +-
BDD/default.config | 2 +-
BDD/features/barclamp.feature | 6 +-
BDD/features/config.feature | 44 ++++
BDD/features/navigation.feature | 1 +
BDD/features/proposals.feature | 22 --
BDD/features/role.feature | 24 ++
BDD/features/scaffolds.feature | 11 -
BDD/instance.erl | 55 +++++
BDD/role.erl | 58 +++++
.../app/controllers/barclamp_controller.rb | 36 +--
.../barclamp_configs_controller.rb | 24 ++
.../barclamp_instances_controller.rb | 24 ++
.../barclamp_crowbar/barclamp_roles_controller.rb | 24 ++
.../barclamp_crowbar/barclamps_controller.rb | 24 ++
crowbar_framework/app/models/attrib_instance.rb | 5 +-
crowbar_framework/app/models/barclamp.rb | 119 ++++------
.../app/models/barclamp_configuration.rb | 46 +---
crowbar_framework/app/models/barclamp_instance.rb | 68 ++----
crowbar_framework/app/models/jig.rb | 2 +-
crowbar_framework/app/models/jig_event.rb | 3 +-
crowbar_framework/app/models/proposal.rb | 110 ---------
crowbar_framework/app/models/proposal_config.rb | 31 ---
crowbar_framework/app/models/proposal_object.rb | 219 ------------------
.../app/models/proposal_queue_item.rb | 2 +-
crowbar_framework/app/models/role.rb | 2 +-
crowbar_framework/app/models/role_instance.rb | 22 +-
crowbar_framework/app/models/service_object.rb | 28 +++
.../app/views/barclamp/graph.html.haml | 6 -
.../app/views/barclamp/index.html.haml | 33 +--
.../config/environments/development.rb | 3 +-
crowbar_framework/config/locales/en.yml | 3 +
crowbar_framework/config/routes.rb | 233 ++++++++------------
.../db/migrate/20120723233100_create_navs.rb | 2 +-
.../db/migrate/20120730230713_create_jig_events.rb | 2 +-
.../db/migrate/20120731225405_create_barclamps.rb | 2 +-
.../20120731225510_create_role_instances.rb | 4 +-
.../20120809082000_create_proposal_queue_items.rb | 2 +-
crowbar_framework/lib/api_helper.rb | 17 +-
crowbar_framework/spec/models/jig_spec.rb | 160 +++++---------
.../test/unit/barclamp_config_model_test.rb | 76 +++++--
.../test/unit/barclamp_instance_model_test.rb | 23 ++
crowbar_framework/test/unit/barclamp_model_test.rb | 4 +-
.../test/unit/role_instance_model_test.rb | 25 ++-
crowbar_framework/test/unit/role_model_test.rb | 5 +
doc/devguide/api/barclamp.md | 122 ++++++++--
48 files changed, 880 insertions(+), 917 deletions(-)

Crowbar-Pull-ID: 74df267d3c10aa652b83fc328448961ee6f3f001

Crowbar-Release: development