mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Change function names to not be so redundant
Now that the name of the util file is state.py, the function names can be shortened: - check_state_result --> check_result - gen_state_tag --> gen_tag
This commit is contained in:
parent
4a86f23bf1
commit
0b35a70be2
@ -3269,10 +3269,10 @@ def gen_state_tag(low):
|
||||
salt.utils.versions.warn_until(
|
||||
'Neon',
|
||||
'Use of \'salt.utils.gen_state_tag\' detected. This function has been '
|
||||
'moved to \'salt.utils.state.gen_state_tag\' as of Salt Oxygen. This '
|
||||
'warning will be removed in Salt Neon.'
|
||||
'moved to \'salt.utils.state.gen_tag\' as of Salt Oxygen. This warning '
|
||||
'will be removed in Salt Neon.'
|
||||
)
|
||||
return salt.utils.state.gen_state_tag(low)
|
||||
return salt.utils.state.gen_tag(low)
|
||||
|
||||
|
||||
def search_onfail_requisites(sid, highstate):
|
||||
@ -3335,9 +3335,9 @@ def check_state_result(running, recurse=False, highstate=None):
|
||||
salt.utils.versions.warn_until(
|
||||
'Neon',
|
||||
'Use of \'salt.utils.check_state_result\' detected. This function'
|
||||
'has been moved to \'salt.utils.state.check_state_result\' as of '
|
||||
'has been moved to \'salt.utils.state.check_result\' as of '
|
||||
'Salt Oxygen. This warning will be removed in Salt Neon.'
|
||||
)
|
||||
return salt.utils.state.check_state_result(
|
||||
return salt.utils.state.check_result(
|
||||
running, recurse=recurse, highstate=highstate
|
||||
)
|
||||
|
@ -15,7 +15,7 @@ import salt.state
|
||||
_empty = object()
|
||||
|
||||
|
||||
def gen_state_tag(low):
|
||||
def gen_tag(low):
|
||||
'''
|
||||
Generate the running dict tag string from the low data structure
|
||||
'''
|
||||
@ -121,7 +121,7 @@ def check_onfail_requisites(state_id, state_result, running, highstate):
|
||||
return nret
|
||||
|
||||
|
||||
def check_state_result(running, recurse=False, highstate=None):
|
||||
def check_result(running, recurse=False, highstate=None):
|
||||
'''
|
||||
Check the total return value of the run and determine if the running
|
||||
dict has any issues
|
||||
@ -142,7 +142,7 @@ def check_state_result(running, recurse=False, highstate=None):
|
||||
ret = False
|
||||
# only override return value if we are not already failed
|
||||
elif result is _empty and isinstance(state_result, dict) and ret:
|
||||
ret = check_state_result(
|
||||
ret = check_result(
|
||||
state_result, recurse=True, highstate=highstate)
|
||||
# if we detect a fail, check for onfail requisites
|
||||
if not ret:
|
||||
|
Loading…
Reference in New Issue
Block a user