tweak 'triton create -h' output to help clarify/group related create options

This commit is contained in:
Trent Mick 2016-04-12 10:30:35 -07:00
parent 0c605c95c5
commit de391bf013

View File

@ -400,6 +400,45 @@ do_create.options = [
type: 'string',
help: 'Instance name. If not given, one will be generated server-side.'
},
{
names: ['tag', 't'],
type: 'arrayOfString',
helpArg: 'TAG',
help: 'Add a tag when creating the instance. Tags are ' +
'key/value pairs available on the instance API object as the ' +
'"tags" field. TAG is one of: a "key=value" string (bool and ' +
'numeric "value" are converted to that type), a JSON object ' +
'(if first char is "{"), or a "@FILE" to have tags be ' +
'loaded from FILE. This option can be used multiple times.'
},
{
names: ['affinity', 'a'],
type: 'arrayOfString',
helpArg: 'RULE',
help: 'Affinity rules for selecting a server for this instance. ' +
'Rules have one of the following forms: `instance==INST` (the ' +
'new instance must be on the same server as INST), ' +
'`instance!=INST` (new inst must *not* be on the same server as ' +
'INST), `instance==~INST` (*attempt* to place on the same server ' +
'as INST), or `instance!=~INST` (*attempt* to place on a server ' +
'other than INST\'s). `INST` is an existing instance name or ' +
'id. There are two shortcuts: `inst` may be used instead of ' +
'`instance` and `instance==INST` can be shortened to just ' +
'`INST`. Use this option more than once for multiple rules.',
completionType: 'tritonaffinityrule'
},
{
group: ''
},
{
names: ['network', 'N'],
type: 'arrayOfCommaSepString',
helpArg: 'NETWORK',
help: 'One or more comma-separated networks (ID, name or short id). ' +
'This option can be used multiple times.',
completionType: 'tritonnetwork'
},
{
// TODO: add boolNegationPrefix:'no-' when that cmdln pull is in
names: ['firewall'],
@ -407,6 +446,10 @@ do_create.options = [
help: 'Enable Cloud Firewall on this instance. See ' +
'<https://docs.joyent.com/public-cloud/network/firewall>'
},
{
group: ''
},
{
names: ['metadata', 'm'],
type: 'arrayOfString',
@ -433,42 +476,6 @@ do_create.options = [
'Joyent-provided images, the user-script is run at every boot ' +
'of the instance. This is a shortcut for `-M user-script=FILE`.'
},
{
names: ['tag', 't'],
type: 'arrayOfString',
helpArg: 'TAG',
help: 'Add a tag when creating the instance. Tags are ' +
'key/value pairs available on the instance API object as the ' +
'"tags" field. TAG is one of: a "key=value" string (bool and ' +
'numeric "value" are converted to that type), a JSON object ' +
'(if first char is "{"), or a "@FILE" to have tags be ' +
'loaded from FILE. This option can be used multiple times.'
},
{
names: ['network', 'N'],
type: 'arrayOfCommaSepString',
helpArg: 'NETWORK',
help: 'One or more comma-separated networks (ID, name or short id). ' +
'This option can be used multiple times.',
completionType: 'tritonnetwork'
},
{
names: ['affinity', 'a'],
type: 'arrayOfString',
helpArg: 'RULE',
help: 'Affinity rules for selecting a server for this instance. ' +
'Rules have one of the following forms: `instance==INST` (the ' +
'new instance must be on the same server as INST), ' +
'`instance!=INST` (new inst must *not* be on the same server as ' +
'INST), `instance==~INST` (*attempt* to place on the same server ' +
'as INST), or `instance!=~INST` (*attempt* to place on a server ' +
'other than INST\'s). `INST` is an existing instance name or ' +
'id. There are two shortcuts: `inst` may be used instead of ' +
'`instance` and `instance==INST` can be shortened to just ' +
'`INST`. Use this option more than once for multiple rules.',
completionType: 'tritonaffinityrule'
},
{
group: 'Other options'