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

Method get_pillar

tests/support/gitfs.py:346–365  ·  view source on GitHub ↗

Run git_pillar with the specified configuration

(self, ext_pillar_conf)

Source from the content-addressed store, hash-verified

344 return {git_pillar: {"__opts__": _OPTS.copy(), "__grains__": grains}}
345
346 def get_pillar(self, ext_pillar_conf):
347 """
348 Run git_pillar with the specified configuration
349 """
350 cachedir = tempfile.mkdtemp(dir=RUNTIME_VARS.TMP)
351 self.addCleanup(shutil.rmtree, cachedir, ignore_errors=True)
352 ext_pillar_opts = {"optimization_order": [0, 1, 2]}
353 ext_pillar_opts.update(
354 salt.utils.yaml.safe_load(
355 ext_pillar_conf.format(
356 cachedir=cachedir,
357 extmods=os.path.join(cachedir, "extmods"),
358 **self.ext_opts,
359 )
360 )
361 )
362 with patch.dict(git_pillar.__opts__, ext_pillar_opts):
363 return git_pillar.ext_pillar(
364 "minion", {}, *ext_pillar_opts["ext_pillar"][0]["git"]
365 )
366
367 def make_repo(self, root_dir, user=None):
368 log.info("Creating test Git repo....")

Callers 15

_gather_pillarMethod · 0.45
_pillarMethod · 0.45
gen_modulesMethod · 0.45
gen_modulesMethod · 0.45
_gather_pillarFunction · 0.45
_gather_pillarFunction · 0.45
_gather_pillarFunction · 0.45
itemsFunction · 0.45
extFunction · 0.45
_gather_pillarFunction · 0.45
cmdFunction · 0.45
_pillarMethod · 0.45

Calls 3

formatMethod · 0.80
ext_pillarMethod · 0.80
updateMethod · 0.45