[Pulp-list] Runcible: Pulp V2 Ruby API Bindings Alpha

Eric Helms ehelms at redhat.com
Thu Oct 25 15:55:54 UTC 2012

To your first note, I should have expanded a bit more on the testing so I will take that opportunity now.  There are essentially two modes for the tests: live and recorded.  We initially run the tests against a live Pulp in order to capture the HTTP traffic and to verify that our calls actually work and return what we expect based on the documentation.  After that, assuming you want to make changes to the code base itself, but not change the version of Pulp that the tests have been run against, a developer can run them in recorded or "none" mode.  This essentially replays the HTTP interactions that were previously recorded to avoid mocking and use "real" data to catch code changes.  This is currently being run against every pull request and commit to the repository via Travis - https://travis-ci.org/#!/Katello/runcible

To your second note, a valid point and we can change the pitch a bit.  The core API bindings under lib/runcible/resources/ are in no way RPM centric, only the extensions are, and only because that is all the Katello team has had to handle thus far.  Ideally, as developers needed extensions that would make their lives easier when working with a particular type of content, the gem would be updated to reflect that.  If it makes sense to more directly note the current focus on making them easier to use with the RPM plugin, I would be happy to update our docs and future conversations to emphasize that point.

The feedback is appreciated as we would prefer this gem live less in the Katello focused world and more in the usable by the community world.

- Eric

----- Original Message -----
From: "Jay Dobies" <jason.dobies at redhat.com>
To: pulp-list at redhat.com
Sent: Thursday, October 25, 2012 11:34:14 AM
Subject: Re: [Pulp-list] Runcible: Pulp V2 Ruby API Bindings Alpha

First off, thank you. Making this sort of thing available is fantastic 
to the Pulp community.

Two notes:

- It's good that the tests can be run against a live Pulp installation, 
but is there an easy way to mock that out? If devs are going to use 
this, they'll want to unit test, which means simulating server responses 
so a live server isn't needed. Could be a useful enhancement.

- This one is harder to explain. I'd say to be careful using the term 
"Pulp V2 Ruby API Bindings" and phrase "to provide the community with a 
set of Ruby API bindings for Pulp". I've only taken a quick peek at the 
code, but what you're providing is an RPM spin on our APIs. That's 
totally useful to that end and makes sense for Katello, but it means 
this isn't quite for Pulp (the platform) as it'll be misleading 
(arguably broken) for devs not using the RPM plugins.

Again, that's not to say it isn't useful or appreciated. I am sure there 
are people who will be happy to use these. I just want to be sure it's 
pitched correctly to indicate its tight relationship to the RPM plugins 
and their functionality.

On 10/25/2012 11:20 AM, Eric Helms wrote:
> Howdy Pulp folks,
> As some of you may know, the Katello project has been working to integrate Pulp V2 within our code base.  As part of this migration, we decided to move the API bindings for Pulp out of our core project and into a stand alone Ruby gem in order to provide the community with a set of Ruby API bindings for Pulp.  At this point, the Katello side has neared completion of our API calls to the newer Pulp APIs and as such feel a good enough time to release an alpha version of our gem Runcible for perusal by others.
> Things of note or that may interest Pulp developers (or give insight into how the API is being used, specifically the Extensions mentioned below):
>    - Included is a set of integration tests using the rubygem VCR to capture HTTP traffic
>      * This means that ALL tests can be and are run against a live Pulp installation
>      * The currently tested version is noted at the top of the README
>    - There are direct API bindings to Pulp calls
>    - There are a set of Extensions to some Pulp objects designed to make common operations easier, for example:
>      * Providing functions to create a Repository with an importer and distributor
>      * Functions that specifically retrieve objects without native API calls, e.g. RPMs, Errata, Distributions etc. using search syntax
>      * Objects to represent configurations for specific importers and distributors (see lib/runcible/extensions/YumImporter or YumDistributor for examples)
>    - Every API call is not currently covered, as the focus has been on Katello requirements, however, this is a community project
> Availability:
>    Git:      https://github.com/Katello/runcible
>    Rubygems: https://rubygems.org/gems/runcible
>    RPM:      Can be built, currently not available in any public repository
> Thanks,
> Eric Helms
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list

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

Pulp-list mailing list
Pulp-list at redhat.com

More information about the Pulp-list mailing list