MCPcopy Create free account
hub / github.com/saltstack/salt / get_entry

Function get_entry

salt/utils/openstack/nova.py:202–208  ·  view source on GitHub ↗
(dict_, key, value, raise_error=True)

Source from the content-addressed store, hash-verified

200
201
202def get_entry(dict_, key, value, raise_error=True):
203 for entry in dict_:
204 if entry[key] == value:
205 return entry
206 if raise_error is True:
207 raise SaltCloudSystemExit(f"Unable to find {key} in {dict_}.")
208 return {}
209
210
211def get_entry_multi(dict_, pairs, raise_error=True):

Callers 2

_v3_setupMethod · 0.70
_v2_setupMethod · 0.70

Calls 1

SaltCloudSystemExitClass · 0.90

Tested by

no test coverage detected