<commit_before>// Copyright 2015, EMC, Inc.

'use strict';

module.exports = {
    friendlyName: 'Flash Quanta BMC',
    injectableName: 'Task.Linux.Flash.Quanta.Bmc',
    implementsTask: 'Task.Base.Linux.Commands',
    options: {
        file: null,
        downloadDir: '/opt/downloads',
        commands: [
            // Backup files
            'sudo /opt/socflash/socflash_x64 -b /opt/uploads/bmc-backup.bin',
            'sudo curl -T /opt/uploads/bmc-backup.bin ' +
                '{{ api.files }}/{{ task.nodeId }}-bmc-backup.bin',
            // Flash files
            'sudo /opt/socflash/socflash_x64 -s option=x ' +
                'flashtype=2 if={{ options.downloadDir }}/{{ options.file }}',
        ]
    },
    properties: {
        flash: {
            type: 'bmc',
            vendor: {
                quanta: { }
            }
        }
    }
};<commit_msg>Add waiting time for the new bmc to take effect after flashing quanta, which is suggested by quanta in demo script<commit_after>// Copyright 2015, EMC, Inc.

'use strict';

module.exports = {
    friendlyName: 'Flash Quanta BMC',
    injectableName: 'Task.Linux.Flash.Quanta.Bmc',
    implementsTask: 'Task.Base.Linux.Commands',
    options: {
        file: null,
        downloadDir: '/opt/downloads',
        commands: [
            // Backup files
            'sudo /opt/socflash/socflash_x64 -b /opt/uploads/bmc-backup.bin',
            'sudo curl -T /opt/uploads/bmc-backup.bin ' +
                '{{ api.files }}/{{ task.nodeId }}-bmc-backup.bin',
            // Flash files
            'sudo /opt/socflash/socflash_x64 -s option=x ' +
                'flashtype=2 if={{ options.downloadDir }}/{{ options.file }}',
            // Wait for the new BMC to take effect, suggested in script provided by Quanta
            // Otherwise following bmc related tasks (if any) might possibly fail
            'sleep 90'
        ]
    },
    properties: {
        flash: {
            type: 'bmc',
            vendor: {
                quanta: { }
            }
        }
    }
};
{'fraction_non_alphanumeric': 0.1332036947010209, 'fraction_numerical': 0.009722897423432183, 'mean_word_length': 1.6623544631306597, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '117151', 'n_tokens_mistral': 660, 'n_tokens_neox': 626, 'n_words': 148}