Return an iterable object containing all entries stored in the specified bank.
(bank)
| 314 | |
| 315 | |
| 316 | def 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 | |
| 331 | def contains(bank, key): |