)]}'
{"nova/compute/api.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"1d7f693a63e40453c1625264dadd71e8a1df1e42","unresolved":false,"context_lines":[{"line_number":927,"context_line":"        # if task or vm state changed"},{"line_number":928,"context_line":"        rv \u003d notifications.instance_update_wrapper(context, instance[\"id\"],"},{"line_number":929,"context_line":"                **kwargs)"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"        return dict(rv.iteritems())"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    @wrap_check_policy"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F6oM%3D","line":930,"updated":"2012-05-17 16:15:39.000000000","message":"This will get confusing, I think.  I think this looks like we\u0027re just sending a notification, but not really updating the DB... just due to the fact that this is calling into the notifications module.","commit_id":"291cd503530877b71be9723060536e63c8d1522b"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"7b9924ddd3e99e5dcfcc46239a709877c4180878","unresolved":false,"context_lines":[{"line_number":1270,"context_line":""},{"line_number":1271,"context_line":"        # change instance state and notify"},{"line_number":1272,"context_line":"        old_vm_state \u003d instance[\"vm_state\"]"},{"line_number":1273,"context_line":"        old_task_state \u003d instance[\"vm_state\"]"},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"        self.db.instance_test_and_set("},{"line_number":1276,"context_line":"                context, instance_uuid, \u0027task_state\u0027, [None], task_state)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F6ds%3D","line":1273,"updated":"2012-05-17 21:35:33.000000000","message":"cut n paste error. :)  instance[\u0027task_state\u0027]","commit_id":"82ccb59e3049e216dbe9f7aa1ca44eeda78032a2"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"03a3846a395994f0b586dab235ba07271ef0505e","unresolved":false,"context_lines":[{"line_number":1271,"context_line":"            raise Exception(_(\u0027Image type not recognized %s\u0027) % image_type)"},{"line_number":1272,"context_line":""},{"line_number":1273,"context_line":"        # change instance state and notify"},{"line_number":1274,"context_line":"        old_vm_state \u003d instance[\"vm_state\"]"},{"line_number":1275,"context_line":"        old_task_state \u003d instance[\"task_state\"]"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"        self.db.instance_test_and_set("}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAHX%2F%2F5ZQ%3D","line":1274,"updated":"2012-05-21 21:49:38.000000000","message":"It feels a little wrong that we have to memorize the old vm-state when only the task-state is changing here.","commit_id":"0cf0b54f708cd07c1e7f4deb652a2a92a3bb5d66"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"6c0c770cfe5300538bb4b8d09984921e77b04657","unresolved":false,"context_lines":[{"line_number":593,"context_line":"        # send a state update notification for the initial create to"},{"line_number":594,"context_line":"        # show it going from non-existent to BUILDING"},{"line_number":595,"context_line":"        notifications.send_update_with_states(context, instance, None,"},{"line_number":596,"context_line":"                vm_states.BUILDING, None, None)"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        for security_group_id in security_groups:"},{"line_number":599,"context_line":"            self.db.instance_add_security_group(elevated,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F4kw%3D","line":596,"updated":"2012-05-23 18:31:03.000000000","message":"Something strikes me as wonky having a notification in the db creation call.","commit_id":"24d3a400f0c524f526b28ed6c9964e67ddce8200"}],"nova/compute/manager.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"938aea641aac9c96ec6f00ea7eb391f5f919499d","unresolved":false,"context_lines":[{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        # call update wrapper so we can send a state update notification"},{"line_number":257,"context_line":"        # if vm or task state is changing"},{"line_number":258,"context_line":"        return notifications.instance_update_wrapper(context, instance_id,"},{"line_number":259,"context_line":"                **kwargs)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    def _set_instance_error_state(self, context, instance_uuid):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAHX%2F%2F6oY%3D","line":258,"updated":"2012-05-17 16:14:33.000000000","message":"I really don\u0027t like the idea of converting all of our db.instance_update calls to suddenly have to pass through a notifications library.\n\nI\u0027d favor a callback approach where we can register pre and post-update operations with the db-layer upfront, and then have those called during normal persistence calls.\n\nAt first we could just do this with instance_update, but we could perhaps use this has a groundwork for a more overarching plugin/hook system at the db-layer.\n\n(This feels like a Folsom theme, make compute/virt/db layers more pluggable.)","commit_id":"283b4b00caf80a2014cf25264e65f606325bb6cf"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"6c0c770cfe5300538bb4b8d09984921e77b04657","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        (old_ref, instance_ref) \u003d self.db.instance_update_and_get_original("},{"line_number":257,"context_line":"                context, instance_id, kwargs)"},{"line_number":258,"context_line":"        notifications.send_update(context, old_ref, instance_ref)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        return instance_ref"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F4k4%3D","line":257,"updated":"2012-05-23 18:31:03.000000000","message":"braces aren\u0027t necessary.","commit_id":"24d3a400f0c524f526b28ed6c9964e67ddce8200"}],"nova/compute/utils.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"6c0c770cfe5300538bb4b8d09984921e77b04657","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        override in the notification if not None."},{"line_number":54,"context_line":"    \"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    (audit_start, audit_end) \u003d notifications.audit_period_bounds("},{"line_number":57,"context_line":"                                             current_period)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    bw \u003d notifications.bandwidth_usage(instance_ref, audit_start,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F4ko%3D","line":56,"updated":"2012-05-23 18:31:03.000000000","message":"again, no braces. It\u0027s not done this way elsewhere.","commit_id":"24d3a400f0c524f526b28ed6c9964e67ddce8200"}],"nova/db/api.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"7b9924ddd3e99e5dcfcc46239a709877c4180878","unresolved":false,"context_lines":[{"line_number":615,"context_line":"def instance_update_and_get_original(context, instance_id, values):"},{"line_number":616,"context_line":"    \"\"\"Set the given properties on an instance and update it. Return"},{"line_number":617,"context_line":"    a shallow copy of the original instance reference, as well as the"},{"line_number":618,"context_line":"    updated one."},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"    Raises NotFound if instance does not exist."},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F6dc%3D","line":618,"updated":"2012-05-17 21:35:33.000000000","message":"Would be nice to specify it\u0027s a tuple of (old_ref, new_ref)","commit_id":"82ccb59e3049e216dbe9f7aa1ca44eeda78032a2"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":642,"name":"Matt Dietz","email":"matthew.dietz@gmail.com","username":"cerberus"},"change_message_id":"c8dd34eeddf0b5e886724d7ab6f0441a68e41264","unresolved":false,"context_lines":[{"line_number":1643,"context_line":"@require_context"},{"line_number":1644,"context_line":"def instance_update_and_get_original(context, instance_id, values):"},{"line_number":1645,"context_line":"    \"\"\"Set the given properties on an instance and update it. Return"},{"line_number":1646,"context_line":"    a shallow copy of the original instance reference, as well as the "},{"line_number":1647,"context_line":"    updated one."},{"line_number":1648,"context_line":""},{"line_number":1649,"context_line":"    Raises NotFound if instance does not exist."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F6Nw%3D","line":1646,"updated":"2012-05-18 16:11:37.000000000","message":"Pep8 line length","commit_id":"82ccb59e3049e216dbe9f7aa1ca44eeda78032a2"}],"nova/notifications.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"0c8dc311452c2dbbaedd96603236ad0a493b0813","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    or the full DB ref, if available."},{"line_number":54,"context_line":"    \"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if utils.is_uuid_like(instance_id):"},{"line_number":57,"context_line":"        instance \u003d db.instance_get_by_uuid(context, instance_id)"},{"line_number":58,"context_line":"    else:"},{"line_number":59,"context_line":"        instance \u003d db.instance_get(context, instance_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F6oI%3D","line":56,"updated":"2012-05-17 16:14:41.000000000","message":"Is this code still needed?\n\nI thought a while back we made it so that everything was getting a `uuid`...","commit_id":"291cd503530877b71be9723060536e63c8d1522b"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"0c8dc311452c2dbbaedd96603236ad0a493b0813","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    instance \u003d db.instance_update(context, instance[\"id\"], values)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    # skip the notification if we\u0027re not changing states"},{"line_number":69,"context_line":"    if FLAGS.notify_on_vm_state_change and (new_vm_state or new_task_state):"},{"line_number":70,"context_line":"        send_update(context, instance, old_vm_state, new_vm_state,"},{"line_number":71,"context_line":"                old_task_state, new_task_state)"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAHX%2F%2F6oE%3D","line":69,"updated":"2012-05-17 16:14:41.000000000","message":"What about FLAGS.notify_on_task_state_change?","commit_id":"291cd503530877b71be9723060536e63c8d1522b"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"03a3846a395994f0b586dab235ba07271ef0505e","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    in vm state and (optionally) task state"},{"line_number":64,"context_line":"    \"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    if not FLAGS.notify_on_vm_state_change:"},{"line_number":67,"context_line":"        # skip all this if state updates are disabled"},{"line_number":68,"context_line":"        return"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAHX%2F%2F5aU%3D","line":66,"updated":"2012-05-21 21:49:38.000000000","message":"I can see why you did this, but, to me, disabling both task-state and vm-state notifications with this config option violates the principle of least surprise.\n\n(If you wanted to \u0027lock\u0027 task-state notifications to vm-state, so that you had to use None, vm-state, or vm-state and task-state, another way to do it would be:\n\nFLAGS.state_notifications \u003d \u003cNone|vm_state|vm_and_task_state\u003e)","commit_id":"0cf0b54f708cd07c1e7f4deb652a2a92a3bb5d66"},{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"6c0c770cfe5300538bb4b8d09984921e77b04657","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    if old_vm_state !\u003d new_vm_state:"},{"line_number":69,"context_line":"        # yes, the vm state is changing:"},{"line_number":70,"context_line":"        fire_update \u003d True"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    elif FLAGS.notify_on_state_change.lower() \u003d\u003d \"vm_and_task_state\" and \\"},{"line_number":73,"context_line":"         old_task_state !\u003d new_task_state:"},{"line_number":74,"context_line":"        # yes, the task state is changing:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAHX%2F%2F4kU%3D","line":71,"updated":"2012-05-23 18:31:03.000000000","message":"minor nit, but whitespace in else?","commit_id":"24d3a400f0c524f526b28ed6c9964e67ddce8200"}],"nova/scheduler/driver.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"7b9924ddd3e99e5dcfcc46239a709877c4180878","unresolved":false,"context_lines":[{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # update instance state and notify"},{"line_number":232,"context_line":"        (old_ref, new_instance_ref) \u003d db.instance_update_and_get_original("},{"line_number":233,"context_line":"                context, instance_id, values)[0]"},{"line_number":234,"context_line":"        notifications.send_update(context, old_ref, new_instance_ref)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        src \u003d instance_ref[\u0027host\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAHX%2F%2F6dY%3D","line":233,"updated":"2012-05-17 21:35:33.000000000","message":"Remove the [0] from here, I assume.","commit_id":"82ccb59e3049e216dbe9f7aa1ca44eeda78032a2"}],"nova/tests/api/openstack/compute/contrib/test_disk_config.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"476254b9391ff09008f6a0fcdda146b9bbb990c5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                return inst"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            self.stubs.Set(nova.db, \u0027instance_get\u0027,"},{"line_number":100,"context_line":"                          fake_instance_get_for_create)"},{"line_number":101,"context_line":"            self.stubs.Set(nova.db, \u0027instance_update\u0027,"},{"line_number":102,"context_line":"                          fake_instance_get_for_create)"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAHX%2F%2F3%2Fs%3D","side":"PARENT","line":100,"updated":"2012-05-24 16:21:39.000000000","message":"Is this stub not used?  I would imagine we\u0027d get a raise because you\u0027ve changed \u0027instance_get\u0027 to return a tuple.\n\nIf that stub is not needed anymore, I\u0027d remove it.  If it turns out to be needed, I\u0027d restore the current stub and add a new stub specifically for instance_update_and_get_original.","commit_id":"19ec093e81f94c9b00bddf2af25ac6dcc406590b"}]}
