Merge pull request #30634 from MorphBonehunter/develop

Renaming salt-ssh option and documentation fix
This commit is contained in:
Colton Myers 2016-01-27 16:50:11 -07:00
commit 9b28b09fde
4 changed files with 16 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,14 @@ class Single(object):
if kwargs.get('wipe'):
self.wipe = 'False'
else:
self.wipe = 'True' if self.opts.get('wipe_ssh') else 'False'
if self.opts.get('wipe_ssh'):
salt.utils.warn_until(
'Nitrogen',
'Support for \'wipe_ssh\' has been deprecated in Saltfile and will be removed '
'in Salt Nitrogen. Please use \'ssh_wipe\' instead.'
)
self.wipe = 'True'
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(