MCPcopy Index your code
hub / github.com/saltstack/salt / ls

Function ls

salt/cache/mysql_cache.py:316–328  ·  view source on GitHub ↗

Return an iterable object containing all entries stored in the specified bank.

(bank)

Source from the content-addressed store, hash-verified

314
315
316def ls(bank):
317 """
318 Return an iterable object containing all entries stored in the specified
319 bank.
320 """
321 _init_client()
322 query = "SELECT etcd_key FROM {} WHERE bank=%s".format(
323 __context__["mysql_table_name"]
324 )
325 cur, _ = run_query(__context__.get("mysql_client"), query, args=(bank,))
326 out = [row[0] for row in cur.fetchall()]
327 cur.close()
328 return out
329
330
331def contains(bank, key):

Callers

nothing calls this directly

Calls 6

formatMethod · 0.80
fetchallMethod · 0.80
_init_clientFunction · 0.70
run_queryFunction · 0.70
getMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected