)]}'
{"nova/compute/api.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9dd4a6b0ae3ac479cb16e21294411a22271b0a66","unresolved":false,"context_lines":[{"line_number":2028,"context_line":"        else:"},{"line_number":2029,"context_line":"            LOG.warning(\"instance\u0027s host %s is down, deleting from \""},{"line_number":2030,"context_line":"                        \"database\", instance.host, instance\u003dinstance)"},{"line_number":2031,"context_line":"        if delete_type !\u003d \u0027soft_delete\u0027:"},{"line_number":2032,"context_line":"            action \u003d delete_type"},{"line_number":2033,"context_line":"        else:"},{"line_number":2034,"context_line":"            action \u003d fields_obj.NotificationAction.DELETE"}],"source_content_type":"text/x-python","patch_set":23,"id":"5f7c97a3_dd05c4c3","line":2031,"range":{"start_line":2031,"start_character":26,"end_line":2031,"end_character":39},"updated":"2018-05-10 02:05:45.000000000","message":"nit: fields_obj.NotificationAction.SOFT_DELETE","commit_id":"47d833bd064f8ceaa0889d675925bb5bf184a9f6"}],"nova/compute/manager.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9b9a3d95e8ed166a1828059f7e4d4e2f158d94f7","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2704,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2705,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2706,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2707,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2708,"context_line":"            try:"},{"line_number":2709,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_621e6e71","line":2706,"range":{"start_line":2706,"start_character":61,"end_line":2706,"end_character":74},"updated":"2018-03-27 23:15:45.000000000","message":"NotificationAction?","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"345ddcbc583be107a8425c22c1e3a3df81d53245","unresolved":false,"context_lines":[{"line_number":2703,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2704,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2705,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2706,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2707,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2708,"context_line":"            try:"},{"line_number":2709,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f6a8fd7_caf10a97","line":2706,"range":{"start_line":2706,"start_character":61,"end_line":2706,"end_character":74},"in_reply_to":"bf659307_621e6e71","updated":"2018-07-03 13:44:11.000000000","message":"Done","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ce4ff3bf4be76cf5aae3f56ae144bed40e27d015","unresolved":false,"context_lines":[{"line_number":2699,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2700,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2701,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2702,"context_line":"                self.notifier, context, instance, self.host,"},{"line_number":2703,"context_line":"                fields.NotificationAction.SOFT_DELETE,"},{"line_number":2704,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2705,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"3f79a3b5_acb369ec","line":2702,"range":{"start_line":2702,"start_character":50,"end_line":2702,"end_character":59},"updated":"2018-09-24 10:08:51.000000000","message":"I think this is always CONF.host anyways, based on:\nhttps://github.com/openstack/nova/blob/792cc425f2dd73dad392a5d0488989e818683047/nova/manager.py#L95\n\nDo we want to not bother passing this through?","commit_id":"47d833bd064f8ceaa0889d675925bb5bf184a9f6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ce4ff3bf4be76cf5aae3f56ae144bed40e27d015","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2825,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2826,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2827,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2828,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2829,"context_line":"            try:"},{"line_number":2830,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_ccdd8514","line":2827,"updated":"2018-09-24 10:08:51.000000000","message":"I think this is always CONF.host: \nhttps://github.com/openstack/nova/blob/792cc425f2dd73dad392a5d0488989e818683047/nova/manager.py#L95\n\nAlthough part of me likes how this doesn\u0027t change anything.","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ce4ff3bf4be76cf5aae3f56ae144bed40e27d015","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2825,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2826,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2827,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2828,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2829,"context_line":"            try:"},{"line_number":2830,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_6ce231d7","line":2827,"range":{"start_line":2827,"start_character":62,"end_line":2827,"end_character":73},"updated":"2018-09-24 10:08:51.000000000","message":"Why not use fileds.NotificationPhase.START here?","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"487259a8fec44fd1e109f11acbbc7d6af06b4273","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2825,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2826,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2827,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2828,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2829,"context_line":"            try:"},{"line_number":2830,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_0c793dc4","line":2827,"range":{"start_line":2827,"start_character":62,"end_line":2827,"end_character":73},"in_reply_to":"3f79a3b5_6ce231d7","updated":"2018-09-24 10:40:30.000000000","message":"This is more like a delete_type and less like a notification action at this point of the call path. See melwitt\u0027s comments on PS21","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"487259a8fec44fd1e109f11acbbc7d6af06b4273","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"    def soft_delete_instance(self, context, instance):"},{"line_number":2825,"context_line":"        \"\"\"Soft delete an instance on this host.\"\"\""},{"line_number":2826,"context_line":"        with compute_utils.notify_about_instance_delete("},{"line_number":2827,"context_line":"                self.notifier, context, instance, self.host, \u0027soft_delete\u0027,"},{"line_number":2828,"context_line":"                source\u003dfields.NotificationSource.COMPUTE):"},{"line_number":2829,"context_line":"            try:"},{"line_number":2830,"context_line":"                self.driver.soft_delete(instance)"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_cc31050d","line":2827,"in_reply_to":"3f79a3b5_ccdd8514","updated":"2018-09-24 10:40:30.000000000","message":"I can remove the parameter.","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"}],"nova/compute/utils.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9b9a3d95e8ed166a1828059f7e4d4e2f158d94f7","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"@contextlib.contextmanager"},{"line_number":988,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":989,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":990,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":991,"context_line":"    # Pre-load system_metadata because if this context is around an"},{"line_number":992,"context_line":"    # instance.destroy(), lazy-loading it later would result in an"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_e2ad9e31","line":989,"range":{"start_line":989,"start_character":46,"end_line":989,"end_character":53},"updated":"2018-03-27 23:15:45.000000000","message":"Unrelated to this patch but again, supposed to be a NotificationAction?","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"345ddcbc583be107a8425c22c1e3a3df81d53245","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"@contextlib.contextmanager"},{"line_number":988,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":989,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":990,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":991,"context_line":"    # Pre-load system_metadata because if this context is around an"},{"line_number":992,"context_line":"    # instance.destroy(), lazy-loading it later would result in an"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f7c97a3_b8a1fef9","line":989,"range":{"start_line":989,"start_character":46,"end_line":989,"end_character":53},"in_reply_to":"9f6a8fd7_0c22b5b9","updated":"2018-07-03 13:44:11.000000000","message":"I pushed back the old version, no worries. :)","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"959e8d08dd0f333c2f41f08bf73b21abfb04c3db","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"@contextlib.contextmanager"},{"line_number":988,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":989,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":990,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":991,"context_line":"    # Pre-load system_metadata because if this context is around an"},{"line_number":992,"context_line":"    # instance.destroy(), lazy-loading it later would result in an"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f6a8fd7_0c22b5b9","line":989,"range":{"start_line":989,"start_character":46,"end_line":989,"end_character":53},"in_reply_to":"9f6a8fd7_ec1ba570","updated":"2018-04-25 21:55:05.000000000","message":"I see. I think maybe I messed this up by asking. The delete_type from the caller isn\u0027t a NotificationAction but when we call notifications functions, ideally we\u0027d pass NotificationAction.\n\nAnd now that I see this again, maybe the purpose of the NotificationAction was simply to validate the delete_type that\u0027s passed in, if it doesn\u0027t fit in any NotificationAction, it would raise an error. So maybe it was better as it was. :(","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5b9630401df91074067acf5bdc3aebb128a18490","unresolved":false,"context_lines":[{"line_number":986,"context_line":""},{"line_number":987,"context_line":"@contextlib.contextmanager"},{"line_number":988,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":989,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":990,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":991,"context_line":"    # Pre-load system_metadata because if this context is around an"},{"line_number":992,"context_line":"    # instance.destroy(), lazy-loading it later would result in an"}],"source_content_type":"text/x-python","patch_set":21,"id":"9f6a8fd7_ec1ba570","line":989,"range":{"start_line":989,"start_character":46,"end_line":989,"end_character":53},"in_reply_to":"bf659307_e2ad9e31","updated":"2018-04-16 12:02:12.000000000","message":"Good point. Basically this is the place where delete type meets the name of the notification action and both happens to be the same string. I don\u0027t want to write\n  delete_type\u003dNotificatonAction.DELETE\nas the two sides of the assignment are from two different domain. But I might use NotificationAction.coerce() to signal that there is a conversion.","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9b9a3d95e8ed166a1828059f7e4d4e2f158d94f7","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                                    \"%s.start\" % delete_type)"},{"line_number":998,"context_line":"        # Note(gibi): force_delete types will be handled in a"},{"line_number":999,"context_line":"        # subsequent patch"},{"line_number":1000,"context_line":"        if delete_type in [\u0027delete\u0027, \u0027soft_delete\u0027]:"},{"line_number":1001,"context_line":"            notify_about_instance_action("},{"line_number":1002,"context_line":"                context,"},{"line_number":1003,"context_line":"                instance,"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_e284beb3","line":1000,"range":{"start_line":1000,"start_character":27,"end_line":1000,"end_character":50},"updated":"2018-03-27 23:15:45.000000000","message":"Should these be fields.NotificationAction.DELETE and fields.Notification.SOFT_DELETE?","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9b9a3d95e8ed166a1828059f7e4d4e2f158d94f7","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"        notify_about_instance_usage(notifier, context, instance,"},{"line_number":1012,"context_line":"                                    \"%s.end\" % delete_type,"},{"line_number":1013,"context_line":"                                    system_metadata\u003dsystem_metadata)"},{"line_number":1014,"context_line":"        if delete_type in [\u0027delete\u0027, \u0027soft_delete\u0027]:"},{"line_number":1015,"context_line":"            notify_about_instance_action("},{"line_number":1016,"context_line":"                context,"},{"line_number":1017,"context_line":"                instance,"}],"source_content_type":"text/x-python","patch_set":21,"id":"bf659307_829382fa","line":1014,"range":{"start_line":1014,"start_character":27,"end_line":1014,"end_character":50},"updated":"2018-03-27 23:15:45.000000000","message":"Same (based on the old side of the diff).","commit_id":"c18d06ad12349658c022aca78fa788b93611a736"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ce4ff3bf4be76cf5aae3f56ae144bed40e27d015","unresolved":false,"context_lines":[{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"@contextlib.contextmanager"},{"line_number":1159,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":1160,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":1161,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":1162,"context_line":"    try:"},{"line_number":1163,"context_line":"        notify_about_instance_usage(notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_2ccc3961","line":1160,"range":{"start_line":1160,"start_character":46,"end_line":1160,"end_character":52},"updated":"2018-09-24 10:08:51.000000000","message":"Could we default to fields.NotificationAction.DELETE here?","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"487259a8fec44fd1e109f11acbbc7d6af06b4273","unresolved":false,"context_lines":[{"line_number":1157,"context_line":""},{"line_number":1158,"context_line":"@contextlib.contextmanager"},{"line_number":1159,"context_line":"def notify_about_instance_delete(notifier, context, instance, host,"},{"line_number":1160,"context_line":"                                 delete_type\u003d\u0027delete\u0027,"},{"line_number":1161,"context_line":"                                 source\u003dfields.NotificationSource.API):"},{"line_number":1162,"context_line":"    try:"},{"line_number":1163,"context_line":"        notify_about_instance_usage(notifier, context, instance,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_6c36b105","line":1160,"range":{"start_line":1160,"start_character":46,"end_line":1160,"end_character":52},"in_reply_to":"3f79a3b5_2ccc3961","updated":"2018-09-24 10:40:30.000000000","message":"Here it is still a delete type more than a notification action. See melwitt\u0027s comments on PS21","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"ce4ff3bf4be76cf5aae3f56ae144bed40e27d015","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"                instance,"},{"line_number":1171,"context_line":"                host\u003dhost,"},{"line_number":1172,"context_line":"                source\u003dsource,"},{"line_number":1173,"context_line":"                action\u003ddelete_type,"},{"line_number":1174,"context_line":"                phase\u003dfields.NotificationPhase.START)"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"        yield"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_eceba1da","line":1173,"range":{"start_line":1173,"start_character":23,"end_line":1173,"end_character":34},"updated":"2018-09-24 10:08:51.000000000","message":"Nit: I do like seeing the field referenced directly here, but I guess this is OK.","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"487259a8fec44fd1e109f11acbbc7d6af06b4273","unresolved":false,"context_lines":[{"line_number":1170,"context_line":"                instance,"},{"line_number":1171,"context_line":"                host\u003dhost,"},{"line_number":1172,"context_line":"                source\u003dsource,"},{"line_number":1173,"context_line":"                action\u003ddelete_type,"},{"line_number":1174,"context_line":"                phase\u003dfields.NotificationPhase.START)"},{"line_number":1175,"context_line":""},{"line_number":1176,"context_line":"        yield"}],"source_content_type":"text/x-python","patch_set":29,"id":"3f79a3b5_4c1df575","line":1173,"range":{"start_line":1173,"start_character":23,"end_line":1173,"end_character":34},"in_reply_to":"3f79a3b5_eceba1da","updated":"2018-09-24 10:40:30.000000000","message":"This is where the delete_type is translated into the proper notification action enum value","commit_id":"e83dbe1205c9b40e5cde30d11c6cbf6f4875126f"}]}
