Commit 27f1768c authored by Christos Stavrakakis's avatar Christos Stavrakakis

Rename reconcile command to reconcile-servers

Rename `snf-manage reconcile` management command to `snf-manage
reconcile-servers`, to be consistent with `snf-manage
reconcile-networks`. Also, treat '--detect-all' option as default
when no other '--detect-*' is specified.
parent 8992fbe6
......@@ -91,6 +91,10 @@ class Command(BaseCommand):
keys_detect = [k for k in options.keys() if k.startswith('detect_')]
keys_fix = [k for k in options.keys() if k.startswith('fix_')]
if not reduce(lambda x, y: x or y,
map(lambda x: options[x], keys_detect)):
options['detect_all'] = True
if options['detect_all']:
for kd in keys_detect:
options[kd] = True
......@@ -98,10 +102,6 @@ class Command(BaseCommand):
for kf in keys_fix:
options[kf] = True
if not reduce(lambda x, y: x or y,
map(lambda x: options[x], keys_detect)):
raise CommandError("At least one of --detect-* must be specified")
for kf in keys_fix:
kd = kf.replace('fix_', 'detect_', 1)
if (options[kf] and not options[kd]):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment