<commit_before>// Copyright 2015, Renasar Technologies Inc.
/* jslint node: true */

'use strict';

var di = require('di');

module.exports = poweronJobFactory;
di.annotate(poweronJobFactory, new di.Provide('Job.node.poweron'));
di.annotate(poweronJobFactory, new di.Inject('Logger', 'Q', 'Assert', 'Service.OBM'));
function poweronJobFactory(Logger, Q, assert, obmService) {

    var logger = Logger.initialize(poweronJobFactory);

    var PowerOnJob = function PowerOnJob(options) {
        assert.object(options);
        assert.string(options.nodeId);
        this.options = options;
    };

    PowerOnJob.prototype.run = function run() {
        logger.info("Running PowerOn Job for node ID "+this.options.nodeId);
        return obmService.powerOn(this.options.nodeId);
    };

    PowerOnJob.prototype.cancel = function cancel() {
        return Q.reject("Cancel for poweron not implemented");
    };

    return PowerOnJob;
}<commit_msg>adding jsdoc<commit_after>// Copyright 2015, Renasar Technologies Inc.
/* jslint node: true */

'use strict';

var di = require('di');

module.exports = poweronJobFactory;
di.annotate(poweronJobFactory, new di.Provide('Job.node.poweron'));
di.annotate(poweronJobFactory, new di.Inject('Logger', 'Q', 'Assert', 'Service.OBM'));
function poweronJobFactory(Logger, Q, assert, obmService) {

    var logger = Logger.initialize(poweronJobFactory);

    /**
     *
     * @param {Object} options
     * @constructor
     */
    var PowerOnJob = function PowerOnJob(options) {
        assert.object(options);
        assert.string(options.nodeId);
        this.options = options;
    };

    /**
     * @memberOf PowerOnJob
     * @returns {Q.Promise}
     */
    PowerOnJob.prototype.run = function run() {
        logger.info("Running PowerOn Job for node ID "+this.options.nodeId);
        return obmService.powerOn(this.options.nodeId);
    };

    /**
     * @memberOf PowerOnJob
     * @returns {Q.Promise}
     */
    PowerOnJob.prototype.cancel = function cancel() {
        return Q.reject("Cancel for poweron not implemented");
    };

    return PowerOnJob;
}
{'fraction_non_alphanumeric': 0.13466097676623992, 'fraction_numerical': 0.003793266951161688, 'mean_word_length': 3.2973523421588595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7122125', 'n_tokens_mistral': 654, 'n_tokens_neox': 634, 'n_words': 141}