PUBAPI-1268 - remove spinner (-ww) from snapshot create/delete.
This commit is contained in:
parent
ba16f0d9ef
commit
7d635fc81c
@ -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 = [
|
||||
|
@ -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 = [
|
||||
|
Reference in New Issue
Block a user