Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1355)

Issue 40290044: state/apiserver: Charms upload support via HTTP (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by dimitern
Modified:
10 years, 4 months ago
Reviewers:
mp+198438, rog
Visibility:
Public.

Description

state/apiserver: Charms upload support via HTTP This implements https://<apiserver>/charms handler, which supports uploading local charms through the API server into the state and provider storage. In brief, HTTPS POST requests with URI /charms?series=<series> and a binary body, containing a zip file upload (Content-Type: application/zip header is required) is processed and added to state database and uploaded to the provider storage, before returning the response. HTTP basic authentiction is used for authorization. Full specification: https://docs.google.com/a/canonical.com/document/d/1TxnOCLPDqG6y3kCzmUGIkDr0tywXk1XQnHx7G6gO5tI/edit https://code.launchpad.net/~dimitern/juju-core/220-post-charm-upload/+merge/198438 Requires: https://code.launchpad.net/~dimitern/juju-core/219-state-charm-upload/+merge/198405 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 44

Patch Set 2 : state/apiserver: Charms upload support via HTTP #

Total comments: 9

Patch Set 3 : state/apiserver: Charms upload support via HTTP #

Total comments: 2

Patch Set 4 : state/apiserver: Charms upload support via HTTP #

Unified diffs Side-by-side diffs Delta from patch set Stats (+522 lines, -21 lines) Patch
A [revision details] View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M state/apiserver/admin.go View 2 chunks +25 lines, -17 lines 0 comments Download
M state/apiserver/apiserver.go View 1 2 1 chunk +4 lines, -1 line 0 comments Download
A state/apiserver/charms.go View 1 2 3 1 chunk +245 lines, -0 lines 0 comments Download
A state/apiserver/charms_test.go View 1 2 1 chunk +241 lines, -0 lines 0 comments Download
M state/apiserver/export_test.go View 1 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 7
dimitern
Please take a look.
10 years, 4 months ago (2013-12-10 17:15:30 UTC) #1
rog
Really good direction, thanks. Quite a few comments but nothing too substantial. https://codereview.appspot.com/40290044/diff/1/state/apiserver/apiserver.go File state/apiserver/apiserver.go ...
10 years, 4 months ago (2013-12-10 18:36:43 UTC) #2
dimitern
Please take a look. https://codereview.appspot.com/40290044/diff/1/state/apiserver/apiserver.go File state/apiserver/apiserver.go (right): https://codereview.appspot.com/40290044/diff/1/state/apiserver/apiserver.go#newcode32 state/apiserver/apiserver.go:32: charms *charmsHandler On 2013/12/10 18:36:43, ...
10 years, 4 months ago (2013-12-11 10:55:00 UTC) #3
rog
A few more comments and suggestions. Not far off now - just the multipart logic ...
10 years, 4 months ago (2013-12-11 13:25:41 UTC) #4
dimitern
Please take a look. https://codereview.appspot.com/40290044/diff/1/state/apiserver/apiserver.go File state/apiserver/apiserver.go (right): https://codereview.appspot.com/40290044/diff/1/state/apiserver/apiserver.go#newcode32 state/apiserver/apiserver.go:32: charms *charmsHandler On 2013/12/11 13:25:41, ...
10 years, 4 months ago (2013-12-11 15:23:41 UTC) #5
rog
LGTM, thanks! https://codereview.appspot.com/40290044/diff/20001/state/apiserver/charms_test.go File state/apiserver/charms_test.go (right): https://codereview.appspot.com/40290044/diff/20001/state/apiserver/charms_test.go#newcode293 state/apiserver/charms_test.go:293: if _, err := source.Seek(0, 0); err ...
10 years, 4 months ago (2013-12-11 16:41:02 UTC) #6
dimitern
10 years, 4 months ago (2013-12-11 16:53:13 UTC) #7
Please take a look.

https://codereview.appspot.com/40290044/diff/40001/state/apiserver/charms.go
File state/apiserver/charms.go (right):

https://codereview.appspot.com/40290044/diff/40001/state/apiserver/charms.go#...
state/apiserver/charms.go:136: defer r.Body.Close()
On 2013/12/11 16:41:02, rog wrote:
> No need for this, I think.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b