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

Method envs

salt/utils/gitfs.py:3905–3919  ·  view source on GitHub ↗

Return a list of refs that can be used as environments

(self, ignore_cache=False)

Source from the content-addressed store, hash-verified

3903 return self._file_lists(load, "dirs")
3904
3905 def envs(self, ignore_cache=False):
3906 """
3907 Return a list of refs that can be used as environments
3908 """
3909 if not ignore_cache:
3910 cache_match = salt.fileserver.check_env_cache(self.opts, self.env_cache)
3911 if cache_match is not None:
3912 return cache_match
3913 ret = set()
3914 for repo in self.remotes:
3915 repo_envs = repo.envs()
3916 for env_list in repo.saltenv_revmap.values():
3917 repo_envs.update(env_list)
3918 ret.update([x for x in repo_envs if repo.env_is_exposed(x)])
3919 return sorted(ret)
3920
3921 def find_file(self, path, tgt_env="base", **kwargs): # pylint: disable=W0613
3922 """

Callers 8

find_fileMethod · 0.95
_file_listsMethod · 0.95
symlink_listMethod · 0.95
_get_envsMethod · 0.45
envsFunction · 0.45
envsFunction · 0.45
updateMethod · 0.45
highstateFunction · 0.45

Calls 4

env_is_exposedMethod · 0.80
setFunction · 0.50
valuesMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected