crowbar/barclamp-test — pull request #18 by cloudedge (2013-01-25 05:27:09+00:00)
Title: Add Barclamp Type to model (refactoring prep) [2/2]

We're subclassing barclamp as part of the work to pull apart the ServiceObject.

This pull introduces the type to the parent model.

Barclamps will now be able to add a NAMESPACED barclamp subclass with the following
approach.

the file app/models/[barclampname]/barclamp_[barclampname].rb
should contain the [BarclampNameSpace]::Barclamp[BarclampName] < Barclamp class.

For example, for the foo barclamp:
file = app/models/foo/barclamp_foo.rm
class = Foo::BarclampFoo < Barclamp

To prevent having to touch every barclamp, the current code implements a safety mechanism
where barclamps without the subclass will automatically get the BarclampFramework class.

I have added the new barclamp subclass (empty) for the Crowbar & Test barclamps.

This pull also contains some minor doc updates and BDD test cleanup.

crowbar_framework/app/models/test/barclamp_test.rb | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Crowbar-Pull-ID: 487fbfcd462d9d1e7ccdb337764bd0e3a8a23568

Crowbar-Release: development