mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Allow for the state object to inject new objects into the loader
This commit is contained in:
parent
226ef73863
commit
3e77b20b80
@ -607,6 +607,7 @@ class State(object):
|
|||||||
self.__run_num = 0
|
self.__run_num = 0
|
||||||
self.jid = jid
|
self.jid = jid
|
||||||
self.instance_id = str(id(self))
|
self.instance_id = str(id(self))
|
||||||
|
self.inject_globals = {}
|
||||||
|
|
||||||
def _gather_pillar(self):
|
def _gather_pillar(self):
|
||||||
'''
|
'''
|
||||||
@ -1551,6 +1552,9 @@ class State(object):
|
|||||||
'__lowstate__': immutabletypes.freeze(chunks) if chunks else {}
|
'__lowstate__': immutabletypes.freeze(chunks) if chunks else {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.inject_globals:
|
||||||
|
inject_globals.update(self.inject_globals)
|
||||||
|
|
||||||
if low.get('__prereq__'):
|
if low.get('__prereq__'):
|
||||||
test = sys.modules[self.states[cdata['full']].__module__].__opts__['test']
|
test = sys.modules[self.states[cdata['full']].__module__].__opts__['test']
|
||||||
sys.modules[self.states[cdata['full']].__module__].__opts__['test'] = True
|
sys.modules[self.states[cdata['full']].__module__].__opts__['test'] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user