summaryrefslogtreecommitdiffstats
path: root/ipapython/install
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-08-06 08:16:45 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-22 12:09:22 +0200
commit86edd6abeb9749e159a529b83cfce6443fff4ba5 (patch)
treecc9e6197ee0254eb61cef7740f544bf1cd41a6bb /ipapython/install
parentbed64a888a5c02f389d8d744ff2b327082830fbe (diff)
downloadfreeipa-86edd6abeb9749e159a529b83cfce6443fff4ba5.tar.gz
freeipa-86edd6abeb9749e159a529b83cfce6443fff4ba5.tar.xz
freeipa-86edd6abeb9749e159a529b83cfce6443fff4ba5.zip
install: Move unattended option to the general help section
https://fedorahosted.org/freeipa/ticket/4517 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipapython/install')
-rw-r--r--ipapython/install/cli.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index a9ebe3653..ce64baa5f 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -78,12 +78,22 @@ class ConfigureTool(admintool.AdminTool):
@classmethod
def add_options(cls, parser):
+ transformed_cls = cls._transform(cls.configurable_class)
+
+ if issubclass(transformed_cls, common.Interactive):
+ parser.add_option(
+ '-U', '--unattended',
+ dest='unattended',
+ default=False,
+ action='store_true',
+ help="unattended (un)installation never prompts the user",
+ )
+
basic_group = optparse.OptionGroup(parser, "basic options")
groups = collections.OrderedDict()
groups[None] = basic_group
- transformed_cls = cls._transform(cls.configurable_class)
for owner_cls, name in transformed_cls.knobs():
knob_cls = getattr(owner_cls, name)
if cls.positional_arguments and name in cls.positional_arguments:
@@ -134,15 +144,6 @@ class ConfigureTool(admintool.AdminTool):
**kwargs
)
- if issubclass(transformed_cls, common.Interactive):
- basic_group.add_option(
- '-U', '--unattended',
- dest='unattended',
- default=False,
- action='store_true',
- help="unattended (un)installation never prompts the user",
- )
-
for group, opt_group in groups.items():
parser.add_option_group(opt_group)