lib/utils/job-utils/catalog-searcher.js
function getPhysicalDiskCatalog(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-physical-drives'
        })
        .then(function(physicalDiskCatalog){
            if (!_.has(physicalDiskCatalog, 'data')) {
                return Promise.reject(
                    new Error('Could not find megaraid-physical-drives catalog data.'));
            }
            return physicalDiskCatalog.data;
        });
    }
function getPhysicalDiskCatalog(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-physical-drives'
        })
        .then(function(physicalDiskCatalog){
            if (!_.has(physicalDiskCatalog, 'data')) {
                return Promise.reject(
                    new Error('Could not find megaraid-physical-drives catalog data.'));
            }
            return physicalDiskCatalog.data;
        });
    }
function getPhysicalDiskCatalog ( nodeId ) { return waterline . catalogs . findMostRecent ( { node : nodeId , source : 'megaraid-physical-drives' } ) . then ( function ( physicalDiskCatalog ) { if ( ! _ . has ( physicalDiskCatalog , 'data' ) ) { return Promise . reject ( new Error ( 'Could not find megaraid-physical-drives catalog data.' ) ) ; } return physicalDiskCatalog . data ; } ) ; }
Get physical disk catalog data
@param {String} nodeId - node identifier
@return {Promise} drive physical disk catalogs
Get physical disk catalog data