[Freeipa-devel] [freeipa PR#209][synchronized] Enumerate available options in IPA installer

2017-01-03 Thread Akasurde
   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 8b99a350011ed61614f4c4ba2037ead5ee61dfb8 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde 
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 
---
 install/tools/ipa-ca-install | 9 ++---
 ipapython/install/cli.py | 2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
index 88939f9..ca909a0 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -61,15 +61,18 @@ def parse_options():
   default=False, help="unattended installation never prompts the user")
 parser.add_option("--external-ca", dest="external_ca", action="store_true",
   default=False, help="Generate a CSR to be signed by an external CA")
+ext_cas = ("generic", "ms-cs")
 parser.add_option("--external-ca-type", dest="external_ca_type",
-  type="choice", choices=("generic", "ms-cs"),
+  type="choice", choices=ext_cas,
+  metavar="{{{0}}}".format(",".join(ext_cas)),
   help="Type of the external CA")
 parser.add_option("--external-cert-file", dest="external_cert_files",
   action="append", metavar="FILE",
   help="File containing the IPA CA certificate and the external CA certificate chain")
+ca_algos = ('SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA')
 parser.add_option("--ca-signing-algorithm", dest="ca_signing_algorithm",
-  type="choice",
-  choices=('SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA'),
+  type="choice", choices=ca_algos,
+  metavar="{{{0}}}".format(",".join(ca_algos)),
   help="Signing algorithm of the IPA CA certificate")
 parser.add_option("-P", "--principal", dest="principal", sensitive=True,
   default=None, help="User allowed to manage replicas")
diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index b6f872e..441c875 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -179,6 +179,8 @@ 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'] = "{{{0}}}".format(
+",".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

[Freeipa-devel] [freeipa PR#209][synchronized] Enumerate available options in IPA installer

2017-01-03 Thread Akasurde
   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 3da003975cdf773162ee1132565b2df7bcbc4bf5 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde 
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 
---
 install/tools/ipa-ca-install | 9 ++---
 ipapython/install/cli.py | 2 ++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
index 88939f9..1eb8b23 100755
--- a/install/tools/ipa-ca-install
+++ b/install/tools/ipa-ca-install
@@ -61,15 +61,18 @@ def parse_options():
   default=False, help="unattended installation never prompts the user")
 parser.add_option("--external-ca", dest="external_ca", action="store_true",
   default=False, help="Generate a CSR to be signed by an external CA")
+ext_cas = ("generic", "ms-cs")
 parser.add_option("--external-ca-type", dest="external_ca_type",
-  type="choice", choices=("generic", "ms-cs"),
+  type="choice", choices=ext_cas,
+  metavar="{{{0}}}".format(",".join(ext_cas)),
   help="Type of the external CA")
 parser.add_option("--external-cert-file", dest="external_cert_files",
   action="append", metavar="FILE",
   help="File containing the IPA CA certificate and the external CA certificate chain")
+ca_algos = ('SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA')
 parser.add_option("--ca-signing-algorithm", dest="ca_signing_algorithm",
-  type="choice",
-  choices=('SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA'),
+  type="choice", choices=ca_alogs,
+  metavar="{{{0}}}".format(",".join(ca_algos)),
   help="Signing algorithm of the IPA CA certificate")
 parser.add_option("-P", "--principal", dest="principal", sensitive=True,
   default=None, help="User allowed to manage replicas")
diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index b6f872e..441c875 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -179,6 +179,8 @@ 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'] = "{{{0}}}".format(
+",".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

[Freeipa-devel] [freeipa PR#209][synchronized] Enumerate available options in IPA installer

2017-01-02 Thread Akasurde
   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 ce8e4174f4af7d092158bf589c69cd747ce5061c Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde 
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 
---
 ipapython/install/cli.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index b6f872e..441c875 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -179,6 +179,8 @@ 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'] = "{{{0}}}".format(
+",".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

[Freeipa-devel] [freeipa PR#209][synchronized] Enumerate available options in IPA installer

2017-01-01 Thread Akasurde
   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 92a641717c68d095997451df5eb74bb7dc2e5e77 Mon Sep 17 00:00:00 2001
From: Abhijeet Kasurde 
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 
---
 ipapython/install/cli.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index b6f872e..4f2b0d5 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -179,6 +179,8 @@ 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'] = "{{{0}}}".format(
+"|".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

[Freeipa-devel] [freeipa PR#209][synchronized] Enumerate available options in IPA installer

2016-12-27 Thread Akasurde
   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 
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 
---
 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