diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-03-31 16:15:55 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-03-31 16:15:55 -0400 |
commit | eee7bfa18052bb1e3d0c84421f2b425073043888 (patch) | |
tree | cf1863db8dcd6094a91e3e53ef9b6ff8239d42c7 /cobbler/demo_connect.py | |
parent | ca136de01b6d6604ca0fdf2990395c9212abd6a8 (diff) | |
download | third_party-cobbler-eee7bfa18052bb1e3d0c84421f2b425073043888.tar.gz third_party-cobbler-eee7bfa18052bb1e3d0c84421f2b425073043888.tar.xz third_party-cobbler-eee7bfa18052bb1e3d0c84421f2b425073043888.zip |
Minor changes to the authn/z test program so they don't go through Apache
auth filters and can produce slightly more useful feedback, also removed
a stray print.
Diffstat (limited to 'cobbler/demo_connect.py')
-rw-r--r-- | cobbler/demo_connect.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cobbler/demo_connect.py b/cobbler/demo_connect.py index 6397a6b..94fa390 100644 --- a/cobbler/demo_connect.py +++ b/cobbler/demo_connect.py @@ -18,11 +18,16 @@ if __name__ == "__main__": p = optparse.OptionParser() p.add_option("-u","--user",dest="user",default="test") p.add_option("-p","--pass",dest="password",default="test") - sp = ServerProxy("http://127.0.0.1/cobbler_api_rw") + + # NOTE: if you've changed your xmlrpc_rw port or + # disabled xmlrpc_rw this test probably won't work + + sp = ServerProxy("http://127.0.0.1:25152") (options, args) = p.parse_args() print "- trying to login with user=%s" % options.user token = sp.login(options.user,options.password) print "- token: %s" % token + print "- authenticated ok, now seeing if user is authorized" check = sp.check_access(token,"imaginary_method_name") print "- access ok? %s" % check |