filter_work

in cookbooks/fb_storage/libraries/format_devices_provider.rb [55:84]


      def filter_work(needs_work, how_to_collapse, storage)
        case how_to_collapse
        when :all
          {
            :devices => needs_work[:missing_partitions] +
              needs_work[:mismatched_partitions],
            :partitions => needs_work[:missing_filesystems] +
              needs_work[:mismatched_filesystems],
            :arrays => needs_work[:missing_arrays] +
              needs_work[:mismatched_arrays],
          }
        when :missing
          {
            :devices => needs_work[:missing_partitions],
            :partitions => needs_work[:missing_filesystems],
            
            :arrays => filter_arrays_with_mounted_drives(
              needs_work[:missing_arrays], storage
            ),
          }
        when :filesystems
          {
            :devices => [],
            :partitions => needs_work[:missing_filesystems] +
              needs_work[:mismatched_filesystems],
            :arrays => [],
          }
        end
      end