lib/utils/job-utils/command-parser.js
function _parseControllerInfoOneDriveData(dataBlock) {
        //split output by empty line
        var dataSegments = dataBlock.split(/\n/); //Divided by line
        var drvObj = {};
        _.forEach(dataSegments, function(data) {
            data = data.trim();

            // Ignore empty line
            if (data.length === 0) {
                return;
            }

            //Split key and value by "="
            var fields = data.split("="); //Divided by "="
            drvObj[fields[0]] = fields[1].trim();
        });

        return drvObj;
    }
function _parseControllerInfoOneDriveData(dataBlock) {
        //split output by empty line
        var dataSegments = dataBlock.split(/\n/); //Divided by line
        var drvObj = {};
        _.forEach(dataSegments, function(data) {
            data = data.trim();

            // Ignore empty line
            if (data.length === 0) {
                return;
            }

            //Split key and value by "="
            var fields = data.split("="); //Divided by "="
            drvObj[fields[0]] = fields[1].trim();
        });

        return drvObj;
    }
function _parseControllerInfoOneDriveData ( dataBlock ) { //split output by empty line var dataSegments = dataBlock . split ( / \n / ) ; //Divided by line var drvObj = { } ; _ . forEach ( dataSegments , function ( data ) { data = data . trim ( ) ; // Ignore empty line if ( data . length === 0 ) { return ; } //Split key and value by "=" var fields = data . split ( "=" ) ; //Divided by "=" drvObj [ fields [ 0 ] ] = fields [ 1 ] . trim ( ) ; } ) ; return drvObj ; }
Parse the whole controller info of one drive.

@param {String} dataBlock - The controller info output data for one drive.
@returns {Object} The object with well classfied controller information.
Parse the whole controller info of one drive .