)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"19a3c15a2d9905e0ab1064482ec5b5e4f636f3d2","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"container storage-policy modification operator tool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Originally, the storage policy of a container could only be set at container creation time. This aims to change that by introducing a dev tool that allows the operators/admins of a"},{"line_number":10,"context_line":"cluster to change the storage policy of an existing container/bucket."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch allows resellers to change the storage policy of a container by sending a POST container request with an \u0027X-storage-policy\u0027 header specified"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"553d9d92_8653dc27","line":9,"updated":"2024-07-18 23:24:52.000000000","message":"This commit message reads great! But openstack can be a little thingy about structure. The first line should be no longer then 50 chars (or thereabouts, and yours is great). Then the next lines should be wrapped at 72 character: https://wiki.openstack.org/wiki/GitCommitMessages#Summary_of_Git_commit_message_structure","commit_id":"8eb73af87d77fda1b30cd10260dd2a7d79a460bc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"19a3c15a2d9905e0ab1064482ec5b5e4f636f3d2","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"container storage-policy modification operator tool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Originally, the storage policy of a container could only be set at container creation time. This aims to change that by introducing a dev tool that allows the operators/admins of a"},{"line_number":10,"context_line":"cluster to change the storage policy of an existing container/bucket."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch allows resellers to change the storage policy of a container by sending a POST container request with an \u0027X-storage-policy\u0027 header specified"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"d4ac0a3c_3f10d0c0","line":9,"range":{"start_line":9,"start_character":134,"end_line":9,"end_character":137},"updated":"2024-07-18 23:24:52.000000000","message":"maybe drop this.\n\n\"by introductin a tool that allows the operators/admins...\"","commit_id":"8eb73af87d77fda1b30cd10260dd2a7d79a460bc"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"19a3c15a2d9905e0ab1064482ec5b5e4f636f3d2","unresolved":true,"context_lines":[{"line_number":9,"context_line":"Originally, the storage policy of a container could only be set at container creation time. This aims to change that by introducing a dev tool that allows the operators/admins of a"},{"line_number":10,"context_line":"cluster to change the storage policy of an existing container/bucket."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch allows resellers to change the storage policy of a container by sending a POST container request with an \u0027X-storage-policy\u0027 header specified"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Co-authored-by: Azmain Adib \u003cadib1905@gmail.com\u003e"},{"line_number":15,"context_line":"Co-authored-by: Daanish Khan \u003cdaanish1337@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"422ec7aa_5f3d6099","line":12,"updated":"2024-07-18 23:24:52.000000000","message":"Oh this is super interesting, I thought this would be an actual ops tool (like swift-container-info) that an op had to run on the commandline.. but instead its a POST only a reseller can make!\nI hadn\u0027t considered that, and isn\u0027t a bad idea.\n\nLet me talk to some of the other cores and see what they think. Great thinking outside the box everyone!","commit_id":"8eb73af87d77fda1b30cd10260dd2a7d79a460bc"},{"author":{"_account_id":37040,"name":"Md Azmain Adib Pahlowan","display_name":"Azmain Adib","email":"adib1905@gmail.com","username":"aadib"},"change_message_id":"b9418f8ec23e24cfeaad5a4ddd3e076f9c27b169","unresolved":true,"context_lines":[{"line_number":9,"context_line":"Originally, the storage policy of a container could only be set at container creation time. This aims to change that by introducing a dev tool that allows the operators/admins of a"},{"line_number":10,"context_line":"cluster to change the storage policy of an existing container/bucket."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch allows resellers to change the storage policy of a container by sending a POST container request with an \u0027X-storage-policy\u0027 header specified"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Co-authored-by: Azmain Adib \u003cadib1905@gmail.com\u003e"},{"line_number":15,"context_line":"Co-authored-by: Daanish Khan \u003cdaanish1337@gmail.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"e80edd3a_bc0bbe09","line":12,"in_reply_to":"422ec7aa_5f3d6099","updated":"2024-07-19 10:49:01.000000000","message":"This is a patch that would allow us to modify the storage-policy with reseller POST. We\u0027re working on an actual ops tool too!","commit_id":"8eb73af87d77fda1b30cd10260dd2a7d79a460bc"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"507d6278bd1170b993ee54c300909bc305eea1df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7e37b2bb_4b8325fe","updated":"2024-07-26 03:38:50.000000000","message":"Great work adding a opstool too!\n\nTim\u0027s kinda just moved all the bin tools and rejigged them a bit. See https://review.opendev.org/c/openstack/swift/+/924776 as an example. Although I think I spell it out a bit inline.","commit_id":"9fed84dbe61236036f4e8ee15bafedb23eeab2e9"}],"swift/cli/container_change_policy.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"507d6278bd1170b993ee54c300909bc305eea1df","unresolved":true,"context_lines":[{"line_number":47,"context_line":"            print(\"Does not appear to be a DB of type \\\"%s\\\": %s\""},{"line_number":48,"context_line":"                  % (db_type, db_file))"},{"line_number":49,"context_line":"            raise InfoSystemExit()"},{"line_number":50,"context_line":"        raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"8735454d_dea678f4","line":50,"updated":"2024-07-26 03:38:50.000000000","message":"There has been a bunch of work lately getting all bin scripts in console_scripts: https://review.opendev.org/c/openstack/swift/+/924776\n\nSo maybe we should create a:\n\n    def main():\n      ...\n    \n    \n    if __name__ \u003d\u003d \u0027__main__\u0027:\n        main()\n\nAdd the contents of the `run_change_storage_policy` function into the `main()` here so it\u0027s all driven by this location.\n\nThen over in setup.cfg we add this to the console_scripts:\n\n\n    [entry_points]\n    console_scripts \u003d\n        ...\n        swift-container-change-policy \u003d swift.cli.container_change_policy:main","commit_id":"9fed84dbe61236036f4e8ee15bafedb23eeab2e9"}],"test/unit/proxy/controllers/test_container.py":[{"author":{"_account_id":37040,"name":"Md Azmain Adib Pahlowan","display_name":"Azmain Adib","email":"adib1905@gmail.com","username":"aadib"},"change_message_id":"6ed40d9c98d4faaac0782a959bb0e86d2a0cd835","unresolved":true,"context_lines":[{"line_number":279,"context_line":"        StoragePolicy(2, \u0027two\u0027, False, object_ring\u003dFakeRing()),"},{"line_number":280,"context_line":"        StoragePolicy(3, \u0027three\u0027, False, object_ring\u003dFakeRing())"},{"line_number":281,"context_line":"    ])"},{"line_number":282,"context_line":"    def test_reseller_admin_storage_policy(self):"},{"line_number":283,"context_line":"        controller \u003d proxy_server.ContainerController(self.app, \u0027a\u0027, \u0027c\u0027)"},{"line_number":284,"context_line":"        policy \u003d random.choice(list(POLICIES))"},{"line_number":285,"context_line":"        reseller_external_headers \u003d {\u0027x-storage-policy\u0027: str(policy.name)}"}],"source_content_type":"text/x-python","patch_set":1,"id":"22824505_da18cea1","line":282,"updated":"2024-07-18 20:32:06.000000000","message":"This test seems to pass even if the POST request to change the storage policy isn\u0027t made by a reseller-admin. We suspect that this is an issue with the testcase, as opposed to an issue with the code, as the feature works as intended when we test it manually. To clarify, when we test the feature through the terminal, only reseller-admin requests lead to a change in the storage policy, and non-reseller-admin requests get ignored.","commit_id":"8eb73af87d77fda1b30cd10260dd2a7d79a460bc"}]}
