diff --git a/lib/do_instance/do_snapshot/do_create.js b/lib/do_instance/do_snapshot/do_create.js index 469e6b9..075aa91 100644 --- a/lib/do_instance/do_snapshot/do_create.js +++ b/lib/do_instance/do_snapshot/do_create.js @@ -15,7 +15,6 @@ var format = require('util').format; var vasync = require('vasync'); var common = require('../../common'); -var distractions = require('../../distractions'); var errors = require('../../errors'); @@ -72,13 +71,6 @@ function do_create(subcmd, opts, args, cb) { return next(); } - // 1 'wait': no distraction. - // >1 'wait': distraction, pass in the N. - var distraction; - if (process.stderr.isTTY && opts.wait.length > 1) { - distraction = distractions.createDistraction(opts.wait.length); - } - var cloudapi = cli.tritonapi.cloudapi; var waiter = cloudapi.waitForSnapshotStates.bind(cloudapi); @@ -87,10 +79,6 @@ function do_create(subcmd, opts, args, cb) { name: ctx.name, states: ['created', 'failed'] }, function (err, snap) { - if (distraction) { - distraction.destroy(); - } - if (err) { return next(err); } @@ -131,9 +119,8 @@ do_create.options = [ }, { names: ['wait', 'w'], - type: 'arrayOfBool', - help: 'Wait for the creation to complete. Use multiple times for a ' + - 'spinner.' + type: 'bool', + help: 'Wait for the creation to complete.' } ]; do_create.help = [ diff --git a/lib/do_instance/do_snapshot/do_delete.js b/lib/do_instance/do_snapshot/do_delete.js index e0f0453..f599240 100644 --- a/lib/do_instance/do_snapshot/do_delete.js +++ b/lib/do_instance/do_snapshot/do_delete.js @@ -15,7 +15,6 @@ var format = require('util').format; var vasync = require('vasync'); var common = require('../../common'); -var distractions = require('../../distractions'); var errors = require('../../errors'); @@ -37,13 +36,6 @@ function do_delete(subcmd, opts, args, cb) { var names = args.slice(1, args.length); function wait(instId, name, startTime, next) { - // 1 'wait': no distraction. - // >1 'wait': distraction, pass in the N. - var distraction; - if (process.stderr.isTTY && opts.wait.length > 1) { - distraction = distractions.createDistraction(opts.wait.length); - } - var cloudapi = cli.tritonapi.cloudapi; var waiter = cloudapi.waitForSnapshotStates.bind(cloudapi); @@ -52,12 +44,10 @@ function do_delete(subcmd, opts, args, cb) { name: name, states: ['deleted'] }, function (err, snap) { - if (distraction) { - distraction.destroy(); - } if (err) { return next(err); } + if (snap.state === 'deleted') { var duration = Date.now() - startTime; var durStr = common.humanDurationFromMs(duration); @@ -145,9 +135,8 @@ do_delete.options = [ }, { names: ['wait', 'w'], - type: 'arrayOfBool', - help: 'Wait for the deletion to complete. Use multiple times for a ' + - 'spinner.' + type: 'bool', + help: 'Wait for the deletion to complete.' } ]; do_delete.help = [