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

Re: [Pulp-list] cds, etc. api



Hi

The CDS APIs in particular just kept falling off sprints due to lack of time. The rest of the docs, even those that exist, are in need of some reworking.

Ok thanks.

There was a recent thread that mentioned using a new scheme/tool for generating API docs that I suspect will be investigated in an upcoming sprint.

Cool!

So, what is the general state of the api? Is it more or less stable and functional, or will there be heavy changes in the near future?

I'm asking because I started to implement things against the API, however to me it looks like not everything is yet working.

For example the API of a repository:

I can update the name without any problems:

  PUT /repositories/<repo_id>/ { 'name': 'new_name' }

But I can for example not update some other fields, like feed_cert, with the same method. I get the following error:

2011-10-27 12:18:48,377 24100:-1282426000: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 335, in PUT
    repo = api.update(id, delta)
File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 683, in update
    'update keyword "%s", not-supported' % key
Exception: update keyword "feed_cert", not-supported

Although the documentation [1] states, that I can update "any field of a Repo object except id"

Also it looks like I can't create a repository via the API by passing feed_cert, feed_ca & feed_key. They seem to be simply ignored, without anything logged.

This is with:

$ rpm -qa | grep pulp
pulp-admin-0.0.237-5.fc15.noarch
pulp-0.0.237-5.fc15.noarch
pulp-common-0.0.237-5.fc15.noarch
m2crypto-0.21.1.pulp-5.fc15.i686
pulp-client-lib-0.0.237-5.fc15.noarch

Looking into the python code, it looks like you're dealing differently with various attributes than with standard attributes like `name`.

But to me it is not really clear, where this is documented etc.

Can you shed some light on my (probably) poor understanding of the API and how things work?

Thank you very much!

~pete

[1] https://fedorahosted.org/pulp/wiki/UGREST-Repositories#UpdateARepository


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