function sshCommandParallel(connection, commands, fnOutput) {
  var commandList = commands.map(function(command){
    return sshExecSingleCommand(connection, command, fnOutput);
  });
  return Q.allSettled(commandList)
  .then(function(results){
    return results.map(function(result){
      if( result.state === "rejected") {
        return result.reason;
      } else {
        return result.value;
      }
    });
  });
}
function sshCommandParallel(connection, commands, fnOutput) {
  var commandList = commands.map(function(command){
    return sshExecSingleCommand(connection, command, fnOutput);
  });
  return Q.allSettled(commandList)
  .then(function(results){
    return results.map(function(result){
      if( result.state === "rejected") {
        return result.reason;
      } else {
        return result.value;
      }
    });
  });
}
function sshCommandParallel ( connection , commands , fnOutput ) { var commandList = commands . map ( function ( command ) { return sshExecSingleCommand ( connection , command , fnOutput ) ; } ) ; return Q . allSettled ( commandList ) . then ( function ( results ) { return results . map ( function ( result ) { if ( result . state === "rejected" ) { return result . reason ; } else { return result . value ; } } ) ; } ) ; }
Execute a list of commands in parallel and returns a Promise for all results.
This function is a wrapper around *Q.allSettled* API.

@param  {object} connection 	SSH connection parameters
@param  {array} commands   	array of SSH commands to execute
@param  {function} fnOutput  optional function applied to commands output
@return {Promise}            Fullfilled as an array of results
Execute a list of commands in parallel and returns a Promise for all results . This function is a wrapper around * Q . allSettled * API .