showard | df06256 | 2008-07-03 19:56:37 +0000 | [diff] [blame] | 1 | import enum, global_config |
| 2 | |
mbligh | b024fb1 | 2008-07-11 21:24:21 +0000 | [diff] [blame] | 3 | Protection = enum.Enum('No protection', # Repair can do anything to |
| 4 | # this host. |
mbligh | 25c0b8c | 2009-01-24 01:44:17 +0000 | [diff] [blame] | 5 | 'Repair software only', # repair should try to fix any |
| 6 | # software problem |
mbligh | b024fb1 | 2008-07-11 21:24:21 +0000 | [diff] [blame] | 7 | 'Repair filesystem only', # Repair should only try to |
| 8 | # recover the file system. |
showard | c9ae178 | 2009-01-30 01:42:37 +0000 | [diff] [blame] | 9 | 'Do not repair', # Repair should not touch this |
mbligh | b024fb1 | 2008-07-11 21:24:21 +0000 | [diff] [blame] | 10 | # host. |
showard | c9ae178 | 2009-01-30 01:42:37 +0000 | [diff] [blame] | 11 | 'Do not verify', # Don't even try to verify |
| 12 | # this host |
showard | df06256 | 2008-07-03 19:56:37 +0000 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | default = Protection.get_value( |
| 16 | global_config.global_config.get_config_value( |
| 17 | 'HOSTS', 'default_protection')) |
| 18 | |
| 19 | choices = Protection.choices() |