"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/state.py" between
salt-3002.1.tar.gz and salt-3002.2.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

state.py  (salt-3002.1):state.py  (salt-3002.2)
skipping to change at line 3055 skipping to change at line 3055
self.__run_num += 1 self.__run_num += 1
else: else:
if low.get("__prereq__"): if low.get("__prereq__"):
self.pre[tag] = self.call(low, chunks, running) self.pre[tag] = self.call(low, chunks, running)
else: else:
running[tag] = self.call(low, chunks, running) running[tag] = self.call(low, chunks, running)
if tag in running: if tag in running:
self.event(running[tag], len(chunks), fire_event=low.get("fire_event ")) self.event(running[tag], len(chunks), fire_event=low.get("fire_event "))
for sub_state_data in running[tag].pop("sub_state_run", ()): for sub_state_data in running[tag].pop("sub_state_run", ()):
start_time, duration = _calculate_fake_duration()
self.__run_num += 1 self.__run_num += 1
sub_tag = _gen_tag(sub_state_data["low"]) sub_tag = _gen_tag(sub_state_data["low"])
running[sub_tag] = { running[sub_tag] = {
"name": sub_state_data["low"]["name"], "name": sub_state_data["low"]["name"],
"changes": sub_state_data["changes"], "changes": sub_state_data["changes"],
"result": sub_state_data["result"], "result": sub_state_data["result"],
"duration": sub_state_data.get("duration"), "duration": sub_state_data.get("duration", duration),
"start_time": sub_state_data.get("start_time"), "start_time": sub_state_data.get("start_time", start_time),
"comment": sub_state_data.get("comment"), "comment": sub_state_data.get("comment", ""),
"__state_ran__": True, "__state_ran__": True,
"__run_num__": self.__run_num, "__run_num__": self.__run_num,
"__sls__": low["__sls__"], "__sls__": low["__sls__"],
} }
return running return running
def call_listen(self, chunks, running): def call_listen(self, chunks, running):
""" """
Find all of the listen routines and call the associated mod_watch runs Find all of the listen routines and call the associated mod_watch runs
skipping to change at line 4012 skipping to change at line 4013
log.error(msg) log.error(msg)
errors.append(msg) errors.append(msg)
continue continue
if inc_sls.startswith("."): if inc_sls.startswith("."):
match = re.match(r"^(\.+)(.*)$", inc_sls) match = re.match(r"^(\.+)(.*)$", inc_sls)
if match: if match:
levels, include = match.groups() levels, include = match.groups()
else: else:
msg = ( msg = (
"Badly formatted include {0} found in include " "Badly formatted include {} found in include "
"in SLS '{2}:{3}'".format(inc_sls, saltenv, sls) "in SLS '{}:{}'".format(inc_sls, saltenv, sls)
) )
log.error(msg) log.error(msg)
errors.append(msg) errors.append(msg)
continue continue
level_count = len(levels) level_count = len(levels)
p_comps = sls.split(".") p_comps = sls.split(".")
if state_data.get("source", "").endswith("/init.sls"): if state_data.get("source", "").endswith("/init.sls"):
p_comps.append("init") p_comps.append("init")
if level_count > len(p_comps): if level_count > len(p_comps):
msg = ( msg = (
 End of changes. 3 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)