'triton image NAME', 'triton package NAME'

This commit is contained in:
Trent Mick 2015-08-25 21:06:27 -07:00
parent 2c4b41d91b
commit 3bd22281e1
2 changed files with 17 additions and 18 deletions

View File

@ -18,10 +18,7 @@ function do_image(subcmd, opts, args, callback) {
'incorrect number of args (%d): %s', args.length, args.join(' '))));
}
var getOpts = {
id: args[0]
};
this.triton.cloudapi.getImage(getOpts, function onRes(err, img) {
this.triton.getImage(args[0], function onRes(err, img) {
if (err) {
return callback(err);
}
@ -51,13 +48,16 @@ do_image.help = (
/* BEGIN JSSTYLED */
'Get an image.\n' +
'\n' +
'Note: Currently this dumps prettified JSON by default. That might change\n' +
'in the future. Use "-j" to explicitly get JSON output.\n' +
'\n' +
'Usage:\n' +
' {{name}} image [<options>] ID\n' +
' {{name}} image [<options>] ID|NAME\n' +
'\n' +
'{{options}}'
'{{options}}' +
'\n' +
'If there are more than one image with the given "NAME", the latest\n' +
'image (by "published_at") is returned.\n' +
'\n' +
'Note: Currently this dumps prettified JSON by default. That might change\n' +
'in the future. Use "-j" to explicitly get JSON output.\n'
/* END JSSTYLED */
);

View File

@ -18,10 +18,7 @@ function do_package(subcmd, opts, args, callback) {
'incorrect number of args (%d): %s', args.length, args.join(' '))));
}
var getOpts = {
id: args[0]
};
this.triton.cloudapi.getPackage(getOpts, function onRes(err, pkg) {
this.triton.getPackage(args[0], function onRes(err, pkg) {
if (err) {
return callback(err);
}
@ -51,13 +48,15 @@ do_package.help = (
/* BEGIN JSSTYLED */
'Get a package.\n' +
'\n' +
'Note: Currently this dumps prettified JSON by default. That might change\n' +
'in the future. Use "-j" to explicitly get JSON output.\n' +
'\n' +
'Usage:\n' +
' {{name}} package [<options>] ID\n' +
' {{name}} package [<options>] ID|NAME\n' +
'\n' +
'{{options}}'
'{{options}}' +
'\n' +
'The given "NAME" must be a unique match.\n' +
'\n' +
'Note: Currently this dumps prettified JSON by default. That might change\n' +
'in the future. Use "-j" to explicitly get JSON output.\n'
/* END JSSTYLED */
);