<commit_before>var options = require("commander");
var q = require("q");
var BigIp = require('./lib/bigIp');
var globalSettings = {
    guiSetup: 'disabled'
};
var dbVars = {};
var modules = {};

var previousOperationMessage;
var bigIp;

var collect = function(val, collection) {
    collection.push(val);
    return collection;
};

var map = function(pair, map) {
    var nameVal = pair.split(':');
    map[nameVal[0].trim()] = nameVal[1].trim();
};

options
    .option('--host <ip_address>', 'BIG-IP management IP.')
    .option('-u, --user <user>', 'BIG-IP admin user.')
    .option('-p, --password <password>', 'BIG-IP admin user password.')
    .option('-l, --license <license_key>', 'BIG-IP license key.')
    .option('-a, --add-on <add-on keys>', 'Add on license keys.', collect, [])
    .option('-n, --host-name <hostname>', 'Set BIG-IP hostname')
    .option('-g, --global-settings <name: value>', 'A global setting name/value pair. For multiple settings, use multiple -g entries', map, globalSettings)
    .option('-d, --db <name: value>', 'A db variable name/value pair. For multiple settings, use multiple -d entries', map, dbVars)
    .option('-m, --module <name: value>', 'A module provisioning module/level pair. For multiple modules, use multiple -m entries', map, modules)
    .parse(process.argv);

console.log(process.argv[1] + " called with" +
    (options.host ? "\n\thost: " + options.host : "") +
    (options.user ? "\n\tuser: " + options.user : "") +
    (options.password ? "\n\tpassword: ******" : "") +
    (options.license ? "\n\tlicense: " + options.license : "") +
    (options.addOn.length > 0 ? "\n\tadd-on keys: " + options.addOn : "") +
    (options.hostName ? "\n\thostName: " + options.hostName : "") +
    (Object.keys(globalSettings).length > 0 ? "\n\tglobal settings: " + JSON.stringify(globalSettings) : "") +
    (Object.keys(dbVars).length > 0 ? "\n\tdb vars: " + JSON.stringify(dbVars) : "") +
    (Object.keys(modules).length > 0 ? "\n\tmodules: " + JSON.stringify(modules) : ""));


bigIp = new BigIp(options.host, options.user, options.password);

console.log("Waiting for BIG-IP to be ready...");
bigIp.ready()
    .then(function() {
        console.log("BIG-IP is ready.");

        var nameServers = ["10.133.20.70", "10.133.20.71"];<commit_msg>wait longer for BIG-IP to be ready<commit_after>var options = require("commander");
var q = require("q");
var BigIp = require('./lib/bigIp');
var globalSettings = {
    guiSetup: 'disabled'
};
var dbVars = {};
var modules = {};

var previousOperationMessage;
var bigIp;

var collect = function(val, collection) {
    collection.push(val);
    return collection;
};

var map = function(pair, map) {
    var nameVal = pair.split(':');
    map[nameVal[0].trim()] = nameVal[1].trim();
};

options
    .option('--host <ip_address>', 'BIG-IP management IP.')
    .option('-u, --user <user>', 'BIG-IP admin user.')
    .option('-p, --password <password>', 'BIG-IP admin user password.')
    .option('-l, --license <license_key>', 'BIG-IP license key.')
    .option('-a, --add-on <add-on keys>', 'Add on license keys.', collect, [])
    .option('-n, --host-name <hostname>', 'Set BIG-IP hostname')
    .option('-g, --global-settings <name: value>', 'A global setting name/value pair. For multiple settings, use multiple -g entries', map, globalSettings)
    .option('-d, --db <name: value>', 'A db variable name/value pair. For multiple settings, use multiple -d entries', map, dbVars)
    .option('-m, --module <name: value>', 'A module provisioning module/level pair. For multiple modules, use multiple -m entries', map, modules)
    .parse(process.argv);

console.log(process.argv[1] + " called with" +
    (options.host ? "\n\thost: " + options.host : "") +
    (options.user ? "\n\tuser: " + options.user : "") +
    (options.password ? "\n\tpassword: ******" : "") +
    (options.license ? "\n\tlicense: " + options.license : "") +
    (options.addOn.length > 0 ? "\n\tadd-on keys: " + options.addOn : "") +
    (options.hostName ? "\n\thostName: " + options.hostName : "") +
    (Object.keys(globalSettings).length > 0 ? "\n\tglobal settings: " + JSON.stringify(globalSettings) : "") +
    (Object.keys(dbVars).length > 0 ? "\n\tdb vars: " + JSON.stringify(dbVars) : "") +
    (Object.keys(modules).length > 0 ? "\n\tmodules: " + JSON.stringify(modules) : ""));


bigIp = new BigIp(options.host, options.user, options.password);

console.log("Waiting for BIG-IP to be ready...");
bigIp.ready(30, 10000)
    .then(function() {
        console.log("BIG-IP is ready.");

        var nameServers = ["10.133.20.70", "10.133.20.71"];
{'fraction_non_alphanumeric': 0.20380787537862396, 'fraction_numerical': 0.012332323669407183, 'mean_word_length': 3.3986679352997147, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '2687700', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1560, 'n_words': 382}