The chef recipes and the Crowbar framework do not live in the same
execution spaces, hence the code duplication.


On Tue, Jun 4, 2013 at 7:39 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
>
> -1: having this filter here and in deployer (see fixed method) makes it
> too easy to change the code in one place and not the other. No duplication
> for that, please.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/crowbar/barclamp-crowbar/pull/522/files#r4521177>
> .
>