crowbar/barclamp-crowbar — pull request #425 by cloudedge (2013-03-02 14:59:25+00:00)
Title: update routes for shared resources to use api/v2 pattern instead of barclamps [1/1]

These changes help move Victor forward with transistions on control.sh.
They are partial, I still need to implement the transistion method; however,
they establish the API pattern that is needed and consisitent.

With this change (see list below), general items are under /api/v2 while
barclamps specifici items are under /:barclamp/v2.

I have updates BDD to reflect these changes and included the tests added during
the BDD class.

I hav also started the very early steps towards using records to store REST results
include of the mixed bag of {ajax...} tuples that is complicating the code.

### API Index

This is a temporary summary - API should be split down into subpages!

* /api
* /v2
* /nodes (CRUD)
* /:node/attribs
* /:node/groups
* /transition (put)
* /allocate (put)
* /barclamps (CRUD)
* /jigs (CRUD)
* /attrib_types (CRUD)
* /role_types (CRUD)
* /groups
* /:group/nodes
* /status
* /nodes(:/id)
* /deployments(:/id)

* /:barclamp/v2
* /deployments (CRUD)
* /commit (put)
* /recall (put)
* /template (redirects to snapshot)
* /snapshots (CRUD)
* /roles (CRUD)
* /attribs
* /nodes
* /attribs

BDD/attrib_type.erl | 2 +-
BDD/barclamp.erl | 2 +-
BDD/bdd.hrl | 3 +
BDD/bdd_restrat.erl | 23 ++++--
BDD/features/role_type.feature | 26 ++++---
BDD/features/snapshot.feature | 8 +--
BDD/group_cb.erl | 2 +-
BDD/jig.erl | 2 +-
BDD/node.erl | 4 +-
BDD/role_type.erl | 10 +--
BDD/snapshot.erl | 7 +-
.../app/controllers/nodes_controller.rb | 8 ++-
crowbar_framework/app/models/barclamp.rb | 2 +-
.../app/views/dashboard/index.html.haml | 2 +-
crowbar_framework/config/routes.rb | 74 +++++++++++---------
.../db/migrate/20130228163840_create_admin_node.rb | 6 +-
doc/devguide/api-index.md | 32 +++++++++
17 files changed, 136 insertions(+), 77 deletions(-)

Crowbar-Pull-ID: cbaa3fde9bc0ddd7c928818ce403372d05decb62

Crowbar-Release: development