Merge lp://qastaging/~dooferlad/linaro-license-protection/add_api into lp://qastaging/~linaro-automation/linaro-license-protection/trunk

Proposed by James Tunnicliffe
Status: Merged
Approved by: Milo Casagrande
Approved revision: 177
Merged at revision: 177
Proposed branch: lp://qastaging/~dooferlad/linaro-license-protection/add_api
Merge into: lp://qastaging/~linaro-automation/linaro-license-protection/trunk
Diff against target: 395 lines (+294/-6)
5 files modified
HACKING (+28/-0)
license_protected_downloads/tests/test_views.py (+104/-0)
license_protected_downloads/views.py (+67/-6)
scripts/download.py (+89/-0)
urls.py (+6/-0)
To merge this branch: bzr merge lp://qastaging/~dooferlad/linaro-license-protection/add_api
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+152717@code.qastaging.launchpad.net

Description of the change

Adds an API for clients to use to download files. For sample usage see scripts/download.py.

To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Hi James, thanks for working on this.

It looks to go for me.
A couple of things that can be fixed during merge:

216 +# Generate the URL that will return the license information. This is the URL
217 +# if the file with /api/license prepended to the path.

I guess there is a small type there: s/if the file/of the file

Another thing that might be good is to add something in the HACKING file about the new changes/API.

review: Approve
178. By James Tunnicliffe

Added information about the API to the HACKING document.
Added test for the listing API.
Updated download.py to use all parts of the API, demonstrating how to download all files in a directory, perform interactive checks with the user for if they accept a license and storing which licenses the user accepts so they don't have to re-accept a license they have alread read.

179. By James Tunnicliffe

Added tests to check failure mode of API.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches