swift 2.32.0__py2.py3-none-any.whl → 2.34.0__py2.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 (127) hide show
  1. swift/account/auditor.py +11 -0
  2. swift/account/reaper.py +11 -1
  3. swift/account/replicator.py +22 -0
  4. swift/account/server.py +13 -12
  5. swift-2.32.0.data/scripts/swift-account-audit → swift/cli/account_audit.py +6 -2
  6. swift-2.32.0.data/scripts/swift-config → swift/cli/config.py +1 -1
  7. swift-2.32.0.data/scripts/swift-dispersion-populate → swift/cli/dispersion_populate.py +6 -2
  8. swift-2.32.0.data/scripts/swift-drive-audit → swift/cli/drive_audit.py +12 -3
  9. swift-2.32.0.data/scripts/swift-get-nodes → swift/cli/get_nodes.py +6 -2
  10. swift/cli/info.py +131 -3
  11. swift-2.32.0.data/scripts/swift-oldies → swift/cli/oldies.py +6 -3
  12. swift-2.32.0.data/scripts/swift-orphans → swift/cli/orphans.py +7 -2
  13. swift-2.32.0.data/scripts/swift-recon-cron → swift/cli/recon_cron.py +9 -18
  14. swift-2.32.0.data/scripts/swift-reconciler-enqueue → swift/cli/reconciler_enqueue.py +2 -3
  15. swift/cli/relinker.py +1 -1
  16. swift/cli/reload.py +141 -0
  17. swift/cli/ringbuilder.py +24 -0
  18. swift/common/daemon.py +12 -2
  19. swift/common/db.py +14 -9
  20. swift/common/db_auditor.py +2 -2
  21. swift/common/db_replicator.py +6 -0
  22. swift/common/exceptions.py +12 -0
  23. swift/common/http_protocol.py +76 -3
  24. swift/common/manager.py +120 -5
  25. swift/common/memcached.py +24 -25
  26. swift/common/middleware/account_quotas.py +144 -43
  27. swift/common/middleware/backend_ratelimit.py +166 -24
  28. swift/common/middleware/catch_errors.py +1 -3
  29. swift/common/middleware/cname_lookup.py +3 -5
  30. swift/common/middleware/container_sync.py +6 -10
  31. swift/common/middleware/crypto/crypto_utils.py +4 -5
  32. swift/common/middleware/crypto/decrypter.py +4 -5
  33. swift/common/middleware/crypto/kms_keymaster.py +2 -1
  34. swift/common/middleware/proxy_logging.py +57 -43
  35. swift/common/middleware/ratelimit.py +6 -7
  36. swift/common/middleware/recon.py +6 -7
  37. swift/common/middleware/s3api/acl_handlers.py +10 -1
  38. swift/common/middleware/s3api/controllers/__init__.py +3 -0
  39. swift/common/middleware/s3api/controllers/acl.py +3 -2
  40. swift/common/middleware/s3api/controllers/logging.py +2 -2
  41. swift/common/middleware/s3api/controllers/multi_upload.py +31 -15
  42. swift/common/middleware/s3api/controllers/obj.py +20 -1
  43. swift/common/middleware/s3api/controllers/object_lock.py +44 -0
  44. swift/common/middleware/s3api/s3api.py +6 -0
  45. swift/common/middleware/s3api/s3request.py +190 -74
  46. swift/common/middleware/s3api/s3response.py +48 -8
  47. swift/common/middleware/s3api/s3token.py +2 -2
  48. swift/common/middleware/s3api/utils.py +2 -1
  49. swift/common/middleware/slo.py +508 -310
  50. swift/common/middleware/staticweb.py +45 -14
  51. swift/common/middleware/tempauth.py +6 -4
  52. swift/common/middleware/tempurl.py +134 -93
  53. swift/common/middleware/x_profile/exceptions.py +1 -4
  54. swift/common/middleware/x_profile/html_viewer.py +9 -10
  55. swift/common/middleware/x_profile/profile_model.py +1 -2
  56. swift/common/middleware/xprofile.py +1 -2
  57. swift/common/request_helpers.py +101 -8
  58. swift/common/statsd_client.py +207 -0
  59. swift/common/storage_policy.py +1 -1
  60. swift/common/swob.py +5 -2
  61. swift/common/utils/__init__.py +331 -1774
  62. swift/common/utils/base.py +138 -0
  63. swift/common/utils/config.py +443 -0
  64. swift/common/utils/logs.py +999 -0
  65. swift/common/utils/timestamp.py +23 -2
  66. swift/common/wsgi.py +19 -3
  67. swift/container/auditor.py +11 -0
  68. swift/container/backend.py +136 -31
  69. swift/container/reconciler.py +11 -2
  70. swift/container/replicator.py +64 -7
  71. swift/container/server.py +276 -146
  72. swift/container/sharder.py +86 -42
  73. swift/container/sync.py +11 -1
  74. swift/container/updater.py +12 -2
  75. swift/obj/auditor.py +20 -3
  76. swift/obj/diskfile.py +63 -25
  77. swift/obj/expirer.py +154 -47
  78. swift/obj/mem_diskfile.py +2 -1
  79. swift/obj/mem_server.py +1 -0
  80. swift/obj/reconstructor.py +28 -4
  81. swift/obj/replicator.py +63 -24
  82. swift/obj/server.py +76 -59
  83. swift/obj/updater.py +12 -2
  84. swift/obj/watchers/dark_data.py +72 -34
  85. swift/proxy/controllers/account.py +3 -2
  86. swift/proxy/controllers/base.py +254 -148
  87. swift/proxy/controllers/container.py +274 -289
  88. swift/proxy/controllers/obj.py +120 -166
  89. swift/proxy/server.py +17 -13
  90. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/AUTHORS +14 -4
  91. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/METADATA +9 -7
  92. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/RECORD +97 -120
  93. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/entry_points.txt +39 -0
  94. swift-2.34.0.dist-info/pbr.json +1 -0
  95. swift-2.32.0.data/scripts/swift-account-auditor +0 -23
  96. swift-2.32.0.data/scripts/swift-account-info +0 -52
  97. swift-2.32.0.data/scripts/swift-account-reaper +0 -23
  98. swift-2.32.0.data/scripts/swift-account-replicator +0 -34
  99. swift-2.32.0.data/scripts/swift-account-server +0 -23
  100. swift-2.32.0.data/scripts/swift-container-auditor +0 -23
  101. swift-2.32.0.data/scripts/swift-container-info +0 -56
  102. swift-2.32.0.data/scripts/swift-container-reconciler +0 -21
  103. swift-2.32.0.data/scripts/swift-container-replicator +0 -34
  104. swift-2.32.0.data/scripts/swift-container-server +0 -23
  105. swift-2.32.0.data/scripts/swift-container-sharder +0 -37
  106. swift-2.32.0.data/scripts/swift-container-sync +0 -23
  107. swift-2.32.0.data/scripts/swift-container-updater +0 -23
  108. swift-2.32.0.data/scripts/swift-dispersion-report +0 -24
  109. swift-2.32.0.data/scripts/swift-form-signature +0 -20
  110. swift-2.32.0.data/scripts/swift-init +0 -119
  111. swift-2.32.0.data/scripts/swift-object-auditor +0 -29
  112. swift-2.32.0.data/scripts/swift-object-expirer +0 -33
  113. swift-2.32.0.data/scripts/swift-object-info +0 -60
  114. swift-2.32.0.data/scripts/swift-object-reconstructor +0 -33
  115. swift-2.32.0.data/scripts/swift-object-relinker +0 -23
  116. swift-2.32.0.data/scripts/swift-object-replicator +0 -37
  117. swift-2.32.0.data/scripts/swift-object-server +0 -27
  118. swift-2.32.0.data/scripts/swift-object-updater +0 -23
  119. swift-2.32.0.data/scripts/swift-proxy-server +0 -23
  120. swift-2.32.0.data/scripts/swift-recon +0 -24
  121. swift-2.32.0.data/scripts/swift-ring-builder +0 -37
  122. swift-2.32.0.data/scripts/swift-ring-builder-analyzer +0 -22
  123. swift-2.32.0.data/scripts/swift-ring-composer +0 -22
  124. swift-2.32.0.dist-info/pbr.json +0 -1
  125. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/LICENSE +0 -0
  126. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/WHEEL +0 -0
  127. {swift-2.32.0.dist-info → swift-2.34.0.dist-info}/top_level.txt +0 -0
@@ -1,60 +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 codecs
18
- import sys
19
- from optparse import OptionParser
20
-
21
- import six
22
-
23
- from swift.common.storage_policy import reload_storage_policies
24
- from swift.common.utils import set_swift_dir
25
- from swift.cli.info import print_obj, InfoSystemExit
26
-
27
-
28
- if __name__ == '__main__':
29
- if not six.PY2:
30
- # Make stdout able to write escaped bytes
31
- sys.stdout = codecs.getwriter("utf-8")(
32
- sys.stdout.detach(), errors='surrogateescape')
33
-
34
- parser = OptionParser('%prog [options] OBJECT_FILE')
35
- parser.add_option(
36
- '-n', '--no-check-etag', default=True,
37
- action="store_false", dest="check_etag",
38
- help="Don't verify file contents against stored etag")
39
- parser.add_option(
40
- '-d', '--swift-dir', default='/etc/swift', dest='swift_dir',
41
- help="Pass location of swift directory")
42
- parser.add_option(
43
- '--drop-prefixes', default=False, action="store_true",
44
- help="When outputting metadata, drop the per-section common prefixes")
45
- parser.add_option(
46
- '-P', '--policy-name', dest='policy_name',
47
- help="Specify storage policy name")
48
-
49
- options, args = parser.parse_args()
50
-
51
- if len(args) != 1:
52
- sys.exit(parser.print_help())
53
-
54
- if set_swift_dir(options.swift_dir):
55
- reload_storage_policies()
56
-
57
- try:
58
- print_obj(*args, **vars(options))
59
- except InfoSystemExit:
60
- sys.exit(1)
@@ -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,23 +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 sys
18
-
19
- from swift.cli.relinker import main
20
-
21
-
22
- if __name__ == '__main__':
23
- sys.exit(main(sys.argv[1:]))
@@ -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(test_config=True)
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(test_config=True)
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,37 +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
- import traceback
20
-
21
- # We exit code 1 on WARNING statuses, 2 on ERROR. This means we need
22
- # to handle any uncaught exceptions by printing the usual backtrace,
23
- # but then exiting 2 (not 1 as is usual for a python
24
- # exception).
25
-
26
-
27
- def exit_with_status_two(tp, val, tb):
28
- traceback.print_exception(tp, val, tb)
29
- sys.exit(2)
30
-
31
-
32
- sys.excepthook = exit_with_status_two
33
-
34
- from swift.cli.ringbuilder import main
35
-
36
- if __name__ == "__main__":
37
- 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 +0,0 @@
1
- {"git_version": "191b627b8", "is_release": true}
File without changes