Expose a webservice method to retrieve copy archives

Bug #558905 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
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
Revision history for this message
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?

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Sounds fine to me.

Revision history for this message
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)
Changed in soyuz:
status: Triaged → In Progress
assignee: nobody → William Grant (wgrant)
Revision history for this message
Ursula Junque (ursinha) wrote : Bug fixed by a commit
Changed in soyuz:
milestone: none → 10.05
status: In Progress → Fix Committed
tags: added: qa-needstesting
Revision history for this message
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)
Changed in soyuz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.