()
| 867 | |
| 868 | |
| 869 | def get_rule_logs_for_vms(): |
| 870 | state = ['running'] |
| 871 | vms = virshlist(state) |
| 872 | |
| 873 | result = [] |
| 874 | try: |
| 875 | for name in vms: |
| 876 | name = name.rstrip() |
| 877 | if 1 not in [name.startswith(c) for c in ['r-', 's-', 'v-', 'i-'] ]: |
| 878 | continue |
| 879 | # Move actions on rebooted vm to java code |
| 880 | # network_rules_for_rebooted_vm(name) |
| 881 | if name.startswith('i-'): |
| 882 | log = get_rule_log_for_vm(name) |
| 883 | result.append(log) |
| 884 | except: |
| 885 | logging.exception("Failed to get rule logs, better luck next time!") |
| 886 | |
| 887 | print(";".join(result)) |
| 888 | |
| 889 | |
| 890 | def cleanup_rules_for_dead_vms(): |
no test coverage detected