Add overstate runner, ready for initial testing

This commit is contained in:
Thomas S Hatch 2012-11-18 22:39:40 -07:00
parent 1f4c168733
commit 24b802d11d

25
salt/runners/state.py Normal file
View File

@ -0,0 +1,25 @@
'''
Execute overstate functions
'''
# Import Salt libs
import salt.overstate
import salt.output
def over(env='base', os_fn=None):
'''
Execute an overstate sequence to orchestrate the executing of states
over a group of systems
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
over_run = overstate.stages()
salt.output.display_output(over_run, 'pprint', opts=__opts__)
return over_run
def show_stages(env='base', os_fn=None):
'''
Display the stage data to be executed
'''
overstate = salt.overstate.OverState(__opts__, env, os_fn)
salt.output.display_output(overstate.over, 'pprint', opts=__opts__)
return overstate.over