diff --git a/salt/state.py b/salt/state.py index 625df33381..5f82b59703 100644 --- a/salt/state.py +++ b/salt/state.py @@ -1324,6 +1324,15 @@ class BaseHighState(object): ext[name]['__sls__'] = sls if '__env__' not in ext[name]: ext[name]['__env__'] = env + for key in ext[name]: + if key.startswith('_'): + continue + if not isinstance(ext[name][key], list): + continue + if '.' in key: + comps = key.split('.') + ext[name][comps[0]] = ext[name].pop(key) + ext[name][comps[0]].append(comps[1]) if '__extend__' not in state: state['__extend__'] = [ext] else: @@ -1331,27 +1340,7 @@ class BaseHighState(object): for name in state: if not isinstance(state[name], dict): if name == '__extend__': - for name_ in state[name]: - if isinstance(state[name][name_], basestring): - # Is this is a short state, it needs to be - # padded - if '.' in state[name][name_]: - comps = state[name][name_].split('.') - state[name][name_] = {comps[0]: [comps[1]]} - continue - errors.append(('Name {0} in sls {1} is not a dictionary' - .format(name_, sls))) - - # TODO add extend support for new dotted standrd decs - for key in state[name][name_]: - if key.startswith('_'): - continue - if not isinstance(state[name][name_][key], list): - continue - if '.' in key: - comps = key.split('.') - state[name][name_][comps[0]] = state[name].pop(key) - state[name][name_][comps[0]].append(comps[1]) + continue if isinstance(state[name], basestring): # Is this is a short state, it needs to be padded