)]}'
{"cinder/api/contrib/backups.py":[{"author":{"_account_id":6153,"name":"stephen-mulcahy","email":"stephen.mulcahy@hpe.com","username":"stephen-mulcahy"},"change_message_id":"8d7b42ee3c50b940d7fb698b1f60903e9b064f83","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":212,"context_line":"            raise exc.HTTPNotFound(explanation\u003dunicode(error))"},{"line_number":213,"context_line":"        except exception.ServiceNotFound as error:"},{"line_number":214,"context_line":"            raise exc.HTTPInternalServerError(explanation\u003dunicode(error))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        retval \u003d self._view_builder.summary(req, dict(new_backup.iteritems()))"},{"line_number":217,"context_line":"        return retval"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzSg%3D","line":214,"updated":"2013-07-11 07:37:21.000000000","message":"Should we raise a custom exception here rather than HTTPInternalServerError? Maybe add a new BackupServiceNotFound exception or similar to cinder.exceptions","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"ef5d997fd4762c354e80f5dfdf16a3d2673e09ef","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        except exception.VolumeNotFound as error:"},{"line_number":212,"context_line":"            raise exc.HTTPNotFound(explanation\u003dunicode(error))"},{"line_number":213,"context_line":"        except exception.ServiceNotFound as error:"},{"line_number":214,"context_line":"            raise exc.HTTPInternalServerError(explanation\u003dunicode(error))"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        retval \u003d self._view_builder.summary(req, dict(new_backup.iteritems()))"},{"line_number":217,"context_line":"        return retval"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FyOU%3D","line":214,"in_reply_to":"AAAAP3%2F%2FzSg%3D","updated":"2013-07-11 14:28:34.000000000","message":"Well, we have custom exception (ServiceNotFound), but for here since it\u0027s a http response, we have to follow the HTTP state code, I think 500(internal error) is the best fit. \n\nI am not a HTTP expert so please fix me if other state is better than 500","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"}],"cinder/backup/api.py":[{"author":{"_account_id":6153,"name":"stephen-mulcahy","email":"stephen.mulcahy@hpe.com","username":"stephen-mulcahy"},"change_message_id":"8d7b42ee3c50b940d7fb698b1f60903e9b064f83","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from cinder.db import base"},{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzTg%3D","line":24,"updated":"2013-07-11 07:37:21.000000000","message":"should evenlet not be imported before the cinder modules as per HACKING.rst?","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"80d9bf7d57c7af66b4437fdedee753af89335915","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from cinder.db import base"},{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzVM%3D","line":24,"updated":"2013-07-11 07:37:10.000000000","message":"this is wrong. move it back","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"bf2f9f9c490016373829d64bf4cdebd8bf7d89f3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from cinder.db import base"},{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzN8%3D","line":24,"in_reply_to":"AAAAP3%2F%2FzTg%3D","updated":"2013-07-11 08:59:42.000000000","message":"Done","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"bf2f9f9c490016373829d64bf4cdebd8bf7d89f3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from cinder.db import base"},{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzOA%3D","line":24,"in_reply_to":"AAAAP3%2F%2FzVM%3D","updated":"2013-07-11 08:59:42.000000000","message":"Done","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"80d9bf7d57c7af66b4437fdedee753af89335915","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"},{"line_number":28,"context_line":"import cinder.volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzUs%3D","line":25,"updated":"2013-07-11 07:37:10.000000000","message":"put this one here is also wrong (violating import order rule)","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"bf2f9f9c490016373829d64bf4cdebd8bf7d89f3","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from cinder import exception"},{"line_number":23,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":24,"context_line":"from eventlet import greenthread"},{"line_number":25,"context_line":"from oslo.config import cfg"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"import cinder.policy"},{"line_number":28,"context_line":"import cinder.volume"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzN0%3D","line":25,"in_reply_to":"AAAAP3%2F%2FzUs%3D","updated":"2013-07-11 08:59:42.000000000","message":"sorry? not following ... the pep8 check is passed","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6153,"name":"stephen-mulcahy","email":"stephen.mulcahy@hpe.com","username":"stephen-mulcahy"},"change_message_id":"8d7b42ee3c50b940d7fb698b1f60903e9b064f83","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        return backups"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _check_backup_service(self):"},{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        Check if there is an backup service available"},{"line_number":85,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzTE%3D","line":82,"updated":"2013-07-11 07:37:21.000000000","message":"This seems to check if there are *any* backup services running rather than if there is a backup service running on the host associated with the volume  - afaik in the current implementation the backup service must be running on the same host so _check_backup_service() will return True in cases where no suitable backup service is available. Consider enhancing this to also have an idea of the host.","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"bf2f9f9c490016373829d64bf4cdebd8bf7d89f3","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        return backups"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _check_backup_service(self):"},{"line_number":83,"context_line":"        \"\"\""},{"line_number":84,"context_line":"        Check if there is an backup service available"},{"line_number":85,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzMc%3D","line":82,"in_reply_to":"AAAAP3%2F%2FzTE%3D","updated":"2013-07-11 08:59:42.000000000","message":"Done","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"80d9bf7d57c7af66b4437fdedee753af89335915","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        topic \u003d CONF.backup_topic"},{"line_number":87,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":"        services \u003d self.db.service_get_all_by_topic(ctxt, topic)"},{"line_number":89,"context_line":"        if services !\u003d None and len(services) \u003d\u003d 0:"},{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzTo%3D","line":89,"updated":"2013-07-11 07:37:10.000000000","message":"this only cover the case when no service record is found in database, in most case, we should have some, even those dead services count.\n\nso what you need to do is to check is there is any backup service is _alive_.","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"bf2f9f9c490016373829d64bf4cdebd8bf7d89f3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        topic \u003d CONF.backup_topic"},{"line_number":87,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":88,"context_line":"        services \u003d self.db.service_get_all_by_topic(ctxt, topic)"},{"line_number":89,"context_line":"        if services !\u003d None and len(services) \u003d\u003d 0:"},{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        else:"},{"line_number":92,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAP3%2F%2FzCc%3D","line":89,"in_reply_to":"AAAAP3%2F%2FzTo%3D","updated":"2013-07-11 08:59:42.000000000","message":"Done","commit_id":"0be558dc130e332f768a813a19838bd05f468faa"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"2a4360bce50d06147405068949e4b7a1f168a706","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder import exception"},{"line_number":25,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":26,"context_line":"from cinder import utils"},{"line_number":27,"context_line":"from oslo.config import cfg"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import cinder.policy"},{"line_number":30,"context_line":"import cinder.volume"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2FxxU%3D","line":27,"updated":"2013-07-11 16:23:03.000000000","message":"please fix this! take a look at other modules see how they import oslo.config.","commit_id":"727980c990c7c254b8ae3af78fe2038a788faf10"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"6efd8e1ab9d440962e0906958d3292f35dc9924b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from cinder import exception"},{"line_number":25,"context_line":"from cinder.openstack.common import log as logging"},{"line_number":26,"context_line":"from cinder import utils"},{"line_number":27,"context_line":"from oslo.config import cfg"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"import cinder.policy"},{"line_number":30,"context_line":"import cinder.volume"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2FwaQ%3D","line":27,"in_reply_to":"AAAAP3%2F%2FxxU%3D","updated":"2013-07-11 21:58:46.000000000","message":"Done","commit_id":"727980c990c7c254b8ae3af78fe2038a788faf10"}],"cinder/tests/api/contrib/test_backups.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"2a4360bce50d06147405068949e4b7a1f168a706","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        def empty_service(ctxt, topic):"},{"line_number":517,"context_line":"            return []"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        #service host not match with volume[\u0027host\u0027]"},{"line_number":520,"context_line":"        def host_not_match(context, topic):"},{"line_number":521,"context_line":"            return [{\u0027availability_zone\u0027: \"fake_az\", \u0027host\u0027: \u0027strange_host\u0027,"},{"line_number":522,"context_line":"                     \u0027disabled\u0027: 0, \u0027updated_at\u0027: timeutils.utcnow()}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2Fxss%3D","line":519,"updated":"2013-07-11 16:23:03.000000000","message":"seems you listed several cases for check_backup_service, better get the description consistent: service\u0027s host or service[\u0027host\u0027], service\u0027s az, or service[\u0027availability_zone\u0027].","commit_id":"727980c990c7c254b8ae3af78fe2038a788faf10"},{"author":{"_account_id":6939,"name":"Xiaoxi Chen","email":"superdebuger@gmail.com","username":"xiaoxi-chen"},"change_message_id":"6efd8e1ab9d440962e0906958d3292f35dc9924b","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        def empty_service(ctxt, topic):"},{"line_number":517,"context_line":"            return []"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"        #service host not match with volume[\u0027host\u0027]"},{"line_number":520,"context_line":"        def host_not_match(context, topic):"},{"line_number":521,"context_line":"            return [{\u0027availability_zone\u0027: \"fake_az\", \u0027host\u0027: \u0027strange_host\u0027,"},{"line_number":522,"context_line":"                     \u0027disabled\u0027: 0, \u0027updated_at\u0027: timeutils.utcnow()}]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAP3%2F%2Fwak%3D","line":519,"in_reply_to":"AAAAP3%2F%2Fxss%3D","updated":"2013-07-11 21:58:46.000000000","message":"Done","commit_id":"727980c990c7c254b8ae3af78fe2038a788faf10"}]}
