[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Minor usability problem with stale cached login credentials



I forget if I told you, but the set_progress method in the conduit has been wired up to the tasking subsystem and repo sync has been made to be an asynchronous call. I'd point you to docs on it, but it's so recently added that we haven't written them yet. Here's a quick rundown:

Check out the bottom of https://fedorahosted.org/pulp/wiki/CoordinatorProgrammingGuide The call report is what's returned from the REST call when you trigger an asynchronous task.

Inside of there, the progress field will contain what your importer specified the last time it called set_progress.

I'm pretty sure that the REST serialized call report contains an href back into the server to request an updated version of the call report. My code is assembling that URL using '/v2/tasks/%s/' and substituting in task_id. I poll until the state field is one of the three completed states: finished, error, cancelled. FYI, suspended is listed on that page but not current in use.

This stuff should be in the current QE build (http://repos.fedorapeople.org/repos/pulp/pulp/dev/testing/, build 0.277). Sorry for the really thin overview, if you have more questions don't hesitate to ask.

On 03/22/2012 09:03 PM, Nick Coghlan wrote:
On 03/23/2012 04:20 AM, Jay Dobies wrote:
This is one of those things that annoyed us in the beginning and after a
while of never getting around to fixing it, we developed blinders and
don't even notice anymore :)

This sprint I'm looking to get login/logout functionality into the v2
client, I'll make sure I don't fall into the same trap again.

If you're replacing the client then I won't worry about raising the bug.
While I'll be using my custom client (which hooks into the v1 client
authentication code) for PulpDist 0.1.0, the new pulp-admin integration
hooks are definitely something I want to look at for 0.2.0.

If you're curious about how my custom Pulp v2 API client currently
works, the docs are here:

http://readthedocs.org/docs/pulpdist/en/latest/cli.html

And the main() implementation is here:

git.fedorahosted.org/git/?p=pulpdist.git;a=blob;f=src/pulpdist/cli/repo_cli.py


Cheers,
Nick.


--
Jay Dobies
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]