)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0893c5aa2649373230092ee0d10e6a0f6311e9ee","unresolved":false,"context_lines":[{"line_number":2663,"context_line":"    Returns a list of UUIDs, not Instance model objects."},{"line_number":2664,"context_line":"    \"\"\""},{"line_number":2665,"context_line":"    uuids \u003d []"},{"line_number":2666,"context_line":"    for tuple in model_query(context, models.Instance, (models.Instance.uuid,),"},{"line_number":2667,"context_line":"                             read_deleted\u003d\"no\").\\"},{"line_number":2668,"context_line":"                filter_by(host\u003dhost).\\"},{"line_number":2669,"context_line":"                all():"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_56cf6456","side":"PARENT","line":2666,"range":{"start_line":2666,"start_character":17,"end_line":2666,"end_character":28},"updated":"2019-08-29 20:12:23.000000000","message":"This also has the funky project_only kwarg but that\u0027s False by default and thus doesn\u0027t modify the query so we don\u0027t have to worry about it for the non-model_query way of doing this.","commit_id":"872a823d9a02f31e266882bfb499673c51fb4075"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e0cd21bcdf6a9b04bc54f1040125a44323643818","unresolved":false,"context_lines":[{"line_number":2662,"context_line":"    \"\"\"Return a dict, keyed by hostname, of a list of the instance uuids on the"},{"line_number":2663,"context_line":"    host for each supplied hostname."},{"line_number":2664,"context_line":""},{"line_number":2665,"context_line":"    Returns a dict, keyed by hostname, of a list of UUIDs, not Instance model"},{"line_number":2666,"context_line":"    objects."},{"line_number":2667,"context_line":"    \"\"\""},{"line_number":2668,"context_line":"    itbl \u003d models.Instance.__table__"},{"line_number":2669,"context_line":"    default_deleted_value \u003d itbl.c.deleted.default.arg"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_2d9b63c9","line":2666,"range":{"start_line":2665,"start_character":4,"end_line":2666,"end_character":12},"updated":"2019-08-15 14:44:23.000000000","message":"This is pretty redundant (and was before too).","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"92aec7dd8c36038e3bdfde4f2661408c6c677615","unresolved":false,"context_lines":[{"line_number":2662,"context_line":"    \"\"\"Return a dict, keyed by hostname, of a list of the instance uuids on the"},{"line_number":2663,"context_line":"    host for each supplied hostname."},{"line_number":2664,"context_line":""},{"line_number":2665,"context_line":"    Returns a dict, keyed by hostname, of a list of UUIDs, not Instance model"},{"line_number":2666,"context_line":"    objects."},{"line_number":2667,"context_line":"    \"\"\""},{"line_number":2668,"context_line":"    itbl \u003d models.Instance.__table__"},{"line_number":2669,"context_line":"    default_deleted_value \u003d itbl.c.deleted.default.arg"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a308b4d8","line":2666,"range":{"start_line":2665,"start_character":4,"end_line":2666,"end_character":12},"in_reply_to":"7faddb67_2d9b63c9","updated":"2019-09-02 11:51:44.000000000","message":"Done","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0893c5aa2649373230092ee0d10e6a0f6311e9ee","unresolved":false,"context_lines":[{"line_number":2669,"context_line":"    default_deleted_value \u003d itbl.c.deleted.default.arg"},{"line_number":2670,"context_line":"    sel \u003d sql.select([itbl.c.host, itbl.c.uuid])"},{"line_number":2671,"context_line":"    sel \u003d sel.where(sql.and_("},{"line_number":2672,"context_line":"            itbl.c.deleted \u003d\u003d default_deleted_value,"},{"line_number":2673,"context_line":"            itbl.c.host.in_(hosts)))"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"    # group the instance UUIDs by hostname"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_b6b1f8e2","line":2672,"range":{"start_line":2672,"start_character":12,"end_line":2672,"end_character":51},"updated":"2019-08-29 20:12:23.000000000","message":"OK so this covers the previous use of read_deleted\u003d\"no\" and defaults to 0:\n\nhttps://github.com/openstack/oslo.db/blob/c49c96ff74190b9f1b1504eaa8a7ef66b8ae333f/oslo_db/sqlalchemy/models.py#L144","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e0cd21bcdf6a9b04bc54f1040125a44323643818","unresolved":false,"context_lines":[{"line_number":2670,"context_line":"    sel \u003d sql.select([itbl.c.host, itbl.c.uuid])"},{"line_number":2671,"context_line":"    sel \u003d sel.where(sql.and_("},{"line_number":2672,"context_line":"            itbl.c.deleted \u003d\u003d default_deleted_value,"},{"line_number":2673,"context_line":"            itbl.c.host.in_(hosts)))"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"    # group the instance UUIDs by hostname"},{"line_number":2676,"context_line":"    res \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_4dc1ff53","line":2673,"range":{"start_line":2673,"start_character":24,"end_line":2673,"end_character":34},"updated":"2019-08-15 14:44:23.000000000","message":"should we use one of those fancy bindparam things here?","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"92aec7dd8c36038e3bdfde4f2661408c6c677615","unresolved":false,"context_lines":[{"line_number":2670,"context_line":"    sel \u003d sql.select([itbl.c.host, itbl.c.uuid])"},{"line_number":2671,"context_line":"    sel \u003d sel.where(sql.and_("},{"line_number":2672,"context_line":"            itbl.c.deleted \u003d\u003d default_deleted_value,"},{"line_number":2673,"context_line":"            itbl.c.host.in_(hosts)))"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"    # group the instance UUIDs by hostname"},{"line_number":2676,"context_line":"    res \u003d collections.defaultdict(list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_4309c0d9","line":2673,"range":{"start_line":2673,"start_character":24,"end_line":2673,"end_character":34},"in_reply_to":"7faddb67_4dc1ff53","updated":"2019-09-02 11:51:44.000000000","message":"Done","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e0cd21bcdf6a9b04bc54f1040125a44323643818","unresolved":false,"context_lines":[{"line_number":2673,"context_line":"            itbl.c.host.in_(hosts)))"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"    # group the instance UUIDs by hostname"},{"line_number":2676,"context_line":"    res \u003d collections.defaultdict(list)"},{"line_number":2677,"context_line":"    for rec in context.session.execute(sel).fetchall():"},{"line_number":2678,"context_line":"        res[rec[0]].append(rec[1])"},{"line_number":2679,"context_line":"    return res"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_cd52cf67","line":2676,"range":{"start_line":2676,"start_character":22,"end_line":2676,"end_character":33},"updated":"2019-08-15 14:44:23.000000000","message":"I wonder if this should be called out in the docstring, since previously res[bogus] would have been KeyError but now it\u0027s []. It\u0027s pretty unlikely to be used that way, but still...","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"92aec7dd8c36038e3bdfde4f2661408c6c677615","unresolved":false,"context_lines":[{"line_number":2673,"context_line":"            itbl.c.host.in_(hosts)))"},{"line_number":2674,"context_line":""},{"line_number":2675,"context_line":"    # group the instance UUIDs by hostname"},{"line_number":2676,"context_line":"    res \u003d collections.defaultdict(list)"},{"line_number":2677,"context_line":"    for rec in context.session.execute(sel).fetchall():"},{"line_number":2678,"context_line":"        res[rec[0]].append(rec[1])"},{"line_number":2679,"context_line":"    return res"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_231da40e","line":2676,"range":{"start_line":2676,"start_character":22,"end_line":2676,"end_character":33},"in_reply_to":"7faddb67_cd52cf67","updated":"2019-09-02 11:51:44.000000000","message":"Done","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"}],"nova/objects/instance.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccae6f46fc1b1e8cd994838b3d8ed38a18b37691","unresolved":false,"context_lines":[{"line_number":1511,"context_line":""},{"line_number":1512,"context_line":"    @base.remotable_classmethod"},{"line_number":1513,"context_line":"    def get_uuids_by_hosts(cls, context, hosts):"},{"line_number":1514,"context_line":"        \"\"\"Returns a dict, keyed by hypervisor hostname, of a list of instance"},{"line_number":1515,"context_line":"        UUIDs associated with that compute node."},{"line_number":1516,"context_line":"        \"\"\""},{"line_number":1517,"context_line":"        return db.instance_get_all_uuids_by_hosts(context, hosts)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_1e4edec0","line":1514,"range":{"start_line":1514,"start_character":36,"end_line":1514,"end_character":55},"updated":"2019-02-24 17:45:37.000000000","message":"Just to be clear, is this the ComputeNode.host (compute service hostname) or the ComputeNode.hypervisor_hostname, otherwise referred to as the \u0027node\u0027 or \u0027nodename\u0027 which is stored as Instance.node? If it\u0027s the former, this should probably be written as \u0027keyed by compute service host\u0027 to avoid confusing it with nodes.","commit_id":"e8198d42f694be0925c9cc3944cc7ba4c59d36e2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ccae6f46fc1b1e8cd994838b3d8ed38a18b37691","unresolved":false,"context_lines":[{"line_number":1512,"context_line":"    @base.remotable_classmethod"},{"line_number":1513,"context_line":"    def get_uuids_by_hosts(cls, context, hosts):"},{"line_number":1514,"context_line":"        \"\"\"Returns a dict, keyed by hypervisor hostname, of a list of instance"},{"line_number":1515,"context_line":"        UUIDs associated with that compute node."},{"line_number":1516,"context_line":"        \"\"\""},{"line_number":1517,"context_line":"        return db.instance_get_all_uuids_by_hosts(context, hosts)"},{"line_number":1518,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9fdfeff1_fec8ba21","line":1515,"range":{"start_line":1515,"start_character":43,"end_line":1515,"end_character":47},"updated":"2019-02-24 17:45:37.000000000","message":"service host?","commit_id":"e8198d42f694be0925c9cc3944cc7ba4c59d36e2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e0cd21bcdf6a9b04bc54f1040125a44323643818","unresolved":false,"context_lines":[{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    @base.remotable_classmethod"},{"line_number":1432,"context_line":"    def get_uuids_by_host(cls, context, host):"},{"line_number":1433,"context_line":"        return db.instance_get_all_uuids_by_hosts(context, [host]).get("},{"line_number":1434,"context_line":"            host, [])"},{"line_number":1435,"context_line":""},{"line_number":1436,"context_line":"    @base.remotable_classmethod"},{"line_number":1437,"context_line":"    def get_uuids_by_hosts(cls, context, hosts):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_edcc6b35","line":1434,"range":{"start_line":1433,"start_character":66,"end_line":1434,"end_character":21},"updated":"2019-08-15 14:44:23.000000000","message":"yeah, this could be [host] to the same effect","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"92aec7dd8c36038e3bdfde4f2661408c6c677615","unresolved":false,"context_lines":[{"line_number":1430,"context_line":""},{"line_number":1431,"context_line":"    @base.remotable_classmethod"},{"line_number":1432,"context_line":"    def get_uuids_by_host(cls, context, host):"},{"line_number":1433,"context_line":"        return db.instance_get_all_uuids_by_hosts(context, [host]).get("},{"line_number":1434,"context_line":"            host, [])"},{"line_number":1435,"context_line":""},{"line_number":1436,"context_line":"    @base.remotable_classmethod"},{"line_number":1437,"context_line":"    def get_uuids_by_hosts(cls, context, hosts):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_c315b0e7","line":1434,"range":{"start_line":1433,"start_character":66,"end_line":1434,"end_character":21},"in_reply_to":"7faddb67_edcc6b35","updated":"2019-09-02 11:51:44.000000000","message":"Done","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e0cd21bcdf6a9b04bc54f1040125a44323643818","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        test3 \u003d self.create_instance_with_args(display_name\u003d\u0027test3\u0027)"},{"line_number":364,"context_line":"        uuids \u003d [i.uuid for i in (test1, test2, test3)]"},{"line_number":365,"context_line":"        results \u003d db.instance_get_all_uuids_by_hosts(self.context,"},{"line_number":366,"context_line":"                                                         [test1.host])"},{"line_number":367,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":368,"context_line":"        self.assertIn(test1.host, results)"},{"line_number":369,"context_line":"        found_uuids \u003d results[test1.host]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_addaf3e5","line":366,"range":{"start_line":366,"start_character":53,"end_line":366,"end_character":57},"updated":"2019-08-15 14:44:23.000000000","message":"weird indent","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"92aec7dd8c36038e3bdfde4f2661408c6c677615","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        test3 \u003d self.create_instance_with_args(display_name\u003d\u0027test3\u0027)"},{"line_number":364,"context_line":"        uuids \u003d [i.uuid for i in (test1, test2, test3)]"},{"line_number":365,"context_line":"        results \u003d db.instance_get_all_uuids_by_hosts(self.context,"},{"line_number":366,"context_line":"                                                         [test1.host])"},{"line_number":367,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":368,"context_line":"        self.assertIn(test1.host, results)"},{"line_number":369,"context_line":"        found_uuids \u003d results[test1.host]"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_e3122cfd","line":366,"range":{"start_line":366,"start_character":53,"end_line":366,"end_character":57},"in_reply_to":"7faddb67_addaf3e5","updated":"2019-09-02 11:51:44.000000000","message":"Done","commit_id":"fd29298197d697b2f2b145af8b55c5a7df230661"}]}
