swift 2.23.2__py3-none-any.whl → 2.35.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. swift/__init__.py +29 -50
  2. swift/account/auditor.py +21 -118
  3. swift/account/backend.py +33 -28
  4. swift/account/reaper.py +37 -28
  5. swift/account/replicator.py +22 -0
  6. swift/account/server.py +60 -26
  7. swift/account/utils.py +28 -11
  8. swift-2.23.2.data/scripts/swift-account-audit → swift/cli/account_audit.py +23 -13
  9. swift-2.23.2.data/scripts/swift-config → swift/cli/config.py +2 -2
  10. swift/cli/container_deleter.py +5 -11
  11. swift-2.23.2.data/scripts/swift-dispersion-populate → swift/cli/dispersion_populate.py +8 -7
  12. swift/cli/dispersion_report.py +10 -9
  13. swift-2.23.2.data/scripts/swift-drive-audit → swift/cli/drive_audit.py +63 -21
  14. swift/cli/form_signature.py +3 -7
  15. swift-2.23.2.data/scripts/swift-get-nodes → swift/cli/get_nodes.py +8 -2
  16. swift/cli/info.py +183 -29
  17. swift/cli/manage_shard_ranges.py +708 -37
  18. swift-2.23.2.data/scripts/swift-oldies → swift/cli/oldies.py +25 -14
  19. swift-2.23.2.data/scripts/swift-orphans → swift/cli/orphans.py +7 -3
  20. swift/cli/recon.py +196 -67
  21. swift-2.23.2.data/scripts/swift-recon-cron → swift/cli/recon_cron.py +17 -20
  22. swift-2.23.2.data/scripts/swift-reconciler-enqueue → swift/cli/reconciler_enqueue.py +2 -3
  23. swift/cli/relinker.py +807 -126
  24. swift/cli/reload.py +135 -0
  25. swift/cli/ringbuilder.py +217 -20
  26. swift/cli/ringcomposer.py +0 -1
  27. swift/cli/shard-info.py +4 -3
  28. swift/common/base_storage_server.py +9 -20
  29. swift/common/bufferedhttp.py +48 -74
  30. swift/common/constraints.py +20 -15
  31. swift/common/container_sync_realms.py +9 -11
  32. swift/common/daemon.py +25 -8
  33. swift/common/db.py +198 -127
  34. swift/common/db_auditor.py +168 -0
  35. swift/common/db_replicator.py +95 -55
  36. swift/common/digest.py +141 -0
  37. swift/common/direct_client.py +144 -33
  38. swift/common/error_limiter.py +93 -0
  39. swift/common/exceptions.py +25 -1
  40. swift/common/header_key_dict.py +2 -9
  41. swift/common/http_protocol.py +373 -0
  42. swift/common/internal_client.py +129 -59
  43. swift/common/linkat.py +3 -4
  44. swift/common/manager.py +284 -67
  45. swift/common/memcached.py +396 -147
  46. swift/common/middleware/__init__.py +4 -0
  47. swift/common/middleware/account_quotas.py +211 -46
  48. swift/common/middleware/acl.py +3 -8
  49. swift/common/middleware/backend_ratelimit.py +230 -0
  50. swift/common/middleware/bulk.py +22 -34
  51. swift/common/middleware/catch_errors.py +1 -3
  52. swift/common/middleware/cname_lookup.py +6 -11
  53. swift/common/middleware/container_quotas.py +1 -1
  54. swift/common/middleware/container_sync.py +39 -17
  55. swift/common/middleware/copy.py +12 -0
  56. swift/common/middleware/crossdomain.py +22 -9
  57. swift/common/middleware/crypto/__init__.py +2 -1
  58. swift/common/middleware/crypto/crypto_utils.py +11 -15
  59. swift/common/middleware/crypto/decrypter.py +28 -11
  60. swift/common/middleware/crypto/encrypter.py +12 -17
  61. swift/common/middleware/crypto/keymaster.py +8 -15
  62. swift/common/middleware/crypto/kms_keymaster.py +2 -1
  63. swift/common/middleware/dlo.py +15 -11
  64. swift/common/middleware/domain_remap.py +5 -4
  65. swift/common/middleware/etag_quoter.py +128 -0
  66. swift/common/middleware/formpost.py +73 -70
  67. swift/common/middleware/gatekeeper.py +8 -1
  68. swift/common/middleware/keystoneauth.py +33 -3
  69. swift/common/middleware/list_endpoints.py +4 -4
  70. swift/common/middleware/listing_formats.py +85 -49
  71. swift/common/middleware/memcache.py +4 -81
  72. swift/common/middleware/name_check.py +3 -2
  73. swift/common/middleware/proxy_logging.py +160 -92
  74. swift/common/middleware/ratelimit.py +17 -10
  75. swift/common/middleware/read_only.py +6 -4
  76. swift/common/middleware/recon.py +59 -22
  77. swift/common/middleware/s3api/acl_handlers.py +25 -3
  78. swift/common/middleware/s3api/acl_utils.py +6 -1
  79. swift/common/middleware/s3api/controllers/__init__.py +6 -0
  80. swift/common/middleware/s3api/controllers/acl.py +3 -2
  81. swift/common/middleware/s3api/controllers/bucket.py +242 -137
  82. swift/common/middleware/s3api/controllers/logging.py +2 -2
  83. swift/common/middleware/s3api/controllers/multi_delete.py +43 -20
  84. swift/common/middleware/s3api/controllers/multi_upload.py +219 -133
  85. swift/common/middleware/s3api/controllers/obj.py +112 -8
  86. swift/common/middleware/s3api/controllers/object_lock.py +44 -0
  87. swift/common/middleware/s3api/controllers/s3_acl.py +2 -2
  88. swift/common/middleware/s3api/controllers/tagging.py +57 -0
  89. swift/common/middleware/s3api/controllers/versioning.py +36 -7
  90. swift/common/middleware/s3api/etree.py +22 -9
  91. swift/common/middleware/s3api/exception.py +0 -4
  92. swift/common/middleware/s3api/s3api.py +113 -41
  93. swift/common/middleware/s3api/s3request.py +384 -218
  94. swift/common/middleware/s3api/s3response.py +126 -23
  95. swift/common/middleware/s3api/s3token.py +16 -17
  96. swift/common/middleware/s3api/schema/delete.rng +1 -1
  97. swift/common/middleware/s3api/subresource.py +7 -10
  98. swift/common/middleware/s3api/utils.py +27 -10
  99. swift/common/middleware/slo.py +665 -358
  100. swift/common/middleware/staticweb.py +64 -37
  101. swift/common/middleware/symlink.py +52 -19
  102. swift/common/middleware/tempauth.py +76 -58
  103. swift/common/middleware/tempurl.py +192 -174
  104. swift/common/middleware/versioned_writes/__init__.py +51 -0
  105. swift/common/middleware/{versioned_writes.py → versioned_writes/legacy.py} +27 -26
  106. swift/common/middleware/versioned_writes/object_versioning.py +1482 -0
  107. swift/common/middleware/x_profile/exceptions.py +1 -4
  108. swift/common/middleware/x_profile/html_viewer.py +18 -19
  109. swift/common/middleware/x_profile/profile_model.py +1 -2
  110. swift/common/middleware/xprofile.py +10 -10
  111. swift-2.23.2.data/scripts/swift-container-server → swift/common/recon.py +13 -8
  112. swift/common/registry.py +147 -0
  113. swift/common/request_helpers.py +324 -57
  114. swift/common/ring/builder.py +67 -25
  115. swift/common/ring/composite_builder.py +1 -1
  116. swift/common/ring/ring.py +177 -51
  117. swift/common/ring/utils.py +1 -1
  118. swift/common/splice.py +10 -6
  119. swift/common/statsd_client.py +205 -0
  120. swift/common/storage_policy.py +49 -44
  121. swift/common/swob.py +86 -102
  122. swift/common/{utils.py → utils/__init__.py} +2191 -2762
  123. swift/common/utils/base.py +131 -0
  124. swift/common/utils/config.py +433 -0
  125. swift/common/utils/ipaddrs.py +256 -0
  126. swift/common/utils/libc.py +345 -0
  127. swift/common/utils/logs.py +859 -0
  128. swift/common/utils/timestamp.py +412 -0
  129. swift/common/wsgi.py +555 -536
  130. swift/container/auditor.py +14 -100
  131. swift/container/backend.py +552 -227
  132. swift/container/reconciler.py +126 -37
  133. swift/container/replicator.py +96 -22
  134. swift/container/server.py +397 -176
  135. swift/container/sharder.py +1580 -639
  136. swift/container/sync.py +94 -88
  137. swift/container/updater.py +53 -32
  138. swift/obj/auditor.py +153 -35
  139. swift/obj/diskfile.py +466 -217
  140. swift/obj/expirer.py +406 -124
  141. swift/obj/mem_diskfile.py +7 -4
  142. swift/obj/mem_server.py +1 -0
  143. swift/obj/reconstructor.py +523 -262
  144. swift/obj/replicator.py +249 -188
  145. swift/obj/server.py +213 -122
  146. swift/obj/ssync_receiver.py +145 -85
  147. swift/obj/ssync_sender.py +113 -54
  148. swift/obj/updater.py +653 -139
  149. swift/obj/watchers/__init__.py +0 -0
  150. swift/obj/watchers/dark_data.py +213 -0
  151. swift/proxy/controllers/account.py +11 -11
  152. swift/proxy/controllers/base.py +848 -604
  153. swift/proxy/controllers/container.py +452 -86
  154. swift/proxy/controllers/info.py +3 -2
  155. swift/proxy/controllers/obj.py +1009 -490
  156. swift/proxy/server.py +185 -112
  157. swift-2.35.0.dist-info/AUTHORS +501 -0
  158. swift-2.35.0.dist-info/LICENSE +202 -0
  159. {swift-2.23.2.dist-info → swift-2.35.0.dist-info}/METADATA +52 -61
  160. swift-2.35.0.dist-info/RECORD +201 -0
  161. {swift-2.23.2.dist-info → swift-2.35.0.dist-info}/WHEEL +1 -1
  162. {swift-2.23.2.dist-info → swift-2.35.0.dist-info}/entry_points.txt +43 -0
  163. swift-2.35.0.dist-info/pbr.json +1 -0
  164. swift/locale/de/LC_MESSAGES/swift.po +0 -1216
  165. swift/locale/en_GB/LC_MESSAGES/swift.po +0 -1207
  166. swift/locale/es/LC_MESSAGES/swift.po +0 -1085
  167. swift/locale/fr/LC_MESSAGES/swift.po +0 -909
  168. swift/locale/it/LC_MESSAGES/swift.po +0 -894
  169. swift/locale/ja/LC_MESSAGES/swift.po +0 -965
  170. swift/locale/ko_KR/LC_MESSAGES/swift.po +0 -964
  171. swift/locale/pt_BR/LC_MESSAGES/swift.po +0 -881
  172. swift/locale/ru/LC_MESSAGES/swift.po +0 -891
  173. swift/locale/tr_TR/LC_MESSAGES/swift.po +0 -832
  174. swift/locale/zh_CN/LC_MESSAGES/swift.po +0 -833
  175. swift/locale/zh_TW/LC_MESSAGES/swift.po +0 -838
  176. swift-2.23.2.data/scripts/swift-account-auditor +0 -23
  177. swift-2.23.2.data/scripts/swift-account-info +0 -51
  178. swift-2.23.2.data/scripts/swift-account-reaper +0 -23
  179. swift-2.23.2.data/scripts/swift-account-replicator +0 -34
  180. swift-2.23.2.data/scripts/swift-account-server +0 -23
  181. swift-2.23.2.data/scripts/swift-container-auditor +0 -23
  182. swift-2.23.2.data/scripts/swift-container-info +0 -51
  183. swift-2.23.2.data/scripts/swift-container-reconciler +0 -21
  184. swift-2.23.2.data/scripts/swift-container-replicator +0 -34
  185. swift-2.23.2.data/scripts/swift-container-sharder +0 -33
  186. swift-2.23.2.data/scripts/swift-container-sync +0 -23
  187. swift-2.23.2.data/scripts/swift-container-updater +0 -23
  188. swift-2.23.2.data/scripts/swift-dispersion-report +0 -24
  189. swift-2.23.2.data/scripts/swift-form-signature +0 -20
  190. swift-2.23.2.data/scripts/swift-init +0 -119
  191. swift-2.23.2.data/scripts/swift-object-auditor +0 -29
  192. swift-2.23.2.data/scripts/swift-object-expirer +0 -33
  193. swift-2.23.2.data/scripts/swift-object-info +0 -60
  194. swift-2.23.2.data/scripts/swift-object-reconstructor +0 -33
  195. swift-2.23.2.data/scripts/swift-object-relinker +0 -41
  196. swift-2.23.2.data/scripts/swift-object-replicator +0 -37
  197. swift-2.23.2.data/scripts/swift-object-server +0 -27
  198. swift-2.23.2.data/scripts/swift-object-updater +0 -23
  199. swift-2.23.2.data/scripts/swift-proxy-server +0 -23
  200. swift-2.23.2.data/scripts/swift-recon +0 -24
  201. swift-2.23.2.data/scripts/swift-ring-builder +0 -24
  202. swift-2.23.2.data/scripts/swift-ring-builder-analyzer +0 -22
  203. swift-2.23.2.data/scripts/swift-ring-composer +0 -22
  204. swift-2.23.2.dist-info/DESCRIPTION.rst +0 -166
  205. swift-2.23.2.dist-info/RECORD +0 -220
  206. swift-2.23.2.dist-info/metadata.json +0 -1
  207. swift-2.23.2.dist-info/pbr.json +0 -1
  208. {swift-2.23.2.dist-info → swift-2.35.0.dist-info}/top_level.txt +0 -0
@@ -1,33 +0,0 @@
1
- #!python
2
- # Copyright (c) 2010-2012 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- from swift.obj.reconstructor import ObjectReconstructor
18
- from swift.common.utils import parse_options
19
- from swift.common.daemon import run_daemon
20
- from optparse import OptionParser
21
-
22
- if __name__ == '__main__':
23
- parser = OptionParser("%prog CONFIG [options]")
24
- parser.add_option('-d', '--devices',
25
- help='Reconstruct only given devices. '
26
- 'Comma-separated list. '
27
- 'Only has effect if --once is used.')
28
- parser.add_option('-p', '--partitions',
29
- help='Reconstruct only given partitions. '
30
- 'Comma-separated list. '
31
- 'Only has effect if --once is used.')
32
- conf_file, options = parse_options(parser=parser, once=True)
33
- run_daemon(ObjectReconstructor, conf_file, **options)
@@ -1,41 +0,0 @@
1
- #!python
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
- # implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
-
17
- import argparse
18
- import sys
19
-
20
- from swift.cli.relinker import main
21
-
22
-
23
- if __name__ == '__main__':
24
- parser = argparse.ArgumentParser(
25
- description='Relink and cleanup objects to increase partition power')
26
- parser.add_argument('action', choices=['relink', 'cleanup'])
27
- parser.add_argument('--swift-dir', default='/etc/swift',
28
- dest='swift_dir', help='Path to swift directory')
29
- parser.add_argument('--devices', default='/srv/node',
30
- dest='devices', help='Path to swift device directory')
31
- parser.add_argument('--skip-mount-check', default=False,
32
- help='Don\'t test if disk is mounted',
33
- action="store_true", dest='skip_mount_check')
34
- parser.add_argument('--logfile', default=None,
35
- dest='logfile', help='Set log file name')
36
- parser.add_argument('--debug', default=False, action='store_true',
37
- help='Enable debug mode')
38
-
39
- args = parser.parse_args()
40
-
41
- sys.exit(main(args))
@@ -1,37 +0,0 @@
1
- #!python
2
- # Copyright (c) 2010-2012 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- from swift.obj.replicator import ObjectReplicator
18
- from swift.common.utils import parse_options
19
- from swift.common.daemon import run_daemon
20
- from optparse import OptionParser
21
-
22
- if __name__ == '__main__':
23
- parser = OptionParser("%prog CONFIG [options]")
24
- parser.add_option('-d', '--devices',
25
- help='Replicate only given devices. '
26
- 'Comma-separated list. '
27
- 'Only has effect if --once is used.')
28
- parser.add_option('-p', '--partitions',
29
- help='Replicate only given partitions. '
30
- 'Comma-separated list. '
31
- 'Only has effect if --once is used.')
32
- parser.add_option('-i', '--policies',
33
- help='Replicate only given policy indices. '
34
- 'Comma-separated list. '
35
- 'Only has effect if --once is used.')
36
- conf_file, options = parse_options(parser=parser, once=True)
37
- run_daemon(ObjectReplicator, conf_file, **options)
@@ -1,27 +0,0 @@
1
- #!python
2
- # Copyright (c) 2010-2012 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- import sys
18
- from swift.common.utils import parse_options
19
- from swift.common.wsgi import run_wsgi
20
- from swift.obj import server
21
-
22
-
23
- if __name__ == '__main__':
24
- conf_file, options = parse_options()
25
- sys.exit(run_wsgi(conf_file, 'object-server',
26
- global_conf_callback=server.global_conf_callback,
27
- **options))
@@ -1,23 +0,0 @@
1
- #!python
2
- # Copyright (c) 2010-2012 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- from swift.obj.updater import ObjectUpdater
18
- from swift.common.utils import parse_options
19
- from swift.common.daemon import run_daemon
20
-
21
- if __name__ == '__main__':
22
- conf_file, options = parse_options(once=True)
23
- run_daemon(ObjectUpdater, conf_file, **options)
@@ -1,23 +0,0 @@
1
- #!python
2
- # Copyright (c) 2010-2012 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- import sys
18
- from swift.common.utils import parse_options
19
- from swift.common.wsgi import run_wsgi
20
-
21
- if __name__ == '__main__':
22
- conf_file, options = parse_options()
23
- sys.exit(run_wsgi(conf_file, 'proxy-server', **options))
@@ -1,24 +0,0 @@
1
- #!python
2
- # Copyright (c) 2014 Christian Schwede <christian.schwede@enovance.com>
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
-
18
- import sys
19
-
20
- from swift.cli.recon import main
21
-
22
-
23
- if __name__ == "__main__":
24
- sys.exit(main())
@@ -1,24 +0,0 @@
1
- #!python
2
- # Copyright (c) 2014 Christian Schwede <christian.schwede@enovance.com>
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
-
18
- import sys
19
-
20
- from swift.cli.ringbuilder import main
21
-
22
-
23
- if __name__ == "__main__":
24
- sys.exit(main())
@@ -1,22 +0,0 @@
1
- #!python
2
- # Copyright (c) 2015 Samuel Merritt <sam@swiftstack.com>
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- import sys
18
- from swift.cli.ring_builder_analyzer import main
19
-
20
-
21
- if __name__ == "__main__":
22
- sys.exit(main())
@@ -1,22 +0,0 @@
1
- #!python
2
- # Copyright (c) 2017 OpenStack Foundation
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
- # implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
- import sys
17
-
18
- from swift.cli.ringcomposer import main
19
-
20
-
21
- if __name__ == "__main__":
22
- sys.exit(main())
@@ -1,166 +0,0 @@
1
- ========================
2
- Team and repository tags
3
- ========================
4
-
5
- .. image:: https://governance.openstack.org/tc/badges/swift.svg
6
- :target: https://governance.openstack.org/tc/reference/tags/index.html
7
-
8
- .. Change things from this point on
9
-
10
- Swift
11
- =====
12
-
13
- A distributed object storage system designed to scale from a single
14
- machine to thousands of servers. Swift is optimized for multi-tenancy
15
- and high concurrency. Swift is ideal for backups, web and mobile
16
- content, and any other unstructured data that can grow without bound.
17
-
18
- Swift provides a simple, REST-based API fully documented at
19
- https://docs.openstack.org/swift/latest/.
20
-
21
- Swift was originally developed as the basis for Rackspace's Cloud Files
22
- and was open-sourced in 2010 as part of the OpenStack project. It has
23
- since grown to include contributions from many companies and has spawned
24
- a thriving ecosystem of 3rd party tools. Swift's contributors are listed
25
- in the AUTHORS file.
26
-
27
- Docs
28
- ----
29
-
30
- To build documentation run::
31
-
32
- pip install -r requirements.txt -r doc/requirements.txt
33
- sphinx-build -W -b html doc/source doc/build/html
34
-
35
- and then browse to doc/build/html/index.html. These docs are auto-generated
36
- after every commit and available online at
37
- https://docs.openstack.org/swift/latest/.
38
-
39
- For Developers
40
- --------------
41
-
42
- Getting Started
43
- ~~~~~~~~~~~~~~~
44
-
45
- Swift is part of OpenStack and follows the code contribution, review, and
46
- testing processes common to all OpenStack projects.
47
-
48
- If you would like to start contributing, check out these
49
- `notes <CONTRIBUTING.rst>`__ to help you get started.
50
-
51
- The best place to get started is the
52
- `"SAIO - Swift All In One" <https://docs.openstack.org/swift/latest/development_saio.html>`__.
53
- This document will walk you through setting up a development cluster of
54
- Swift in a VM. The SAIO environment is ideal for running small-scale
55
- tests against Swift and trying out new features and bug fixes.
56
-
57
- Tests
58
- ~~~~~
59
-
60
- There are three types of tests included in Swift's source tree.
61
-
62
- #. Unit tests
63
- #. Functional tests
64
- #. Probe tests
65
-
66
- Unit tests check that small sections of the code behave properly. For example,
67
- a unit test may test a single function to ensure that various input gives the
68
- expected output. This validates that the code is correct and regressions are
69
- not introduced.
70
-
71
- Functional tests check that the client API is working as expected. These can
72
- be run against any endpoint claiming to support the Swift API (although some
73
- tests require multiple accounts with different privilege levels). These are
74
- "black box" tests that ensure that client apps written against Swift will
75
- continue to work.
76
-
77
- Probe tests are "white box" tests that validate the internal workings of a
78
- Swift cluster. They are written to work against the
79
- `"SAIO - Swift All In One" <https://docs.openstack.org/swift/latest/development_saio.html>`__
80
- dev environment. For example, a probe test may create an object, delete one
81
- replica, and ensure that the background consistency processes find and correct
82
- the error.
83
-
84
- You can run unit tests with ``.unittests``, functional tests with
85
- ``.functests``, and probe tests with ``.probetests``. There is an
86
- additional ``.alltests`` script that wraps the other three.
87
-
88
- To fully run the tests, the target environment must use a filesystem that
89
- supports large xattrs. XFS is strongly recommended. For unit tests and in-
90
- process functional tests, either mount ``/tmp`` with XFS or provide another
91
- XFS filesystem via the ``TMPDIR`` environment variable. Without this setting,
92
- tests should still pass, but a very large number will be skipped.
93
-
94
- Code Organization
95
- ~~~~~~~~~~~~~~~~~
96
-
97
- - bin/: Executable scripts that are the processes run by the deployer
98
- - doc/: Documentation
99
- - etc/: Sample config files
100
- - examples/: Config snippets used in the docs
101
- - swift/: Core code
102
-
103
- - account/: account server
104
- - cli/: code that backs some of the CLI tools in bin/
105
- - common/: code shared by different modules
106
-
107
- - middleware/: "standard", officially-supported middleware
108
- - ring/: code implementing Swift's ring
109
-
110
- - container/: container server
111
- - locale/: internationalization (translation) data
112
- - obj/: object server
113
- - proxy/: proxy server
114
-
115
- - test/: Unit, functional, and probe tests
116
-
117
- Data Flow
118
- ~~~~~~~~~
119
-
120
- Swift is a WSGI application and uses eventlet's WSGI server. After the
121
- processes are running, the entry point for new requests is the
122
- ``Application`` class in ``swift/proxy/server.py``. From there, a
123
- controller is chosen, and the request is processed. The proxy may choose
124
- to forward the request to a back-end server. For example, the entry
125
- point for requests to the object server is the ``ObjectController``
126
- class in ``swift/obj/server.py``.
127
-
128
- For Deployers
129
- -------------
130
-
131
- Deployer docs are also available at
132
- https://docs.openstack.org/swift/latest/. A good starting point is at
133
- https://docs.openstack.org/swift/latest/deployment_guide.html
134
- There is an `ops runbook <https://docs.openstack.org/swift/latest/ops_runbook/index.html>`__
135
- that gives information about how to diagnose and troubleshoot common issues
136
- when running a Swift cluster.
137
-
138
- You can run functional tests against a Swift cluster with
139
- ``.functests``. These functional tests require ``/etc/swift/test.conf``
140
- to run. A sample config file can be found in this source tree in
141
- ``test/sample.conf``.
142
-
143
- For Client Apps
144
- ---------------
145
-
146
- For client applications, official Python language bindings are provided
147
- at https://github.com/openstack/python-swiftclient.
148
-
149
- Complete API documentation at
150
- https://docs.openstack.org/api-ref/object-store/
151
-
152
- There is a large ecosystem of applications and libraries that support and
153
- work with OpenStack Swift. Several are listed on the
154
- `associated projects <https://docs.openstack.org/swift/latest/associated_projects.html>`__
155
- page.
156
-
157
- --------------
158
-
159
- For more information come hang out in #openstack-swift on freenode.
160
-
161
- Thanks,
162
-
163
- The Swift Development Team
164
-
165
-
166
-