)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2578d707ff9b00a80160fd71dbbde2abda773568","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            rt.update_usage(context, instance, instance.node)"},{"line_number":562,"context_line":"            if instance.vm_state in vm_states.ALLOW_RESOURCE_REMOVAL:"},{"line_number":563,"context_line":"                # Should this live in"},{"line_number":564,"context_line":"                # ResourceTracker._update_usage_from_instance?"},{"line_number":565,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _instance_update(self, context, instance, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_fbe45bae","line":564,"updated":"2017-08-24 10:29:43.000000000","message":"If it is to be in this method I like here, because it is more direct; however the method name \"_update_resource_tracker\" suggests that maybe somewhere else is better.\n\nIt might be better spread several \"delete_allocation_for_instance\" calls throughout the various places in the compute manager that it is needed because that would be explicit. For each action we would see a series of actions: update the instance object, update the allocations, update whatever else, update the resource tracker (if that remains necessary).\n\nThe visibility of those actions will enhance readability and be good reminders for people adding functionality later.","commit_id":"127e59a6c2f410602b329565d8d60fe77b90b407"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2c12a684a7798baf6956de3dd903df2064be5cf8","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            rt.update_usage(context, instance, instance.node)"},{"line_number":562,"context_line":"            if instance.vm_state in vm_states.ALLOW_RESOURCE_REMOVAL:"},{"line_number":563,"context_line":"                # Should this live in"},{"line_number":564,"context_line":"                # ResourceTracker._update_usage_from_instance?"},{"line_number":565,"context_line":"                rt.reportclient.delete_allocation_for_instance(instance.uuid)"},{"line_number":566,"context_line":""},{"line_number":567,"context_line":"    def _instance_update(self, context, instance, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f287b81_e6f83b4a","line":564,"in_reply_to":"7f287b81_fbe45bae","updated":"2017-08-24 13:01:49.000000000","message":"Yeah I thought about that, the explicit calls in each method that needs it. This was just a quick thought on how it could look centralized, since it used to be centralized and hit via this flow to the RT doing that same vm_state check, but we disabled that once all computes are Pike.","commit_id":"127e59a6c2f410602b329565d8d60fe77b90b407"}]}
