reparenting jobs….

Viewing 2 posts - 1 through 2 (of 2 total)
  • 15th November 2008 at 3:20 pm #14295

    I’ve put this down as an enhancement request, to be able to reparent jobs using “mrtool”, but in the meantime, I’ve been looking at accessing the web server from within python….

    I can’t quite figure out how the login is done internally, though…

    Here’s what I’ve got so far:

    import httplib, urllib

    conn = httplib.HTTPConnection(musterServerIP, 7690)
    params = urllib.urlencode({‘username’: musterUsername, ‘password’: musterPassword, ‘action’: “dologin”})

    # I’m pretty sure that this next line is what’s not working. I’m just not sure
    # what the url should be
    conn.request(“POST”, “/dologin.html”, params)
    response = conn.getresponse()
    print response.status, response.reason
    print response.msg

    # This just gives me dologin.html – I’m just not sure where else I should send it

    # If this had worked, I’d then do:

    conn.request(“GET”, “actionjob?action=reparent&parent=%d&id=%d” % (parentId, jobId))
    response = conn.getresponse()

    print response.status, response.reason
    print response.msg

    Can anyone help me with this? I’m quite keen on getting a certain amount of automated cron-based restructuring going on….

    3rd July 2009 at 4:47 pm #14963

    Maybe you’re missing a redirect, that’s what you should get in response…But you’ll get that in the http headers. Try to simply redirect yourself to index.html after posting the login, you should get it successfully….

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.