MCPcopy
hub / github.com/saltstack/salt / _pillar

Method _pillar

salt/master.py:2652–2688  ·  view source on GitHub ↗

Return the pillar data for the minion :param dict load: Minion payload :rtype: dict :return: The pillar data for the minion

(self, load)

Source from the content-addressed store, hash-verified

2650 return True
2651
2652 def _pillar(self, load):
2653 """
2654 Return the pillar data for the minion
2655
2656 :param dict load: Minion payload
2657
2658 :rtype: dict
2659 :return: The pillar data for the minion
2660 """
2661 if any(key not in load for key in ("id", "grains")):
2662 return False
2663 if not salt.utils.verify.valid_id(self.opts, load["id"]):
2664 return False
2665 load["grains"]["id"] = load["id"]
2666
2667 pillar = salt.pillar.get_pillar(
2668 self.opts,
2669 load["grains"],
2670 load["id"],
2671 load.get("saltenv", load.get("env")),
2672 ext=load.get("ext"),
2673 pillar_override=load.get("pillar_override", {}),
2674 pillarenv=load.get("pillarenv"),
2675 extra_minion_data=load.get("extra_minion_data"),
2676 clean_cache=load.get("clean_cache"),
2677 )
2678 data = pillar.compile_pillar()
2679 self.fs_.update_opts()
2680 if self.opts.get("minion_data_cache", False):
2681 self.masterapi.cache.store("grains", load["id"], load["grains"])
2682
2683 if self.opts.get("minion_data_cache_events") is True:
2684 self.event.fire_event(
2685 {"Minion data cache refresh": load["id"]},
2686 tagify(load["id"], "refresh", "minion"),
2687 )
2688 return data
2689
2690 def _minion_event(self, load):
2691 """

Calls 7

tagifyFunction · 0.90
update_optsMethod · 0.80
get_pillarMethod · 0.45
getMethod · 0.45
compile_pillarMethod · 0.45
storeMethod · 0.45
fire_eventMethod · 0.45