Merge branch 'nitrogen' into 'develop'

No conflicts.
This commit is contained in:
rallytime 2017-04-18 16:43:11 -06:00
commit 0616405104
5 changed files with 2702 additions and 17 deletions

File diff suppressed because it is too large Load Diff

View File

@ -411,17 +411,29 @@ def _refresh_buckets_cache_file(cache_file):
# helper s3 query function
def __get_s3_meta(bucket, key=key, keyid=keyid):
return __utils__['s3.query'](
key=key,
keyid=keyid,
kms_keyid=keyid,
bucket=bucket,
service_url=service_url,
verify_ssl=verify_ssl,
location=location,
return_bin=False,
path_style=path_style,
https_enable=https_enable)
ret, marker = [], ''
while True:
tmp = __utils__['s3.query'](key=key,
keyid=keyid,
kms_keyid=keyid,
bucket=bucket,
service_url=service_url,
verify_ssl=verify_ssl,
location=location,
return_bin=False,
path_style=path_style,
https_enable=https_enable,
params={'marker': marker})
headers = []
for header in tmp:
if 'Key' in header:
break
headers.append(header)
ret.extend(tmp)
if all([header.get('IsTruncated', 'false') == 'false' for header in headers]):
break
marker = tmp[-1]['Key']
return ret
if _is_env_per_bucket():
# Single environment per bucket

View File

@ -5,11 +5,15 @@ This module allows SPM to use the local filesystem to install files for SPM.
.. versionadded:: 2015.8.0
'''
# Import Python libs
from __future__ import absolute_import
import os
import os.path
import logging
# Import Salt libs
import salt.syspaths
import salt.utils
# Get logging started
log = logging.getLogger(__name__)
@ -180,7 +184,7 @@ def hash_file(path, hashobj, conn=None):
return ''
with salt.utils.fopen(path, 'r') as f:
hashobj.update(f.read())
hashobj.update(salt.utils.to_bytes(f.read()))
return hashobj.hexdigest()

View File

@ -45,7 +45,7 @@ class FileclientTestCase(TestCase):
If makedirs raises other than EEXIST errno, an exception should be raised.
'''
with patch('os.path.isfile', lambda prm: False):
with patch('os.makedirs', self._fake_makedir(num=errno.EREMOTEIO)):
with patch('os.makedirs', self._fake_makedir(num=errno.EROFS)):
with self.assertRaises(OSError):
with Client(self.opts)._cache_loc('testfile') as c_ref_itr:
assert c_ref_itr == '/__test__/files/base/testfile'

View File

@ -1,7 +1,5 @@
integration.client.test_runner
integration.client.test_standard
integration.fileserver.test_fileclient
integration.fileserver.test_roots
integration.loader.test_ext_grains
integration.loader.test_ext_modules
integration.modules.test_aliases
@ -23,11 +21,9 @@ integration.modules.test_test
integration.modules.test_useradd
integration.renderers.test_pydsl
integration.returners.test_librato_return
integration.returners.test_local_cache
integration.runners.test_fileserver
integration.runners.test_jobs
integration.runners.test_salt
integration.runners.test_winrepo
integration.sdb.test_env
integration.states.test_host
integration.states.test_renderers