crowbar/barclamp-crowbar — pull request #653 by cloudedge (2013-08-12 01:37:00+00:00)
Title: Start change from mixin to role subclass (step 1) [1/2]

This is a refactoring that Victor and I discussed after reviewing the mixin code for Role.

Since we are overriding the same methods for roles, the Rails subclass model will work better
and more simply.

This pull begins to put the infrastructure in place to have roles discover their subclass type
based on the role name. The test barclamp will be the first one to use this functionality.

This change was needed at this time to create test infrastructure for the deployment annealer.

BDD/features/node_role.feature | 7 ++++
BDD/linux_sim.sh | 3 ++
.../app/controllers/node_roles_controller.rb | 13 +++++---
.../app/controllers/snapshots_controller.rb | 2 +-
crowbar_framework/app/models/deployment.rb | 2 ++
crowbar_framework/app/models/node.rb | 2 +-
crowbar_framework/app/models/node_role.rb | 20 ++++++++++--
crowbar_framework/app/models/role.rb | 22 +++++++++++++
crowbar_framework/app/models/snapshot.rb | 7 ++--
.../app/views/deployments/_buttons.html.haml | 4 ++-
.../app/views/node_roles/show.html.haml | 22 +++++++------
.../app/views/snapshots/show.html.haml | 34 +++++++++++---------
crowbar_framework/config/locales/crowbar/en.yml | 4 +++
crowbar_framework/config/routes.rb | 4 +--
.../db/migrate/20120731225510_create_roles.rb | 1 +
15 files changed, 107 insertions(+), 40 deletions(-)

Crowbar-Pull-ID: 908ab5b669db0b558048961fc2ba210774596259

Crowbar-Release: development