lib/utils/job-utils/catalog-searcher.js
function getRaidControllerVendor(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-controllers'
        })
        .then(function (controllerCatalog) {
            if (!_.has(controllerCatalog, 'data.Controllers')) {
                return Promise.reject(
                    new Error('Could not find megaraid-controllers catalog data.'));
            }
            var vendor,
                controllerId,
                controllerVendors = [];
            var controllerDataList = _.get(controllerCatalog, 'data.Controllers');
            _.forEach(controllerDataList, function(data){
                vendor = _.get(data, '[Response Data][Scheduled Tasks].OEMID');
                controllerId = _.get(data, '[Command Status][Controller]');
                controllerVendors[controllerId] = vendor.toLowerCase();
            });
            return controllerVendors;
        });
    }
function getRaidControllerVendor(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-controllers'
        })
        .then(function (controllerCatalog) {
            if (!_.has(controllerCatalog, 'data.Controllers')) {
                return Promise.reject(
                    new Error('Could not find megaraid-controllers catalog data.'));
            }
            var vendor,
                controllerId,
                controllerVendors = [];
            var controllerDataList = _.get(controllerCatalog, 'data.Controllers');
            _.forEach(controllerDataList, function(data){
                vendor = _.get(data, '[Response Data][Scheduled Tasks].OEMID');
                controllerId = _.get(data, '[Command Status][Controller]');
                controllerVendors[controllerId] = vendor.toLowerCase();
            });
            return controllerVendors;
        });
    }
function getRaidControllerVendor ( nodeId ) { return waterline . catalogs . findMostRecent ( { node : nodeId , source : 'megaraid-controllers' } ) . then ( function ( controllerCatalog ) { if ( ! _ . has ( controllerCatalog , 'data.Controllers' ) ) { return Promise . reject ( new Error ( 'Could not find megaraid-controllers catalog data.' ) ) ; } var vendor , controllerId , controllerVendors = [ ] ; var controllerDataList = _ . get ( controllerCatalog , 'data.Controllers' ) ; _ . forEach ( controllerDataList , function ( data ) { vendor = _ . get ( data , '[Response Data][Scheduled Tasks].OEMID' ) ; controllerId = _ . get ( data , '[Command Status][Controller]' ) ; controllerVendors [ controllerId ] = vendor . toLowerCase ( ) ; } ) ; return controllerVendors ; } ) ; }
Get drive RAID controller vendor from catalog
@param {String} nodeId - node identifier
@return {Promise} drive RAID controller vendors
Get drive RAID controller vendor from catalog