From 24b802d11db67543e7ea8de1af81857db2a989e8 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Sun, 18 Nov 2012 22:39:40 -0700 Subject: [PATCH] Add overstate runner, ready for initial testing --- salt/runners/state.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 salt/runners/state.py diff --git a/salt/runners/state.py b/salt/runners/state.py new file mode 100644 index 0000000000..f1a13b6505 --- /dev/null +++ b/salt/runners/state.py @@ -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