On Tue, Jun 4, 2013 at 11:02 AM, Vincent Untz <notifications@github.com>wrote:

> In crowbar_framework/app/models/node_object.rb:
>
> > @@ -339,11 +339,13 @@ def virtual?
> >    end
> >
> >    def number_of_drives
> > -    self.crowbar['crowbar']['disks'].length rescue -1
> > +    @node[:block_device].find_all do |disk,data|
> > +      disk =~ /^[hsv]d/ && data[:removable] == "0"
> > +    end.length
>
> I understand that; it doesn't mean the code cannot be shared... I'm still
> -1. Please don't merge until this is fixed.
>
Despite the variable names, the code here is operating purely based on
information bound to a chef node object by ohai, and it does not need any
of the additional functionality that the barclamp library code that
everything else uses provides.  I see no real reason to refactor NodeObject
and BarclampLibrary to enable sharing 3 lines of trivial code.

—

> Reply to this email directly or view it on GitHub<https://github.com/crowbar/barclamp-crowbar/pull/522/files#r4526118>
> .
>