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

[Pulp-list] Package Upload Questions



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a follow up to the discussion yesterday of what constitutes an
error for package upload. Right now I'm mainly concerned with what the
RHUI interface is going to look like. I want to make sure we handle
anything the server reports as an error and shows the user the right
message. Here's the code I'm using to upload packages. It pretty much
just uses the code the CLI uses.


        # Upload the bits to the Pulp server
        upload_id = self.upload_api.upload(filename)

        # Tell the Pulp server that an RPM was uploaded
        metadata = pulp.client.utils.processFile(filename)
        uploaded = self.upload_api.import_content(metadata, upload_id)

        # Associate the package with all specified repos
        for repo_id in repo_ids:
            self.repo_api.add_package(repo_id, [uploaded['id']])


So for the following questions, can you let me know what the behavior is
and which of the calls I'm making would throw the exception if one occurs?

- - Upload the same package to the same repo it was uploaded to before.

- - Upload the the same package name but different bits (checksum is
different) to the same repo it was uploaded to before.

- - Upload the same package (and bits) but this time to a different repo.




- -- 
Jay Dobies
RHCE# 805008743336126
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJN+gIXAAoJEOMmcTqOSQHC+Y8H/RhSh86mU9VgZF+f1/EnISb3
JQe6Q5iC2wIoXF8ngxuIdGrpQZSTgfX5nEkS36i1BiBy9jzbJ4T7k8XDe3k1NQKB
8AK9kzx3bXcP7QUYoG9c70cHcmHLG9jJXg/1Q4Tz/86idMSKvnGu8AHuwRRov90A
qgfDL6FCmaxX3t1q4u4ylR0cQ9LLhAi13gAmZ+TUA8b+vyApDZFhGmISJQkYnRgQ
RR5u1BHRir7Yqgu06Pz6JBWm/fEJEel+Z93kD/O1u6pHb5hhxobb8Mx5zX1hk5xC
c8Y6EG9bO5hWfjamXEjfJirkZO/qoUvH3OJ9eUYEtButMcQjznw6+aiDriU/mUA=
=pjcG
-----END PGP SIGNATURE-----


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