mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Merge pull request #7167 from hulu/trailing-whitespace-must-die
fix all pylint trailing-whitespace errors
This commit is contained in:
commit
ab0ad7a1fc
@ -1896,7 +1896,7 @@ class ClearFuncs(object):
|
||||
self.event.fire_event(data, tagify([jid, 'new'], 'wheel'))
|
||||
ret = self.wheel_.call_func(fun, **clear_load.get('kwarg', {}))
|
||||
data['ret'] = ret
|
||||
self.event.fire_event(data, tagify([jid, 'ret'], 'wheel'))
|
||||
self.event.fire_event(data, tagify([jid, 'ret'], 'wheel'))
|
||||
return data
|
||||
except Exception as exc:
|
||||
log.error(exc)
|
||||
@ -1915,7 +1915,7 @@ class ClearFuncs(object):
|
||||
'user {0}.').format(clear_load.get('username', 'UNKNOWN'))
|
||||
log.warning(msg)
|
||||
return ''
|
||||
|
||||
|
||||
try:
|
||||
name = self.loadauth.load_name(clear_load)
|
||||
if not ((name in self.opts['external_auth'][clear_load['eauth']]) | ('*' in self.opts['external_auth'][clear_load['eauth']])):
|
||||
|
@ -1,5 +1,5 @@
|
||||
'''
|
||||
Manage information about regular files, directories,
|
||||
Manage information about regular files, directories,
|
||||
and special files on the minion, set/read user,
|
||||
group, mode, and data
|
||||
'''
|
||||
|
@ -378,7 +378,7 @@ def list_queues_vhost(vhost, *kwargs):
|
||||
|
||||
def list_policies(runas=None):
|
||||
'''
|
||||
Return a dictionary of policies nested by vhost and name
|
||||
Return a dictionary of policies nested by vhost and name
|
||||
based on the data returned from rabbitmqctl list_policies.
|
||||
|
||||
Reference: http://www.rabbitmq.com/ha.html
|
||||
|
@ -166,7 +166,7 @@ def _wget(cmd, opts=None, url='http://localhost:8080/manager', timeout=180):
|
||||
ret['msg'] = urllib2.urlopen(url6, timeout=timeout).read().splitlines()
|
||||
except Exception:
|
||||
ret['msg'] = 'Failed to create HTTP request'
|
||||
|
||||
|
||||
if not ret['msg'][0].startswith('OK'):
|
||||
ret['res'] = False
|
||||
|
||||
|
@ -144,7 +144,7 @@ def auto(name):
|
||||
if line.endswith(' auto mode'):
|
||||
ret['comment'] = '{0} already in auto mode'.format(name)
|
||||
return ret
|
||||
|
||||
|
||||
ret['changes']['result'] = __salt__['alternatives.auto'](name)
|
||||
return ret
|
||||
|
||||
@ -172,14 +172,14 @@ def set(name, path):
|
||||
if current == path:
|
||||
ret['comment'] = 'Alternative for {0} already set to {1}'.format(name, path)
|
||||
return ret
|
||||
|
||||
|
||||
display = __salt__['alternatives.display'](name)
|
||||
isinstalled = False
|
||||
for line in display.splitlines():
|
||||
if line.startswith(path):
|
||||
isinstalled = True
|
||||
break
|
||||
|
||||
|
||||
if isinstalled:
|
||||
__salt__['alternatives.set'](name, path)
|
||||
current = __salt__['alternatives.show_current'](name)
|
||||
|
@ -64,13 +64,13 @@ In this example ``foo.conf`` in the ``dev`` environment will be used instead.
|
||||
|
||||
.. warning::
|
||||
|
||||
When using a mode that includes a leading zero you must wrap the
|
||||
When using a mode that includes a leading zero you must wrap the
|
||||
value in single quotes. If the value is not wrapped in quotes it
|
||||
will be read by YAML as an integer and evaluated as an octal.
|
||||
|
||||
Special files can be managed via the ``mknod`` function. This function will
|
||||
create and enforce the permissions on a special file. The function supports the
|
||||
creation of character devices, block devices, and fifo pipes. The function will
|
||||
creation of character devices, block devices, and fifo pipes. The function will
|
||||
create the directory structure up to the special file if it is needed on the
|
||||
minion. The function will not overwrite or operate on (change major/minor
|
||||
numbers) existing special files with the exception of user, group, and
|
||||
@ -2468,9 +2468,9 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'):
|
||||
Create a special file similar to the 'nix mknod command. The supported device types are
|
||||
p (fifo pipe), c (character device), and b (block device). Provide the major and minor
|
||||
numbers when specifying a character device or block device. A fifo pipe does not require
|
||||
this information. The command will create the necessary dirs if needed. If a file of the
|
||||
this information. The command will create the necessary dirs if needed. If a file of the
|
||||
same name not of the same type/major/minor exists, it will not be overwritten or unlinked
|
||||
(deleted). This is logically in place as a safety measure because you can really shoot
|
||||
(deleted). This is logically in place as a safety measure because you can really shoot
|
||||
yourself in the foot here and it is the behavior of 'nix mknod. It is also important to
|
||||
note that not just anyone can create special devices. Usually this is only done as root.
|
||||
If the state is executed as none other than root on a minion, you may recieve a permision
|
||||
@ -2509,7 +2509,7 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'):
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 660
|
||||
|
||||
|
||||
/dev/blk:
|
||||
file.mknod:
|
||||
- ntype: b
|
||||
@ -2518,7 +2518,7 @@ def mknod(name, ntype, major=0, minor=0, user=None, group=None, mode='0600'):
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 660
|
||||
|
||||
|
||||
/dev/fifo:
|
||||
file.mknod:
|
||||
- ntype: p
|
||||
|
@ -138,7 +138,7 @@ def tenant_present(name, description=None, enabled=True):
|
||||
|
||||
# Check if user is already present
|
||||
tenant = __salt__['keystone.tenant_get'](name=name)
|
||||
|
||||
|
||||
if 'Error' not in tenant:
|
||||
if tenant[name]['description'] != description:
|
||||
__salt__['keystone.tenant_update'](name, description, enabled)
|
||||
|
Loading…
Reference in New Issue
Block a user