Expose a webservice method to retrieve copy archives

Bug #558905 reported by William Grant on 2010-04-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Low
William Grant

Bug Description

In my copy archive FTBFS reporting scripts I must currently construct a URL to the copy archive. IDistribution should provide a method to retrieve copy archives by name, and this should be exposed on the webservice.

Related branches

Changed in soyuz:
status: New → Confirmed
importance: Undecided → Low
William Grant (wgrant) wrote :

The easiest thing to do seems to be to move lp.soyuz.browser.archive.traverse_distribution_to_archive to Distribution.getArchive and export that. Any objections?

Michael Nelson (michael.nelson) wrote :

Sounds fine to me.

Michael Nelson (michael.nelson) wrote :

Just in case it's needed, it is possible to load the copy archive manually and use it in the API:

{{{
copy_archive = launchpad.load('https://api.launchpad.net/beta/ubuntu/+archive/test-rebuild-20100407')
}}}

Changed in soyuz:
status: Confirmed → Triaged
tags: added: api
tags: added: trivial
William Grant (wgrant) on 2010-05-14
Changed in soyuz:
status: Triaged → In Progress
assignee: nobody → William Grant (wgrant)
Changed in soyuz:
milestone: none → 10.05
status: In Progress → Fix Committed
tags: added: qa-needstesting
William Grant (wgrant) wrote :

QA:

>>> import launchpadlib
>>> from launchpadlib.launchpad import Launchpad
>>> lp = Launchpad.login_anonymously('qa', 'edge')
>>> lp.distributions['ubuntu'].getArchive(name='primary')
<archive at https://api.edge.launchpad.net/1.0/ubuntu/+archive/primary>
>>> lp.distributions['ubuntu'].getArchive(name='ppa')
>>> lp.distributions['ubuntu'].getArchive(name='test-rebuild-20100407')
<archive at https://api.edge.launchpad.net/1.0/ubuntu/+archive/test-rebuild-20100407>
>>> lp.distributions['ubuntu'].getArchive(name='test-rebuild-20100403')

tags: added: qa-ok
removed: qa-needstesting
Curtis Hovey (sinzui) on 2010-06-02
Changed in soyuz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers