dellcloudedge/barclamp-crowbar — pull request #260 by cloudedge (2012-11-07 07:09:25+00:00)
Title: CMDB code in non-breaking state (some tests failing) [1/1]

This pull fixes the issues that were preventing the install from completing.

They also further the effort around the CMDB object work to include
a suite of unit tests and the initial working for BDD test coverage
on a CMDB REST API. Documentation is included.

Notably: I have also figured out a generic route scheme for CMDB from
the crowbar barclamp controller. This pattern could be applied to
many (all?) of the other crowbar barclamp calls so that we have a more
generic and scalable routes pattern for the 2.0 API.

Specifically, the new route is 2.0/:controller/:version/:action(/:id).

This generic route allow barclamps to add their actions as described
in the API documentation.

crowbar_framework/BDD/bdd_utils.erl | 2 +-
crowbar_framework/BDD/cmdbs.erl | 82 +++++++++++++
crowbar_framework/BDD/features/cmdbs.feature | 22 ++++
.../app/controllers/cmdb_controller.rb | 21 ++++
.../app/controllers/crowbar_controller.rb | 49 ++++++++-
.../app/controllers/groups_controller.rb | 4 +-
.../app/controllers/nodes_controller.rb | 4 +-
crowbar_framework/app/models/barclamp.rb | 2 +
crowbar_framework/app/models/cmdb.rb | 38 +++++-
crowbar_framework/app/models/cmdb_attribute.rb | 1 +
crowbar_framework/app/models/cmdb_chef.rb | 71 +++++++++++
crowbar_framework/app/models/cmdb_event.rb | 48 +++++++-
crowbar_framework/app/models/cmdb_test.rb | 42 +++++++
crowbar_framework/app/models/group.rb | 2 +-
.../app/controllers/==BC-MODEL==_controller.rb | 12 ++
crowbar_framework/config/locales/crowbar/en.yml | 3 +-
crowbar_framework/config/locales/en.yml | 6 +
crowbar_framework/config/routes.rb | 36 +++---
.../db/migrate/20120730225300_create_cmdbs.rb | 6 +
.../migrate/20121105224700_barclamp_import_chef.rb | 26 ++++
.../doc/default/crowbar/devguide/api/cmdb.md | 127 ++++++++++++++++++++
.../crowbar/devguide/testing/bdd/steps_rest.md | 123 +++++++++++++++++++
crowbar_framework/lib/crowbar_offline.rb | 124 -------------------
crowbar_framework/test/offline-cache.zip | Bin 53257 -> 0 bytes
crowbar_framework/test/unit/barclamp_model_test.rb | 9 ++
crowbar_framework/test/unit/cmdb_model_test.rb | 56 +++++++++
26 files changed, 759 insertions(+), 157 deletions(-)

Crowbar-Pull-ID: 3ce4dc8b27415ab6f54b4cfb4d85e2c501d4dafd

Crowbar-Release: development