Merge pull request #31800 from rallytime/merge-2015.8

[2015.8] Merge forward from 2015.5 to 2015.8
This commit is contained in:
Nicole Thomas 2016-03-10 13:49:53 -07:00
commit 7fb2331ebc
3 changed files with 9 additions and 3 deletions

View file

@ -6,7 +6,7 @@ CloudStack Cloud Module
The CloudStack cloud module is used to control access to a CloudStack based
Public Cloud.
:depends: libcloud
:depends: libcloud >= 0.15
Use of this module requires the ``apikey``, ``secretkey``, ``host`` and
``path`` parameters.
@ -216,7 +216,12 @@ def get_project(conn, vm_):
'''
Return the project to use.
'''
projects = conn.ex_list_projects()
try:
projects = conn.ex_list_projects()
except AttributeError:
# with versions <0.15 of libcloud this is causing an AttributeError.
log.warning('Cannot get projects, you may need to update libcloud to 0.15 or later')
return False
projid = config.get_cloud_config_value('projectid', vm_, __opts__)
if not projid:

View file

@ -808,6 +808,7 @@ DEFAULT_MINION_OPTS = {
'autoload_dynamic_modules': True,
'environment': None,
'pillarenv': None,
'pillar_opts': False,
# `pillar_cache` and `pillar_ttl`
# are not used on the minion but are unavoidably in the code path
'pillar_cache': False,

View file

@ -790,7 +790,7 @@ class Pillar(object):
matches = self.top_matches(top)
pillar, errors = self.render_pillar(matches)
errors.extend(top_errors)
if self.opts.get('pillar_opts', True):
if self.opts.get('pillar_opts', False):
mopts = dict(self.opts)
if 'grains' in mopts:
mopts.pop('grains')