crowbar/barclamp-crowbar — pull request #356 by cloudedge (2013-01-21 18:12:58+00:00)
Title: Barclamp View fix (Trello 73) [1/2]

Related to Trello Card 73 https://trello.com/c/tgjZxwmi

In this pull, I changed the Barclamps view to use the new barclamp configuration models.

Since those modes were not complete, I had to (re)create the migrations for those models
and add the needed tests.

While I was in that part of the code, I saw a lot of places that we need to refactor
to move from proposals to configurations. I tried to fix/strength/migrate where I
could do it with small touches.

I started to mark CB1 legacy code as "CB1 TODO" to make it easier to find.

We are straddling the old and new code bases - we're going to have to tear some of the
old stuff out really really soone.

PS: Minor fix to network barclamp to reflect new BDD testing logic.

BDD/barclamp.erl | 2 +-
BDD/features/proposals.feature | 2 +
.../app/controllers/barclamp_controller.rb | 5 +
crowbar_framework/app/models/barclamp.rb | 45 ++++--
.../app/models/barclamp_configuration.rb | 54 +++++---
crowbar_framework/app/models/barclamp_instance.rb | 30 ++--
crowbar_framework/app/models/doc.rb | 58 ++++----
crowbar_framework/app/models/node_role.rb | 9 +-
crowbar_framework/app/models/role.rb | 17 ++-
crowbar_framework/app/models/role_element_order.rb | 2 +-
.../app/views/barclamp/_index.html.haml | 42 +++---
.../app/views/barclamp/graph.html.haml | 43 ++++++
.../app/views/barclamp/index.html.haml | 4 +-
crowbar_framework/config/locales/crowbar/en.yml | 51 +++++--
crowbar_framework/config/locales/en.yml | 21 +--
crowbar_framework/config/routes.rb | 1 +
.../db/migrate/20120723233100_create_navs.rb | 1 +
.../db/migrate/20120731225405_create_barclamps.rb | 35 ++---
.../20120731225466_create_barclamps_configs.rb | 30 ++++
.../20120731225476_create_barclamps_instances.rb | 29 ++++
.../db/migrate/20120731225504_create_roles.rb | 12 +-
.../db/migrate/20120731225505_create_node_roles.rb | 7 +-
.../20120731230001_barclamp_import_crowbar.rb | 3 +-
crowbar_framework/spec/models/jig_spec.rb | 21 +--
.../test/unit/barclamp_config_model_test.rb | 144 ++++++++++++++++++++
.../test/unit/barclamp_instance_model_test.rb | 24 ++++
crowbar_framework/test/unit/barclamp_model_test.rb | 21 +--
.../test/unit/node_role_model_test.rb | 1 +
crowbar_framework/test/unit/role_model_test.rb | 18 ++-
29 files changed, 566 insertions(+), 166 deletions(-)

Crowbar-Pull-ID: a5cef33661485f12205db574632537726a51de3b

Crowbar-Release: development