java/scripts/test_cobbler_sw_login.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
New commits: commit 60e9b30c1f9e4948e7225566ee13de31cf23f8ba Author: Justin Sherrill jsherril@redhat.com Date: Fri Sep 18 16:46:27 2009 -0400
adding script to help diagnose spacewalk-cobbler login issues
diff --git a/java/scripts/test_cobbler_sw_login.py b/java/scripts/test_cobbler_sw_login.py new file mode 100644 index 0000000..1575dbe --- /dev/null +++ b/java/scripts/test_cobbler_sw_login.py @@ -0,0 +1,22 @@ +#!/usr/bin/python +import sys +from xmlrpclib import Server + +sys.path.append('/usr/share/rhn') +try: + from common import initCFG, CFG +except: + print "Couldn't load needed libs, Are you sure you are running this on a satellite?" + sys.exit(1) + +initCFG() +user = 'taskomatic_user' +passw = CFG.SESSION_SECRET_1 + +c = Server('http://localhost/rpc/api') +print("Satellite auth.checkAuthToken (should be 1): ") +print( c.auth.checkAuthToken(user, passw)) + +print("Trying cobbler login (should be a random token): ") +c = Server('http://localhost/cobbler_api') +print(c.login(user, passw))
spacewalk-commits@lists.fedorahosted.org