URL: https://github.com/freeipa/freeipa/pull/209
Author: Akasurde
 Title: #209: Enumerate available options in IPA installer
Action: synchronized

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/209/head:pr209
git checkout pr209
From 573369452896f9daa2ab894cbe1a54e28dcb669d Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde <akasu...@redhat.com>
Date: Wed, 2 Nov 2016 16:36:17 +0530
Subject: [PATCH] Enumerate available options in IPA installer

Fix adds enumerated list of available options in IPA server
installer and IPA CA installer help options

Fixes https://fedorahosted.org/freeipa/ticket/5435

Signed-off-by: Abhijeet Kasurde <akasu...@redhat.com>
---
 ipapython/install/cli.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index b6f872e..39f5fc2 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -179,6 +179,7 @@ def add_options(cls, parser, positional=False):
             elif issubclass(knob_scalar_type, enum.Enum):
                 kwargs['type'] = 'choice'
                 kwargs['choices'] = [i.value for i in knob_scalar_type]
+                kwargs['metavar'] = "[%s]" % ("|".join(kwargs['choices']))
             else:
                 kwargs['nargs'] = 1
                 kwargs['callback_args'] = (knob_scalar_type,)
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to