mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
checkpoint radius client add,modify,find,del working, command line args handled correctly
This commit is contained in:
parent
9a9a7e4058
commit
2c2069d3ec
@ -87,6 +87,7 @@ def main():
|
|||||||
opt_parser.error("missing Client-IP-Address")
|
opt_parser.error("missing Client-IP-Address")
|
||||||
|
|
||||||
ip_addr = args[1]
|
ip_addr = args[1]
|
||||||
|
pairs['Client-IP-Address'] = ip_addr
|
||||||
|
|
||||||
# Get pairs from a file or stdin
|
# Get pairs from a file or stdin
|
||||||
if options.pair_file:
|
if options.pair_file:
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
import ipa
|
import ipa
|
||||||
|
@ -87,6 +87,7 @@ def main():
|
|||||||
opt_parser.error("missing Client-IP-Address")
|
opt_parser.error("missing Client-IP-Address")
|
||||||
|
|
||||||
ip_addr = args[1]
|
ip_addr = args[1]
|
||||||
|
pairs['Client-IP-Address'] = ip_addr
|
||||||
|
|
||||||
# Verify client previously exists and get current values
|
# Verify client previously exists and get current values
|
||||||
radius_client = ipa.radius_client.RadiusClient()
|
radius_client = ipa.radius_client.RadiusClient()
|
||||||
@ -186,7 +187,6 @@ def main():
|
|||||||
for attr,value in pairs.items():
|
for attr,value in pairs.items():
|
||||||
print "\t%s = %s" % (attr, value)
|
print "\t%s = %s" % (attr, value)
|
||||||
|
|
||||||
radius_client = ipa.radius_client.RadiusClient()
|
|
||||||
for attr,value in pairs.items():
|
for attr,value in pairs.items():
|
||||||
radius_client.setValue(radius_util.radius_client_attr_to_ldap_attr[attr], value)
|
radius_client.setValue(radius_util.radius_client_attr_to_ldap_attr[attr], value)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user