lib/utils/job-utils/catalog-searcher.js
function getVirtualDiskCatalog(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-virtual-disks'
        })
        .then(function (virtualDiskCatalog) {
            if (!_.has(virtualDiskCatalog, 'data.Controllers[0]')) {
                return Promise.reject(
                    new Error('Could not find megaraid-virtual-disks catalog data.'));
            }
            return virtualDiskCatalog.data;
        });
    }
function getVirtualDiskCatalog(nodeId){
        return waterline.catalogs.findMostRecent({
            node: nodeId,
            source: 'megaraid-virtual-disks'
        })
        .then(function (virtualDiskCatalog) {
            if (!_.has(virtualDiskCatalog, 'data.Controllers[0]')) {
                return Promise.reject(
                    new Error('Could not find megaraid-virtual-disks catalog data.'));
            }
            return virtualDiskCatalog.data;
        });
    }
function getVirtualDiskCatalog ( nodeId ) { return waterline . catalogs . findMostRecent ( { node : nodeId , source : 'megaraid-virtual-disks' } ) . then ( function ( virtualDiskCatalog ) { if ( ! _ . has ( virtualDiskCatalog , 'data.Controllers[0]' ) ) { return Promise . reject ( new Error ( 'Could not find megaraid-virtual-disks catalog data.' ) ) ; } return virtualDiskCatalog . data ; } ) ; }
Get virtual disk catalog data
@param {String} nodeId - node identifier
@return {Promise} drive virtual disk catalogs
Get virtual disk catalog data