Fix loader call in pyobjects

This commit is contained in:
Mike Place 2015-06-17 10:17:47 -06:00 committed by rallytime
parent 39f088a74c
commit 6c804f0789
2 changed files with 4 additions and 11 deletions

View file

@ -290,17 +290,11 @@ def load_states():
'''
states = {}
# the loader expects to find pillar & grian data
__opts__['grains'] = __grains__
# the loader expects to find pillar & grain data
__opts__['grains'] = salt.loader.grains(__opts__)
__opts__['pillar'] = __pillar__
lazy_states = salt.loader.LazyLoader(
salt.loader._module_dirs(__opts__, 'states', 'states'),
__opts__,
tag='states',
pack={'__salt__': __salt__},
virtual_enable=True,
)
lazy_funcs = salt.loader.minion_mods(__opts__)
lazy_states = salt.loader.states(__opts__, lazy_funcs)
# TODO: some way to lazily do this? This requires loading *all* state modules
for key, func in lazy_states.iteritems():

View file

@ -18,7 +18,6 @@ from salt.template import compile_template
from salt.utils.odict import OrderedDict
from salt.utils.pyobjects import (StateFactory, State, Registry,
SaltObject, InvalidFunction, DuplicateState)
File = StateFactory('file')
Service = StateFactory('service')