Merge branch 'develop' into unit-test-sdb

This commit is contained in:
garethgreenaway 2017-10-05 10:30:37 -07:00 committed by GitHub
commit 9a0773542d
3 changed files with 5 additions and 4 deletions

View file

@ -401,8 +401,9 @@ def list_nodes(conn=None, call=None): # pylint: disable=unused-argument
pass
for node in nodes:
if not nodes[node]['resource_group'] == active_resource_group:
continue
if active_resource_group is not None:
if nodes[node]['resource_group'] != active_resource_group:
continue
ret[node] = {'name': node}
for prop in ('id', 'image', 'size', 'state', 'private_ips', 'public_ips'):
ret[node][prop] = nodes[node].get(prop)

View file

@ -1988,7 +1988,7 @@ def request_instance(vm_=None, call=None):
params[termination_key] = str(set_del_root_vol_on_destroy).lower()
# Use default volume type if not specified
if ex_blockdevicemappings and 'Ebs.VolumeType' not in ex_blockdevicemappings[dev_index]:
if ex_blockdevicemappings and dev_index < len(ex_blockdevicemappings) and 'Ebs.VolumeType' not in ex_blockdevicemappings[dev_index]:
type_key = '{0}BlockDeviceMapping.{1}.Ebs.VolumeType'.format(spot_prefix, dev_index)
params[type_key] = rd_type

View file

@ -4358,7 +4358,7 @@ def check_perms(name, ret, user, group, mode, attrs=None, follow_symlinks=False)
is_dir = os.path.isdir(name)
if not salt.utils.platform.is_windows() and not is_dir and lsattr_cmd:
# List attributes on file
perms['lattrs'] = ''.join(lsattr(name)[name])
perms['lattrs'] = ''.join(lsattr(name).get('name', ''))
# Remove attributes on file so changes can be enforced.
if perms['lattrs']:
chattr(name, operator='remove', attributes=perms['lattrs'])