summaryrefslogtreecommitdiffstats
path: root/ipa-radius-admintools
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-radius-admintools')
-rw-r--r--ipa-radius-admintools/ipa-addradiusclient10
-rw-r--r--ipa-radius-admintools/ipa-addradiusprofile10
-rw-r--r--ipa-radius-admintools/ipa-delradiusclient10
-rw-r--r--ipa-radius-admintools/ipa-delradiusprofile10
-rw-r--r--ipa-radius-admintools/ipa-findradiusclient10
-rw-r--r--ipa-radius-admintools/ipa-findradiusprofile10
-rw-r--r--ipa-radius-admintools/ipa-modradiusclient10
-rw-r--r--ipa-radius-admintools/ipa-modradiusprofile10
8 files changed, 48 insertions, 32 deletions
diff --git a/ipa-radius-admintools/ipa-addradiusclient b/ipa-radius-admintools/ipa-addradiusclient
index 1db571a7..4f97c648 100644
--- a/ipa-radius-admintools/ipa-addradiusclient
+++ b/ipa-radius-admintools/ipa-addradiusclient
@@ -81,13 +81,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
- ip_addr = args[1]
+ ipa.config.init_config(options)
+
+ ip_addr = args[0]
pairs[distinguished_attr] = ip_addr
# Get pairs from a file or stdin
diff --git a/ipa-radius-admintools/ipa-addradiusprofile b/ipa-radius-admintools/ipa-addradiusprofile
index 66db5226..aa3bf9c1 100644
--- a/ipa-radius-admintools/ipa-addradiusprofile
+++ b/ipa-radius-admintools/ipa-addradiusprofile
@@ -77,13 +77,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
- uid = args[1]
+ ipa.config.init_config(options)
+
+ uid = args[0]
user_profile = not options.shared
pairs[distinguished_attr] = uid
diff --git a/ipa-radius-admintools/ipa-delradiusclient b/ipa-radius-admintools/ipa-delradiusclient
index dd26e8ac..ee5e2e79 100644
--- a/ipa-radius-admintools/ipa-delradiusclient
+++ b/ipa-radius-admintools/ipa-delradiusclient
@@ -46,13 +46,15 @@ def main():
help="detailed help information")
opt_parser.set_usage("Usage: %s [options] Client-IP-Address" % (os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error("missing Client-IP-Address")
- ip_addr = args[1]
+ ipa.config.init_config(options)
+
+ ip_addr = args[0]
try:
ipa_client = ipaclient.IPAClient()
diff --git a/ipa-radius-admintools/ipa-delradiusprofile b/ipa-radius-admintools/ipa-delradiusprofile
index f77d0174..d5be88a7 100644
--- a/ipa-radius-admintools/ipa-delradiusprofile
+++ b/ipa-radius-admintools/ipa-delradiusprofile
@@ -48,13 +48,15 @@ def main():
help="detailed help information")
opt_parser.set_usage("Usage: %s [options] UID" % (os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error("missing UID")
- uid = args[1]
+ ipa.config.init_config(options)
+
+ uid = args[0]
user_profile = not options.shared
# Per user profiles are pre-created (i.e. objectclass radiusprofile is always added for each user)
diff --git a/ipa-radius-admintools/ipa-findradiusclient b/ipa-radius-admintools/ipa-findradiusclient
index ade4bd39..12bb9bcf 100644
--- a/ipa-radius-admintools/ipa-findradiusclient
+++ b/ipa-radius-admintools/ipa-findradiusclient
@@ -56,15 +56,17 @@ def main():
opt_parser.add_option("-h", "--help", action="callback", callback=help_option_callback,
help="detailed help information")
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
opt_parser.set_usage("Usage: %s [options] Client-IP-Address [Client-IP-Address ...]" % (os.path.basename(sys.argv[0])))
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error("missing Client-IP-Address(es)")
- ip_addrs = args[1:]
+ ipa.config.init_config(options)
+
+ ip_addrs = args
try:
ipa_client = ipaclient.IPAClient()
diff --git a/ipa-radius-admintools/ipa-findradiusprofile b/ipa-radius-admintools/ipa-findradiusprofile
index ba714068..01efa2c0 100644
--- a/ipa-radius-admintools/ipa-findradiusprofile
+++ b/ipa-radius-admintools/ipa-findradiusprofile
@@ -58,15 +58,17 @@ def main():
opt_parser.add_option("-h", "--help", action="callback", callback=help_option_callback,
help="detailed help information")
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
opt_parser.set_usage("Usage: %s [options] UID [UID ...]" % (os.path.basename(sys.argv[0])))
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error("missing UID(es)")
- uids = args[1:]
+ ipa.config.init_config(options)
+
+ uids = args
user_profile = not options.shared
try:
diff --git a/ipa-radius-admintools/ipa-modradiusclient b/ipa-radius-admintools/ipa-modradiusclient
index 9e973b12..2a37929e 100644
--- a/ipa-radius-admintools/ipa-modradiusclient
+++ b/ipa-radius-admintools/ipa-modradiusclient
@@ -82,13 +82,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
- ip_addr = args[1]
+ ipa.config.init_config(options)
+
+ ip_addr = args[0]
# Verify entity previously exists and get current values
ipa_client = ipaclient.IPAClient()
diff --git a/ipa-radius-admintools/ipa-modradiusprofile b/ipa-radius-admintools/ipa-modradiusprofile
index 405abcfc..20586be5 100644
--- a/ipa-radius-admintools/ipa-modradiusprofile
+++ b/ipa-radius-admintools/ipa-modradiusprofile
@@ -78,13 +78,15 @@ def main():
opt_parser.set_usage("Usage: %s [options] %s" % (distinguished_attr, os.path.basename(sys.argv[0])))
- args = ipa.config.init_config(sys.argv)
- options, args = opt_parser.parse_args(args)
+ ipa.config.add_standard_options(opt_parser)
+ options, args = opt_parser.parse_args()
- if len(args) < 2:
+ if len(args) < 1:
opt_parser.error('missing %s' % (distinguished_attr))
- uid = args[1]
+ ipa.config.init_config(options)
+
+ uid = args[0]
user_profile = not options.shared
# Verify entity previously exists and get current values