Accept a glob which to match the of a key and return the key's location
(self, match)
| 534 | return ret |
| 535 | |
| 536 | def list_match(self, match): |
| 537 | """ |
| 538 | Accept a glob which to match the of a key and return the key's location |
| 539 | """ |
| 540 | ret = {} |
| 541 | if isinstance(match, str): |
| 542 | match = match.split(",") |
| 543 | |
| 544 | for name in match: |
| 545 | key = self.cache.fetch("keys", name) |
| 546 | if key: |
| 547 | try: |
| 548 | ret.setdefault(self.STATE_MAP[key["state"]], []) |
| 549 | ret[self.STATE_MAP[key["state"]]].append(name) |
| 550 | except KeyError: |
| 551 | log.error("unexpected key state returned for %s: %s", name, key) |
| 552 | |
| 553 | denied_keys = self.cache.fetch("denied_keys", name) |
| 554 | if denied_keys: |
| 555 | ret.setdefault(self.DEN, []) |
| 556 | ret[self.DEN].append(name) |
| 557 | return ret |
| 558 | |
| 559 | def dict_match(self, match_dict): |
| 560 | """ |
no test coverage detected