Skip to content

Commit

Permalink
Merge pull request #29850 from basepi/merge-forward-2015.8
Browse files Browse the repository at this point in the history
[2015.8] Merge forward from 2015.5 to 2015.8
  • Loading branch information
basepi committed Dec 18, 2015
2 parents 05d2aaa + 7402599 commit 50f48c4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 6 additions & 0 deletions salt/cloud/clouds/vmware.py
Expand Up @@ -2985,6 +2985,9 @@ def create_snapshot(name, kwargs=None, call=None):
'-a or --action.'
)

if kwargs is None:
kwargs = {}

snapshot_name = kwargs.get('snapshot_name') if kwargs and 'snapshot_name' in kwargs else None

if not snapshot_name:
Expand Down Expand Up @@ -3055,6 +3058,9 @@ def revert_to_snapshot(name, kwargs=None, call=None):
'-a or --action.'
)

if kwargs is None:
kwargs = {}

suppress_power_on = _str_to_bool(kwargs.get('power_off', False))

vm_ref = salt.utils.vmware.get_mor_by_property(_get_si(), vim.VirtualMachine, name)
Expand Down
4 changes: 2 additions & 2 deletions salt/modules/dockerio.py
Expand Up @@ -29,12 +29,12 @@
path that is running salt. Its version should support `Docker Remote API
v1.12 <http://docs.docker.io/en/latest/reference/api/docker_remote_api_v1.12>`_.
Currently, ``docker-py 0.5.0`` is known to support `Docker Remote API v1.12
Currently, ``docker-py 0.6.0`` is known to support `Docker Remote API v1.12
<http://docs.docker.io/en/latest/reference/api/docker_remote_api_v1.12>`_
.. code-block:: bash
pip install docker-py==0.5.0
pip install docker-py==0.6.0
Prerequisite Pillar Configuration for Authentication
----------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion salt/output/nested.py
Expand Up @@ -90,17 +90,20 @@ def display(self, ret, indent, prefix, out):
)
)
elif isinstance(ret, string_types):
first_line = True
for line in ret.splitlines():
if self.strip_colors:
line = salt.output.strip_esc_sequence(line)
line_prefix = ' ' * len(prefix) if not first_line else prefix
out.append(
self.ustring(
indent,
self.GREEN,
line,
prefix=prefix
prefix=line_prefix
)
)
first_line = False
elif isinstance(ret, (list, tuple)):
for ind in ret:
if isinstance(ind, (list, tuple, dict)):
Expand Down
4 changes: 2 additions & 2 deletions salt/states/dockerio.py
Expand Up @@ -18,8 +18,8 @@
.. note::
This state module requires
`docker-py <https://github.com/dotcloud/docker-py>`_
which supports `Docker Remote API version 1.6
`docker-py <https://github.com/dotcloud/docker-py>`_ version >= 0.6.0
which supports `Docker Remote API version 1.12
<http://docs.docker.io/en/latest/reference/api/docker_remote_api_v1.6>`_.
Available Functions
Expand Down
6 changes: 1 addition & 5 deletions salt/states/npm.py
Expand Up @@ -192,13 +192,9 @@ def _pkg_is_installed(pkg, installed_pkgs):
'runas': user,
'registry': registry,
'env': env,
'pkgs': pkg_list,
}

if pkgs is not None:
cmd_args['pkgs'] = pkgs
else:
cmd_args['pkg'] = pkg_name

call = __salt__['npm.install'](**cmd_args)
except (CommandNotFoundError, CommandExecutionError) as err:
ret['result'] = False
Expand Down

0 comments on commit 50f48c4

Please sign in to comment.