crowbar/barclamp-crowbar — pull request #661 by cloudedge (2013-08-17 20:27:03+00:00)
Title: Advancing annealer function: now you can drop nodes into roles to create node-roles [1/2]

This brings together several aspects of work around deployment_role and node role

The most significant aspect of this pull is from the deployment screen:
* you can now view the nodes and roles assigned to a deployment.
* you can add deployment roles to a deployment (based on which are available)
* you can drop nodes into deployment roles to create a node_role
* you can run the whole things and watch the annear work (you can see it think!)

Some interesting aspects of the deployment state:
* if you add a node-role to an active deployment, it will create a proposal node-role
* if you add a node-role to a committed deployement, it will create a todo node-role
in this case, the annealer will pickup the node-role and run it!

Other benefits - to enable BDD of node_role, I had to allow you to create node roles
using the name of the snapshot, role and node.

Also: run annealer from the UI is now set to run in the background. There's a tax for this,
it takes several seconds for the background thread to spin up. It's not a long term
thing, it's just for development. Eventually, I expect to use delayed job for this.

BDD/node_role.erl | 2 +-
.../app/controllers/node_roles_controller.rb | 28 +++++--
.../app/controllers/snapshots_controller.rb | 10 ++-
crowbar_framework/app/models/deployment.rb | 25 ++----
crowbar_framework/app/models/snapshot.rb | 1 +
.../app/views/deployments/_buttons.html.haml | 1 +
.../app/views/deployments/show.html.haml | 83 +++++++++++++++++---
.../app/views/snapshots/show.html.haml | 25 +++---
crowbar_framework/config/locales/crowbar/en.yml | 8 +-
crowbar_framework/config/routes.rb | 1 +
10 files changed, 134 insertions(+), 50 deletions(-)

Crowbar-Pull-ID: 5c24290fb705881acd4bb488abbee2aaeb37b833

Crowbar-Release: development