joyent/node-triton#142 triton help create could give fuller help

Reviewed by: Julien Gilli <julien.gilli@joyent.com>
This commit is contained in:
Trent Mick 2017-02-21 11:29:50 -08:00
parent 46ded211f3
commit 2bad27fcbb
16 changed files with 98 additions and 42 deletions

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton create ...` bwcompat shortcut for `triton instance create ...`.
*/
@ -20,9 +20,10 @@ function do_create(subcmd, opts, args, callback) {
}, callback);
}
do_create.help = 'A shortcut for "triton instance create".';
do_create.help = 'A shortcut for "triton instance create".\n' + targ.help;
do_create.helpOpts = targ.helpOpts;
do_create.synopses = targ.synopses;
do_create.options = targ.options;
do_create.completionArgtypes = targ.completionArgtypes;
module.exports = do_create;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton delete ...` bwcompat shortcut for `triton instance delete ...`.
*/
@ -20,9 +20,11 @@ function do_delete(subcmd, opts, args, callback) {
}, callback);
}
do_delete.help = 'A shortcut for "triton instance delete".';
do_delete.aliases = ['rm'];
do_delete.help = 'A shortcut for "triton instance delete".\n' + targ.help;
do_delete.synopses = targ.synopses;
do_delete.options = targ.options;
do_delete.completionArgtypes = targ.completionArgtypes;
do_delete.aliases = ['rm'];
module.exports = do_delete;

View File

@ -5,9 +5,13 @@
*/
/*
* Copyright 2017 Joyent, Inc.
*
* `triton fwrules ...` shortcut for `triton fwrule list ...`.
*/
var targ = require('./do_fwrule/do_list');
function do_fwrules(subcmd, opts, args, callback) {
this.handlerFromSubcmd('fwrule').dispatch({
subcmd: 'list',
@ -16,8 +20,11 @@ function do_fwrules(subcmd, opts, args, callback) {
}, callback);
}
do_fwrules.help = 'A shortcut for "triton fwrule list".';
do_fwrules.help = 'A shortcut for "triton fwrule list".\n' + targ.help;
do_fwrules.synopses = targ.synopses;
do_fwrules.options = targ.options;
do_fwrules.completionArgtypes = targ.completionArgtypes;
do_fwrules.hidden = true;
do_fwrules.options = require('./do_fwrule/do_list').options;
module.exports = do_fwrules;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton images ...` bwcompat shortcut for `triton image list ...`.
*/
var targ = require('./do_image/do_list');
function do_images(subcmd, opts, args, callback) {
this.handlerFromSubcmd('image').dispatch({
subcmd: 'list',
@ -18,9 +20,12 @@ function do_images(subcmd, opts, args, callback) {
}, callback);
}
do_images.help = 'A shortcut for "triton image list".';
do_images.help = 'A shortcut for "triton image list".\n' + targ.help;
do_images.synopses = targ.synopses;
do_images.options = targ.options;
do_images.completionArgtypes = targ.completionArgtypes;
do_images.aliases = ['imgs'];
do_images.hidden = true;
do_images.options = require('./do_image/do_list').options;
module.exports = do_images;

View File

@ -5,12 +5,14 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton instance snapshots ...` shortcut for
* `triton instance snapshot list ...`.
*/
var targ = require('./do_snapshot/do_list');
function do_snapshots(subcmd, opts, args, callback) {
this.handlerFromSubcmd('snapshot').dispatch({
subcmd: 'list',
@ -19,8 +21,12 @@ function do_snapshots(subcmd, opts, args, callback) {
}, callback);
}
do_snapshots.help = 'A shortcut for "triton instance snapshot list".';
do_snapshots.options = require('./do_snapshot/do_list').options;
do_snapshots.help = 'A shortcut for "triton instance snapshot list".\n' +
targ.help;
do_snapshots.synopses = targ.synopses;
do_snapshots.options = targ.options;
do_snapshots.completionArgtypes = targ.completionArgtypes;
do_snapshots.hidden = true;
module.exports = do_snapshots;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton instance tags ...` shortcut for `triton instance tag list ...`.
*/
var targ = require('./do_tag/do_list');
function do_tags(subcmd, opts, args, callback) {
this.handlerFromSubcmd('tag').dispatch({
subcmd: 'list',
@ -18,8 +20,11 @@ function do_tags(subcmd, opts, args, callback) {
}, callback);
}
do_tags.help = 'A shortcut for "triton instance tag list".';
do_tags.options = require('./do_tag/do_list').options;
do_tags.help = 'A shortcut for "triton instance tag list".\n' + targ.help;
do_tags.synopses = targ.synopses;
do_tags.options = targ.options;
do_tags.completionArgtypes = targ.completionArgtypes;
do_tags.hidden = true;
module.exports = do_tags;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton instances ...` bwcompat shortcut for `triton instance list ...`.
*/
var targ = require('./do_instance/do_list');
function do_instances(subcmd, opts, args, callback) {
this.handlerFromSubcmd('instance').dispatch({
subcmd: 'list',
@ -18,8 +20,11 @@ function do_instances(subcmd, opts, args, callback) {
}, callback);
}
do_instances.help = 'A shortcut for "triton instance list".';
do_instances.help = 'A shortcut for "triton instance list".\n' + targ.help;
do_instances.synopses = targ.synopses;
do_instances.options = targ.options;
do_instances.completionArgtypes = targ.completionArgtypes;
do_instances.aliases = ['insts', 'ls'];
do_instances.options = require('./do_instance/do_list').options;
module.exports = do_instances;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton ip ...` shortcut for `triton instance ip ...`.
*/
@ -20,7 +20,8 @@ function do_ip(subcmd, opts, args, callback) {
}, callback);
}
do_ip.help = 'A shortcut for "triton instance ip".';
do_ip.help = 'A shortcut for "triton instance ip".\n' + targ.help;
do_ip.synopses = targ.synopses;
do_ip.options = targ.options;
do_ip.completionArgtypes = targ.completionArgtypes;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton keys ...` bwcompat shortcut for `triton key list ...`.
*/
var targ = require('./do_key/do_list');
function do_keys(subcmd, opts, args, callback) {
this.handlerFromSubcmd('key').dispatch({
subcmd: 'list',
@ -18,8 +20,11 @@ function do_keys(subcmd, opts, args, callback) {
}, callback);
}
do_keys.help = 'A shortcut for "triton key list".';
do_keys.help = 'A shortcut for "triton key list".\n' + targ.help;
do_keys.synopses = targ.synopses;
do_keys.options = targ.options;
do_keys.completionArgtypes = targ.completionArgtypes;
do_keys.hidden = true;
do_keys.options = require('./do_key/do_list').options;
module.exports = do_keys;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton networks ...` bwcompat shortcut for `triton network list ...`.
*/
var targ = require('./do_network/do_list');
function do_networks(subcmd, opts, args, callback) {
this.handlerFromSubcmd('network').dispatch({
subcmd: 'list',
@ -18,8 +20,11 @@ function do_networks(subcmd, opts, args, callback) {
}, callback);
}
do_networks.help = 'A shortcut for "triton network list".';
do_networks.help = 'A shortcut for "triton network list".\n' + targ.help;
do_networks.synopses = targ.synopses;
do_networks.options = targ.options;
do_networks.completionArgtypes = targ.completionArgtypes;
do_networks.hidden = true;
do_networks.options = require('./do_network/do_list').options;
module.exports = do_networks;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton packages ...` bwcompat shortcut for `triton package list ...`.
*/
var targ = require('./do_package/do_list');
function do_packages(subcmd, opts, args, callback) {
this.handlerFromSubcmd('package').dispatch({
subcmd: 'list',
@ -18,9 +20,12 @@ function do_packages(subcmd, opts, args, callback) {
}, callback);
}
do_packages.help = 'A shortcut for "triton package list".';
do_packages.help = 'A shortcut for "triton package list".\n' + targ.help;
do_packages.synopses = targ.synopses;
do_packages.options = targ.options;
do_packages.completionArgtypes = targ.completionArgtypes;
do_packages.aliases = ['pkgs'];
do_packages.hidden = true;
do_packages.options = require('./do_package/do_list').options;
module.exports = do_packages;

View File

@ -5,11 +5,13 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton profiles ...` bwcompat shortcut for `triton profile list ...`.
*/
var targ = require('./do_profile/do_list');
function do_profiles(subcmd, opts, args, callback) {
this.handlerFromSubcmd('profile').dispatch({
subcmd: 'list',
@ -18,8 +20,11 @@ function do_profiles(subcmd, opts, args, callback) {
}, callback);
}
do_profiles.help = 'A shortcut for "triton profile list".';
do_profiles.options = require('./do_profile/do_list').options;
do_profiles.help = 'A shortcut for "triton profile list".\n' + targ.help;
do_profiles.synopses = targ.synopses;
do_profiles.options = targ.options;
do_profiles.completionArgtypes = targ.completionArgtypes;
do_profiles.hidden = true;
module.exports = do_profiles;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton reboot ...` bwcompat shortcut for `triton instance reboot ...`.
*/
@ -20,7 +20,8 @@ function do_reboot(subcmd, opts, args, callback) {
}, callback);
}
do_reboot.help = 'A shortcut for "triton instance reboot".';
do_reboot.help = 'A shortcut for "triton instance reboot".\n' + targ.help;
do_reboot.synopses = targ.synopses;
do_reboot.options = targ.options;
do_reboot.completionArgtypes = targ.completionArgtypes;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton ssh ...` bwcompat shortcut for `triton instance ssh ...`.
*/
@ -20,7 +20,8 @@ function do_ssh(subcmd, opts, args, callback) {
}, callback);
}
do_ssh.help = 'A shortcut for "triton instance ssh".';
do_ssh.help = 'A shortcut for "triton instance ssh".\n' + targ.help;
do_ssh.synopses = targ.synopses;
do_ssh.interspersedOptions = targ.interspersedOptions;
do_ssh.options = targ.options;
do_ssh.completionArgtypes = targ.completionArgtypes;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton start ...` bwcompat shortcut for `triton instance start ...`.
*/
@ -20,7 +20,8 @@ function do_start(subcmd, opts, args, callback) {
}, callback);
}
do_start.help = 'A shortcut for "triton instance start".';
do_start.help = 'A shortcut for "triton instance start".\n' + targ.help;
do_start.synopses = targ.synopses;
do_start.options = targ.options;
do_start.completionArgtypes = targ.completionArgtypes;

View File

@ -5,7 +5,7 @@
*/
/*
* Copyright 2016 Joyent, Inc.
* Copyright 2017 Joyent, Inc.
*
* `triton stop ...` bwcompat shortcut for `triton instance stop ...`.
*/
@ -20,7 +20,8 @@ function do_stop(subcmd, opts, args, callback) {
}, callback);
}
do_stop.help = 'A shortcut for "triton instance stop".';
do_stop.help = 'A shortcut for "triton instance stop".\n' + targ.help;
do_stop.synopses = targ.synopses;
do_stop.options = targ.options;
do_stop.completionArgtypes = targ.completionArgtypes;