)]}'
{"cinder/backup/drivers/swift.py":[{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"441a868185dd9300646bf72bb26683222ea466f9","unresolved":true,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027backup_swift_container\u0027,"},{"line_number":110,"context_line":"               default\u003d\u0027volumebackups\u0027,"},{"line_number":111,"context_line":"               help\u003d\u0027The default Swift container to use\u0027),"},{"line_number":112,"context_line":"    cfg.StrOpt(\u0027backup_swift_create_storage_policy\u0027,"},{"line_number":113,"context_line":"               default\u003dNone,"},{"line_number":114,"context_line":"               help\u003d\u0027The storage policy to use when creating the Swift \u0027"},{"line_number":115,"context_line":"                    \u0027container. If the container already exists the \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"8603c016_4ceef036","line":112,"updated":"2021-05-18 13:19:09.000000000","message":"\"backup_create_storage_policy\" sounds like it pertains creating a storage policy. How about \"backup_swift_container_storage_policy\"","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f5aed5dabb3a9cbce69ce0f4fa2aa08c57bacf00","unresolved":true,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027backup_swift_container\u0027,"},{"line_number":110,"context_line":"               default\u003d\u0027volumebackups\u0027,"},{"line_number":111,"context_line":"               help\u003d\u0027The default Swift container to use\u0027),"},{"line_number":112,"context_line":"    cfg.StrOpt(\u0027backup_swift_create_storage_policy\u0027,"},{"line_number":113,"context_line":"               default\u003dNone,"},{"line_number":114,"context_line":"               help\u003d\u0027The storage policy to use when creating the Swift \u0027"},{"line_number":115,"context_line":"                    \u0027container. If the container already exists the \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"91a6bdb0_d2a8178f","line":112,"in_reply_to":"7f5664df_64cccdec","updated":"2021-06-07 13:55:42.000000000","message":"Before reading the help message I thought this was to create a storage policy on swift (/me facepalms).","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"c3cf2a928cd6f456862b36fd7b2cc33f8e7cbe13","unresolved":true,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027backup_swift_container\u0027,"},{"line_number":110,"context_line":"               default\u003d\u0027volumebackups\u0027,"},{"line_number":111,"context_line":"               help\u003d\u0027The default Swift container to use\u0027),"},{"line_number":112,"context_line":"    cfg.StrOpt(\u0027backup_swift_create_storage_policy\u0027,"},{"line_number":113,"context_line":"               default\u003dNone,"},{"line_number":114,"context_line":"               help\u003d\u0027The storage policy to use when creating the Swift \u0027"},{"line_number":115,"context_line":"                    \u0027container. If the container already exists the \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"900d10a1_695381a6","line":112,"in_reply_to":"8603c016_4ceef036","updated":"2021-05-18 13:36:30.000000000","message":"I\u0027m fine with either one but maybe backup_swift_container_create_storage_policy (kind of long) is better.\n\nThe earlier iterations had backup_swift_container_storage_policy but that was changed based on feedback to backup_swift_create_storage_policy to reflect the fact that this can never update an existing storage policy and only applies on new containers.\n\nWhat do you think?","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"7183a4cfa759ee655d99160b114b3b826407b990","unresolved":true,"context_lines":[{"line_number":109,"context_line":"    cfg.StrOpt(\u0027backup_swift_container\u0027,"},{"line_number":110,"context_line":"               default\u003d\u0027volumebackups\u0027,"},{"line_number":111,"context_line":"               help\u003d\u0027The default Swift container to use\u0027),"},{"line_number":112,"context_line":"    cfg.StrOpt(\u0027backup_swift_create_storage_policy\u0027,"},{"line_number":113,"context_line":"               default\u003dNone,"},{"line_number":114,"context_line":"               help\u003d\u0027The storage policy to use when creating the Swift \u0027"},{"line_number":115,"context_line":"                    \u0027container. If the container already exists the \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f5664df_64cccdec","line":112,"in_reply_to":"900d10a1_695381a6","updated":"2021-05-18 14:38:21.000000000","message":"Oh, sorry, I didn\u0027t realize you already proposed backup_swift_container_storage_policy (though it\u0027s still my preference). And I agree backup_swift_container_create_storage_policy is long. As long as there\u0027s reviewer consensus then I\u0027m happy either way. Let\u0027s see how others feel.","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f5aed5dabb3a9cbce69ce0f4fa2aa08c57bacf00","unresolved":true,"context_lines":[{"line_number":329,"context_line":"        Check if the container exist by issuing a HEAD request, if"},{"line_number":330,"context_line":"        the container does not exist we create it."},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"}],"source_content_type":"text/x-python","patch_set":11,"id":"92386ba8_2fd7133b","line":332,"range":{"start_line":332,"start_character":50,"end_line":332,"end_character":51},"updated":"2021-06-07 13:55:42.000000000","message":"nit: an","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"397a1418dc335827e432b2ec3c9bcf1208456a2c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        Check if the container exist by issuing a HEAD request, if"},{"line_number":330,"context_line":"        the container does not exist we create it."},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"}],"source_content_type":"text/x-python","patch_set":11,"id":"f478849e_d1a76567","line":332,"range":{"start_line":332,"start_character":50,"end_line":332,"end_character":51},"in_reply_to":"92386ba8_2fd7133b","updated":"2021-06-08 11:14:48.000000000","message":"Done","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"441a868185dd9300646bf72bb26683222ea466f9","unresolved":true,"context_lines":[{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"},{"line_number":336,"context_line":"        if storage_policy is not None:"},{"line_number":337,"context_line":"            headers \u003d {\u0027X-Storage-Policy\u0027: storage_policy}"},{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            headers \u003d None"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self.conn.head_container(container)"},{"line_number":342,"context_line":"        except swift_exc.ClientException as e:"},{"line_number":343,"context_line":"            if e.http_status \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":11,"id":"135ef2ca_6558e468","line":340,"range":{"start_line":335,"start_character":0,"end_line":340,"end_character":0},"updated":"2021-05-18 13:19:09.000000000","message":"A couple of suggestions:\n- The storage policy is relevant only if the container needs to be created, so L335..L340 can be moved down, just above L345\n- The \"not None\" followed by an else clause feels like a double negative\n- The conditional can be simplified:\n\n                    storage_policy \u003d CONF.backup_swift_create_storage_policy\n                    headers \u003d ({\u0027X-Storage-Policy\u0027: storage_policy}\n                               if storage_policy else None)\n                    self.conn.put_container(container, headers\u003dheaders)","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"c3cf2a928cd6f456862b36fd7b2cc33f8e7cbe13","unresolved":true,"context_lines":[{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"},{"line_number":336,"context_line":"        if storage_policy is not None:"},{"line_number":337,"context_line":"            headers \u003d {\u0027X-Storage-Policy\u0027: storage_policy}"},{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            headers \u003d None"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self.conn.head_container(container)"},{"line_number":342,"context_line":"        except swift_exc.ClientException as e:"},{"line_number":343,"context_line":"            if e.http_status \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":11,"id":"2b028474_7fa1181c","line":340,"range":{"start_line":335,"start_character":0,"end_line":340,"end_character":0},"in_reply_to":"135ef2ca_6558e468","updated":"2021-05-18 13:36:30.000000000","message":"I agree, will cleanup the logic in next PS.","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f5aed5dabb3a9cbce69ce0f4fa2aa08c57bacf00","unresolved":true,"context_lines":[{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"},{"line_number":336,"context_line":"        if storage_policy is not None:"},{"line_number":337,"context_line":"            headers \u003d {\u0027X-Storage-Policy\u0027: storage_policy}"},{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            headers \u003d None"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self.conn.head_container(container)"},{"line_number":342,"context_line":"        except swift_exc.ClientException as e:"},{"line_number":343,"context_line":"            if e.http_status \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":11,"id":"5190c754_73159f5b","line":340,"range":{"start_line":335,"start_character":0,"end_line":340,"end_character":0},"in_reply_to":"2b028474_7fa1181c","updated":"2021-06-07 13:55:42.000000000","message":"I like that headers change, as it also covers the case where they pass an empty string as the storage_policy","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"397a1418dc335827e432b2ec3c9bcf1208456a2c","unresolved":false,"context_lines":[{"line_number":332,"context_line":"        We cannot enforce a new storage policy on a"},{"line_number":333,"context_line":"        existing container."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        storage_policy \u003d CONF.backup_swift_create_storage_policy"},{"line_number":336,"context_line":"        if storage_policy is not None:"},{"line_number":337,"context_line":"            headers \u003d {\u0027X-Storage-Policy\u0027: storage_policy}"},{"line_number":338,"context_line":"        else:"},{"line_number":339,"context_line":"            headers \u003d None"},{"line_number":340,"context_line":"        try:"},{"line_number":341,"context_line":"            self.conn.head_container(container)"},{"line_number":342,"context_line":"        except swift_exc.ClientException as e:"},{"line_number":343,"context_line":"            if e.http_status \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":11,"id":"0d00093a_2d528046","line":340,"range":{"start_line":335,"start_character":0,"end_line":340,"end_character":0},"in_reply_to":"5190c754_73159f5b","updated":"2021-06-08 11:14:48.000000000","message":"Done","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f5aed5dabb3a9cbce69ce0f4fa2aa08c57bacf00","unresolved":true,"context_lines":[{"line_number":346,"context_line":"                except socket.error as err:"},{"line_number":347,"context_line":"                    raise exception.SwiftConnectionFailed(reason\u003derr)"},{"line_number":348,"context_line":"                return"},{"line_number":349,"context_line":"            else:"},{"line_number":350,"context_line":"                LOG.warning(\"Failed to HEAD container to determine if it \""},{"line_number":351,"context_line":"                            \"exists and should be created.\")"},{"line_number":352,"context_line":"                raise exception.SwiftConnectionFailed(reason\u003de)"}],"source_content_type":"text/x-python","patch_set":11,"id":"d46cda70_98de2225","line":349,"range":{"start_line":349,"start_character":12,"end_line":349,"end_character":16},"updated":"2021-06-07 13:55:42.000000000","message":"nit: Unnecessary else keyword, the if part will either raise an exception or return, so we can remove the else and unindent L350-352","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"397a1418dc335827e432b2ec3c9bcf1208456a2c","unresolved":false,"context_lines":[{"line_number":346,"context_line":"                except socket.error as err:"},{"line_number":347,"context_line":"                    raise exception.SwiftConnectionFailed(reason\u003derr)"},{"line_number":348,"context_line":"                return"},{"line_number":349,"context_line":"            else:"},{"line_number":350,"context_line":"                LOG.warning(\"Failed to HEAD container to determine if it \""},{"line_number":351,"context_line":"                            \"exists and should be created.\")"},{"line_number":352,"context_line":"                raise exception.SwiftConnectionFailed(reason\u003de)"}],"source_content_type":"text/x-python","patch_set":11,"id":"84c56b14_3788c5bb","line":349,"range":{"start_line":349,"start_character":12,"end_line":349,"end_character":16},"in_reply_to":"d46cda70_98de2225","updated":"2021-06-08 11:14:48.000000000","message":"Done","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"}],"releasenotes/notes/add-backup-swift-container-storage-policy-8d4a268ed61b9fe2.yaml":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"887ed040996bfe670e2b3388d15e6def60b770af","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added new configuration option backup_swift_container_storage_policy for"},{"line_number":5,"context_line":"    the Swift backup driver. If specified it will be used as the storage"},{"line_number":6,"context_line":"    policy when creating the Swift Container, default value is None meaning"},{"line_number":7,"context_line":"    it will not be used and Swift will use the system default."}],"source_content_type":"text/x-yaml","patch_set":1,"id":"1f621f24_900f40e0","line":4,"range":{"start_line":4,"start_character":35,"end_line":4,"end_character":72},"updated":"2020-11-03 12:00:54.000000000","message":"If you need to do an update, please put this inside double backticks (``backup_...``) so it gets formatted in the output to make it more apparent as a config option.","commit_id":"2e1d513218a17f4fb0cb7909ff5a1ecccfb4a3b8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"f5aed5dabb3a9cbce69ce0f4fa2aa08c57bacf00","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added new configuration option ``backup_swift_create_storage_policy`` for"},{"line_number":5,"context_line":"    the Swift backup driver. If specified it will be used as the storage"},{"line_number":6,"context_line":"    policy when creating the Swift Container, default value is None meaning"},{"line_number":7,"context_line":"    it will not be used and Swift will use the system default. Please note"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"675fda4a_90822d04","line":4,"updated":"2021-06-07 13:55:42.000000000","message":"nit: Please start the line with: \"Swift backup driver:\" to facilitate the final generated doc readability as per our recommendations [1].\n\n[1]: https://docs.openstack.org/cinder/latest/contributor/releasenotes.html#drivers","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"},{"author":{"_account_id":16137,"name":"Tobias Urdin","email":"tobias.urdin@binero.com","username":"tobasco"},"change_message_id":"397a1418dc335827e432b2ec3c9bcf1208456a2c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Added new configuration option ``backup_swift_create_storage_policy`` for"},{"line_number":5,"context_line":"    the Swift backup driver. If specified it will be used as the storage"},{"line_number":6,"context_line":"    policy when creating the Swift Container, default value is None meaning"},{"line_number":7,"context_line":"    it will not be used and Swift will use the system default. Please note"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"4974c064_bc5ba3d0","line":4,"in_reply_to":"675fda4a_90822d04","updated":"2021-06-08 11:14:48.000000000","message":"Done","commit_id":"8670de4771246cf491e0811a43f541eccfef378b"}]}
