Run git_pillar with the specified configuration
(self, ext_pillar_conf)
| 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....") |