diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-06-01 09:50:25 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2011-06-01 09:50:46 -0400 |
commit | 927f5d957d76f8743b1ae812b5f915588fcb8de6 (patch) | |
tree | 3890a6b39d12bd4e84d128e5c3f3a7050c605672 /src/lib/Server | |
parent | 750f1faac80aa97714673abdb435cfb0ede5d734 (diff) | |
download | bcfg2-927f5d957d76f8743b1ae812b5f915588fcb8de6.tar.gz bcfg2-927f5d957d76f8743b1ae812b5f915588fcb8de6.tar.bz2 bcfg2-927f5d957d76f8743b1ae812b5f915588fcb8de6.zip |
added -t option to set client timeout
Diffstat (limited to 'src/lib/Server')
-rw-r--r-- | src/lib/Server/Admin/Perf.py | 4 | ||||
-rw-r--r-- | src/lib/Server/Admin/Xcmd.py | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Server/Admin/Perf.py b/src/lib/Server/Admin/Perf.py index af1c83072..d03b37d57 100644 --- a/src/lib/Server/Admin/Perf.py +++ b/src/lib/Server/Admin/Perf.py @@ -22,6 +22,7 @@ class Perf(Bcfg2.Server.Admin.Mode): 'password': Bcfg2.Options.SERVER_PASSWORD, 'server': Bcfg2.Options.SERVER_LOCATION, 'user': Bcfg2.Options.CLIENT_USER, + 'timeout': Bcfg2.Options.CLIENT_TIMEOUT, } setup = Bcfg2.Options.OptionParser(optinfo) setup.parse(sys.argv[2:]) @@ -30,7 +31,8 @@ class Perf(Bcfg2.Server.Admin.Mode): setup['password'], key=setup['key'], cert=setup['certificate'], - ca=setup['ca']) + ca=setup['ca'], + timeout=setup['timeout']) data = proxy.get_statistics() for key, value in list(data.items()): data = tuple(["%.06f" % (item) for item in value[:-1]] + [value[-1]]) diff --git a/src/lib/Server/Admin/Xcmd.py b/src/lib/Server/Admin/Xcmd.py index fd5794f88..2cb085346 100644 --- a/src/lib/Server/Admin/Xcmd.py +++ b/src/lib/Server/Admin/Xcmd.py @@ -20,7 +20,8 @@ class Xcmd(Bcfg2.Server.Admin.Mode): 'password': Bcfg2.Options.SERVER_PASSWORD, 'key': Bcfg2.Options.SERVER_KEY, 'certificate': Bcfg2.Options.CLIENT_CERT, - 'ca': Bcfg2.Options.CLIENT_CA + 'ca': Bcfg2.Options.CLIENT_CA, + 'timeout': Bcfg2.Options.CLIENT_TIMEOUT, } setup = Bcfg2.Options.OptionParser(optinfo) setup.parse(sys.argv[2:]) @@ -31,7 +32,7 @@ class Xcmd(Bcfg2.Server.Admin.Mode): key=setup['key'], cert=setup['certificate'], ca=setup['ca'], - timeout=180) + timeout=setup['timeout']) if len(setup['args']) == 0: print("Usage: xcmd <xmlrpc method> <optional arguments>") return |