Renaming salt-ssh option and documentation fix

For consistency the wipe_ssh option is renamed in ssh_wipe as all other
options in the salt-ssh command are in this style.
The documentation was also adjusted to reflect the renaming.
There were also an wrong salt-ssh example in the documentation.
This commit is contained in:
Daniel Wendler 2016-01-26 08:36:13 +01:00
parent 621d8785de
commit e38f1fba3f
4 changed files with 9 additions and 9 deletions

View file

@ -32582,8 +32582,8 @@ YAML contents:
.ft C
salt\-ssh:
config_dir: path/to/config/dir
max_procs: 30
wipe_ssh: True
ssh_max_procs: 30
ssh_wipe: True
.ft P
.fi
.UNINDENT
@ -32602,7 +32602,7 @@ The option keys specified must match the destination attributes for the
options specified in the parser
\fBsalt.utils.parsers.SaltSSHOptionParser\fP\&. For example, in the
case of the \fB\-\-wipe\fP command line option, its \fBdest\fP is configured to
be \fBwipe_ssh\fP and thus this is what should be configured in the
be \fBssh_wipe\fP and thus this is what should be configured in the
\fBSaltfile\fP\&. Using the names of flags for this option, being \fBwipe:
True\fP or \fBw: True\fP, will not work.
.UNINDENT

View file

@ -189,8 +189,8 @@ YAML contents:
salt-ssh:
config_dir: path/to/config/dir
max_procs: 30
wipe_ssh: True
ssh_max_procs: 30
ssh_wipe: True
Instead of having to call
``salt-ssh --config-dir=path/to/config/dir --max-procs=30 --wipe \* test.ping`` you
@ -204,7 +204,7 @@ Boolean-style options should be specified in their YAML representation.
options specified in the parser
:py:class:`salt.utils.parsers.SaltSSHOptionParser`. For example, in the
case of the ``--wipe`` command line option, its ``dest`` is configured to
be ``wipe_ssh`` and thus this is what should be configured in the
be ``ssh_wipe`` and thus this is what should be configured in the
``Saltfile``. Using the names of flags for this option, being ``wipe:
True`` or ``w: True``, will not work.

View file

@ -277,7 +277,7 @@ class SSH(object):
self.defaults['thin_dir'] = os.path.join(
'/tmp',
'.{0}'.format(uuid.uuid4().hex[:6]))
self.opts['wipe_ssh'] = 'True'
self.opts['ssh_wipe'] = 'True'
self.serial = salt.payload.Serial(opts)
self.returners = salt.loader.returners(self.opts, {})
self.fsclient = salt.fileclient.FSClient(self.opts)
@ -664,7 +664,7 @@ class Single(object):
if kwargs.get('wipe'):
self.wipe = 'False'
else:
self.wipe = 'True' if self.opts.get('wipe_ssh') else 'False'
self.wipe = 'True' if self.opts.get('ssh_wipe') else 'False'
if kwargs.get('thin_dir'):
self.thin_dir = kwargs['thin_dir']
else:

View file

@ -2713,7 +2713,7 @@ class SaltSSHOptionParser(six.with_metaclass(OptionParserMeta,
'-w', '--wipe',
default=False,
action='store_true',
dest='wipe_ssh',
dest='ssh_wipe',
help='Remove the deployment of the salt files when done executing.',
)
self.add_option(