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

Method key_str

salt/key.py:679–695  ·  view source on GitHub ↗

Return the specified public key or keys based on a glob

(self, match)

Source from the content-addressed store, hash-verified

677 return {}
678
679 def key_str(self, match):
680 """
681 Return the specified public key or keys based on a glob
682 """
683 ret = {}
684 for status, keys in self.glob_match(match).items():
685 ret[status] = {}
686 for key in salt.utils.data.sorted_ignorecase(keys):
687 if status == self.DEN:
688 denied = self.cache.fetch("denied_keys", key)
689 if len(denied) == 1:
690 ret[status][key] = denied[0]
691 else:
692 ret[status][key] = denied
693 else:
694 ret[status][key] = self.cache.fetch("keys", key).get("pub")
695 return ret
696
697 def key_str_all(self):
698 """

Callers 2

key_str_allMethod · 0.95
key_strFunction · 0.80

Calls 4

glob_matchMethod · 0.95
itemsMethod · 0.45
fetchMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected