)]}'
{"glance_store/_drivers/swift/connection_manager.py":[{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9257c97af1f31ecdf6cd31eea89685678acdb9e6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Connection Manager for SWIFT connections that responsible for providing"},{"line_number":17,"context_line":"connection with valid credentials and updated token\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import logging"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_68a51e03","line":16,"range":{"start_line":16,"start_character":26,"end_line":16,"end_character":31},"updated":"2016-02-19 17:44:24.000000000","message":"nit: Swift","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"047191d365438151c2d90034d1507fa8c81c1178","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"\"\"\"Connection Manager for SWIFT connections that responsible for providing"},{"line_number":17,"context_line":"connection with valid credentials and updated token\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import logging"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_238afebf","line":16,"range":{"start_line":16,"start_character":26,"end_line":16,"end_character":31},"in_reply_to":"bae84128_68a51e03","updated":"2016-02-20 09:39:14.000000000","message":"Done","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9257c97af1f31ecdf6cd31eea89685678acdb9e6","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                self.store.conf.glance_store.swift_store_expire_soon_interval"},{"line_number":72,"context_line":"            ):"},{"line_number":73,"context_line":"                LOG.info(_LI(\"Requesting new token for swift connection.\"))"},{"line_number":74,"context_line":"                auth_token \u003d self.client.session.get_token()"},{"line_number":75,"context_line":"                LOG.info(_LI(\"Token has been successfully requested. \""},{"line_number":76,"context_line":"                             \"Refreshing swift connection.\"))"},{"line_number":77,"context_line":"                self.connection \u003d self.store.get_store_connection("}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_e3fcaf40","line":74,"range":{"start_line":74,"start_character":49,"end_line":74,"end_character":58},"updated":"2016-02-19 17:44:24.000000000","message":"Is keystoneclient.session.get_token deprecated?\n\n    @removals.remove(message\u003d\u0027Use get_auth_headers instead.\u0027, version\u003d\u00271.7.0\u0027,\n                     removal_version\u003d\u00272.0.0\u0027)","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"047191d365438151c2d90034d1507fa8c81c1178","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                self.store.conf.glance_store.swift_store_expire_soon_interval"},{"line_number":72,"context_line":"            ):"},{"line_number":73,"context_line":"                LOG.info(_LI(\"Requesting new token for swift connection.\"))"},{"line_number":74,"context_line":"                auth_token \u003d self.client.session.get_token()"},{"line_number":75,"context_line":"                LOG.info(_LI(\"Token has been successfully requested. \""},{"line_number":76,"context_line":"                             \"Refreshing swift connection.\"))"},{"line_number":77,"context_line":"                self.connection \u003d self.store.get_store_connection("}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_03237abe","line":74,"range":{"start_line":74,"start_character":49,"end_line":74,"end_character":58},"in_reply_to":"bae84128_e3fcaf40","updated":"2016-02-20 09:39:14.000000000","message":"Will replace it with get_auth_headers","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9257c97af1f31ecdf6cd31eea89685678acdb9e6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            ):"},{"line_number":73,"context_line":"                LOG.info(_LI(\"Requesting new token for swift connection.\"))"},{"line_number":74,"context_line":"                auth_token \u003d self.client.session.get_token()"},{"line_number":75,"context_line":"                LOG.info(_LI(\"Token has been successfully requested. \""},{"line_number":76,"context_line":"                             \"Refreshing swift connection.\"))"},{"line_number":77,"context_line":"                self.connection \u003d self.store.get_store_connection("},{"line_number":78,"context_line":"                    auth_token, self.storage_url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_1cf2d1d2","line":75,"updated":"2016-02-19 17:44:24.000000000","message":"I\u0027m finding the token refresh a bit tricky to follow.\n\nCan you help me understand how in the multi-tenant store case,  we get from the get_token call here to a new trust being issued?","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"047191d365438151c2d90034d1507fa8c81c1178","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            ):"},{"line_number":73,"context_line":"                LOG.info(_LI(\"Requesting new token for swift connection.\"))"},{"line_number":74,"context_line":"                auth_token \u003d self.client.session.get_token()"},{"line_number":75,"context_line":"                LOG.info(_LI(\"Token has been successfully requested. \""},{"line_number":76,"context_line":"                             \"Refreshing swift connection.\"))"},{"line_number":77,"context_line":"                self.connection \u003d self.store.get_store_connection("},{"line_number":78,"context_line":"                    auth_token, self.storage_url)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_831dca75","line":75,"in_reply_to":"bae84128_1cf2d1d2","updated":"2016-02-20 09:39:14.000000000","message":"Will describe in details as comments.","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9257c97af1f31ecdf6cd31eea89685678acdb9e6","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _init_client(self):"},{"line_number":95,"context_line":"        \"\"\"Initialize Keystone client\"\"\""},{"line_number":96,"context_line":"        return self.store.init_client(location\u003dself.location,"},{"line_number":97,"context_line":"                                      context\u003dself.context)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _get_storage_url(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_a3f8e77d","line":96,"range":{"start_line":96,"start_character":26,"end_line":96,"end_character":37},"updated":"2016-02-19 17:44:24.000000000","message":"Which init_client function is this calling?\n\nI can only see this one:\n\n ./glance_store/_drivers/swift/store.py:    def init_client(self, location, context\u003dNone):\n\nwhich isn\u0027t implemented. I\u0027m guessing there\u0027s something subtle going on here that I\u0027m missing.","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"047191d365438151c2d90034d1507fa8c81c1178","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _init_client(self):"},{"line_number":95,"context_line":"        \"\"\"Initialize Keystone client\"\"\""},{"line_number":96,"context_line":"        return self.store.init_client(location\u003dself.location,"},{"line_number":97,"context_line":"                                      context\u003dself.context)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _get_storage_url(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_230dde3e","line":96,"range":{"start_line":96,"start_character":26,"end_line":96,"end_character":37},"in_reply_to":"bae84128_a3f8e77d","updated":"2016-02-20 09:39:14.000000000","message":"I am sorry, I should have mentioned that we are turning on re-auth in consequent patch.\nInit client actually prepares keystone client for connection manager.","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":455,"name":"Stuart McLaren","email":"stuart.mclaren@hpe.com","username":"stuart-mclaren"},"change_message_id":"9257c97af1f31ecdf6cd31eea89685678acdb9e6","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            return self.store._get_endpoint(self.context)"},{"line_number":150,"context_line":"        except (exceptions.BadStoreConfiguration,"},{"line_number":151,"context_line":"                ks_exceptions.EndpointNotFound):"},{"line_number":152,"context_line":"            LOG.debug(\"Cannot obtain endpoint from context: %s. Use location \""},{"line_number":153,"context_line":"                      \"value from database to obtain swift_url.\")"},{"line_number":154,"context_line":"            return self.location.swift_url"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_480e5a35","line":152,"range":{"start_line":152,"start_character":60,"end_line":152,"end_character":62},"updated":"2016-02-19 17:44:24.000000000","message":"Are we missing a context at the end of the debug statement?","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"047191d365438151c2d90034d1507fa8c81c1178","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            return self.store._get_endpoint(self.context)"},{"line_number":150,"context_line":"        except (exceptions.BadStoreConfiguration,"},{"line_number":151,"context_line":"                ks_exceptions.EndpointNotFound):"},{"line_number":152,"context_line":"            LOG.debug(\"Cannot obtain endpoint from context: %s. Use location \""},{"line_number":153,"context_line":"                      \"value from database to obtain swift_url.\")"},{"line_number":154,"context_line":"            return self.location.swift_url"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bae84128_6307e61c","line":152,"range":{"start_line":152,"start_character":60,"end_line":152,"end_character":62},"in_reply_to":"bae84128_480e5a35","updated":"2016-02-20 09:39:14.000000000","message":"Will fix that thanks. Actually I wanted to print exception here.","commit_id":"97938ce6f30ee03319da2d3b7cceed9d0e9fa64c"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ead6fb345b63f495e65e56fa1fac374bcfee8302","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _init_client(self):"},{"line_number":123,"context_line":"        \"\"\"Initialize Keystone client.\"\"\""},{"line_number":124,"context_line":"        return self.store.init_client(location\u003dself.location,"},{"line_number":125,"context_line":"                                      context\u003dself.context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_storage_url(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aed3d3a_73b6c83e","line":124,"updated":"2016-02-25 17:52:01.000000000","message":"In this patch, if we\u0027d ever call this method, it\u0027d raise `NotImplementedError`. The reason this patch works is that none of this code is being used here other than in unittests. The patch that follows up is the one containing most of the work","commit_id":"f3caa3cd926ab691c9aa5e0c216d403731f76e68"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"4ed9fc5faca81782a72e05e30caa30ca00a27696","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _init_client(self):"},{"line_number":123,"context_line":"        \"\"\"Initialize Keystone client.\"\"\""},{"line_number":124,"context_line":"        return self.store.init_client(location\u003dself.location,"},{"line_number":125,"context_line":"                                      context\u003dself.context)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _get_storage_url(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aed3d3a_4ad5a741","line":124,"in_reply_to":"9aed3d3a_73b6c83e","updated":"2016-02-26 07:09:04.000000000","message":"yep, this was done intentionally.","commit_id":"f3caa3cd926ab691c9aa5e0c216d403731f76e68"}],"glance_store/_drivers/swift/store.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"ead6fb345b63f495e65e56fa1fac374bcfee8302","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"    is expired and refresh swift connection"},{"line_number":1035,"context_line":"    :return: connection manager for store"},{"line_number":1036,"context_line":"    \"\"\""},{"line_number":1037,"context_line":"    if store.__class__ \u003d\u003d SingleTenantStore:"},{"line_number":1038,"context_line":"        return connection_manager.SingleTenantConnectionManager("},{"line_number":1039,"context_line":"            store, store_location, context, allow_reauth)"},{"line_number":1040,"context_line":"    elif store.__class__ \u003d\u003d MultiTenantStore:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aed3d3a_f3f778f3","line":1037,"updated":"2016-02-25 17:52:01.000000000","message":"nit: you can use `issubclass` here instead of `\u003d\u003d`","commit_id":"f3caa3cd926ab691c9aa5e0c216d403731f76e68"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"0d6c3a3a2fe31ffd79d77f4cf9f500a026abb8f9","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"    is expired and refresh swift connection"},{"line_number":1035,"context_line":"    :return: connection manager for store"},{"line_number":1036,"context_line":"    \"\"\""},{"line_number":1037,"context_line":"    if store.__class__ \u003d\u003d SingleTenantStore:"},{"line_number":1038,"context_line":"        return connection_manager.SingleTenantConnectionManager("},{"line_number":1039,"context_line":"            store, store_location, context, allow_reauth)"},{"line_number":1040,"context_line":"    elif store.__class__ \u003d\u003d MultiTenantStore:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aed3d3a_cbdcfd14","line":1037,"in_reply_to":"9aed3d3a_cfd8a9f2","updated":"2016-02-26 15:31:43.000000000","message":"Oh, you\u0027d have to re-order the if statement for sure. Like:\n\n    if issubclass(store.__class__, MultiTenantStore):\n         # do\n    elif issubclass(...):\n        ...\n    else:\n        ...\n\nNot big deal, it was literally just a nit :)","commit_id":"f3caa3cd926ab691c9aa5e0c216d403731f76e68"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"4ed9fc5faca81782a72e05e30caa30ca00a27696","unresolved":false,"context_lines":[{"line_number":1034,"context_line":"    is expired and refresh swift connection"},{"line_number":1035,"context_line":"    :return: connection manager for store"},{"line_number":1036,"context_line":"    \"\"\""},{"line_number":1037,"context_line":"    if store.__class__ \u003d\u003d SingleTenantStore:"},{"line_number":1038,"context_line":"        return connection_manager.SingleTenantConnectionManager("},{"line_number":1039,"context_line":"            store, store_location, context, allow_reauth)"},{"line_number":1040,"context_line":"    elif store.__class__ \u003d\u003d MultiTenantStore:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9aed3d3a_cfd8a9f2","line":1037,"in_reply_to":"9aed3d3a_f3f778f3","updated":"2016-02-26 07:09:04.000000000","message":"It looks like I cannot use that because MultiTenantStore is also a subclass of Store class. So the main goal is to define appropriate store subclass and return appropriate connection manager. I will add additional explanation to the method.","commit_id":"f3caa3cd926ab691c9aa5e0c216d403731f76e68"}]}
