grizzly: swift auto extract archive and bulk delete middleware
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-manuals |
Fix Released
|
Medium
|
Tom Fifield |
Bug Description
https:/
337
338 # Note: Put before both ratelimit and auth in the pipeline.
339 [filter:bulk]
340 use = egg:swift#bulk
341 # max_containers_
342 # max_failed_files = 1000
38
39 class Bulk(object):
40 """
41 Middleware that will do many operations on a single request.
42
43 Extract Archive:
44
45 Expand tar files into a swift account. Request must be a PUT with the
46 header X-Extract-Archive specifying the format of archive file. Accepted
47 formats are tar, tar.gz, and tar.bz2.
48
49 For a PUT to the following url:
50
51 /v1/AUTH_
52
53 UPLOAD_PATH is where the files will be expanded to. UPLOAD_PATH can be a
54 container, a pseudo-directory within a container, or an empty string. The
55 destination of a file in the archive will be built as follows:
56
57 /v1/AUTH_
58
59 Where FILE_PATH is the file name from the listing in the tar file.
60
61 If the UPLOAD_PATH is empty string, containers will be auto created
62 accordingly and files in the tar that would not map to any container (files
63 in the base directory) will be ignored.
64
65 Only regular files will be uploaded. Empty directories, symlinks, etc will
66 not be uploaded.
67
68 If all valid files were uploaded successfully will return an HTTPCreated
69 response. If any files failed to be created will return an HTTPBadGateway
70 response. In both cases the response body is a json dictionary specifying
71 in the number of files successfully uploaded and a list of the files that
72 failed.
73
74 Bulk Delete:
75
76 Will delete multiple files from their account with a single request.
77 Responds to DELETE requests with a header 'X-Bulk-Delete: true_value'.
78 The body of the DELETE request will be a newline separated list of files
79 to delete. The files listed must be URL encoded and in the form:
80
81 /container_
82
83 If all files were successfully deleted (or did not exist) will return an
84 HTTPOk. If any files failed to delete will return an HTTPBadGateway. In
85 both cases the response body is a json dictionary specifying in the number
86 of files successfully deleted, not found, and a list of the files that
87 failed.
88 """
Changed in openstack-manuals: | |
milestone: | none → grizzly |
tags: | added: swift |
Changed in openstack-manuals: | |
assignee: | nobody → Tom Fifield (fifieldt) |
status: | Confirmed → In Progress |
patch was merged