)]}'
{"nova/db/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c5ebce21ad688f11bb9a65064b6641cb0451e2dc","unresolved":false,"context_lines":[{"line_number":1528,"context_line":"    return IMPL.pci_device_get_all_by_instance_uuid(context, instance_uuid)"},{"line_number":1529,"context_line":""},{"line_number":1530,"context_line":""},{"line_number":1531,"context_line":"def pci_device_get_all_by_parent_addr(context, parent_addr):"},{"line_number":1532,"context_line":"    \"\"\"Get all PCI devices by parent address.\"\"\""},{"line_number":1533,"context_line":"    return IMPL.pci_device_get_all_by_parent_addr(context, parent_addr)"},{"line_number":1534,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_dad22400","line":1531,"updated":"2015-12-18 11:06:21.000000000","message":"You want to retrieve all VFs of a PF from its address, perhaps we can have this method to reflect more of want you want, something like:\n\n  pci_device_get_vfs_from_pf_address().\n\nBut it\u0027s just a suggestion :)","commit_id":"7031db1ec160bf773c5fa5ed47f3081821d4e3d1"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"629e4c1dc883bc7088889a5d87946be155abd933","unresolved":false,"context_lines":[{"line_number":6395,"context_line":""},{"line_number":6396,"context_line":""},{"line_number":6397,"context_line":"def pci_device_get_all_by_parent_addr(context, parent_addr):"},{"line_number":6398,"context_line":"    return model_query(context, models.PciDevice).\\"},{"line_number":6399,"context_line":"                       filter_by(parent_addr\u003dparent_addr).\\"},{"line_number":6400,"context_line":"                       all()"},{"line_number":6401,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a740942_7f9de964","line":6398,"updated":"2015-12-08 08:08:49.000000000","message":"So with new model proposed by Nikola I think you will need first a query to get parent.id\n\n  SELECT id\n  FROM pci_devices\n  WHERE compute_node_id\u003d$compute_id,\n              address\u003d$parent_addr,\n              deleted\u003dfalse;\n\nIt\u0027s important to have clause WHERE with fields compute_node_id, address, delete to let database reuse index \u0027uniq_pci_devices0compute_node_id0address0deleted\u0027","commit_id":"2bb85d772f0feb333acb3fdbafcc367a59f326af"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3392387863ccad778d91db1c480a8ddef1072e7e","unresolved":false,"context_lines":[{"line_number":6404,"context_line":""},{"line_number":6405,"context_line":"def pci_device_get_all_by_parent_addr(context, parent_addr):"},{"line_number":6406,"context_line":"    return model_query(context, models.PciDevice).\\"},{"line_number":6407,"context_line":"                       filter_by(parent_addr\u003dparent_addr).\\"},{"line_number":6408,"context_line":"                       all()"},{"line_number":6409,"context_line":""},{"line_number":6410,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a7e1126_343d66c4","line":6407,"range":{"start_line":6407,"start_character":33,"end_line":6407,"end_character":56},"updated":"2015-12-18 17:18:45.000000000","message":"This can return devices from different compute nodes in theory, but this is almost certainly not what we will want in our app logic, so this should really filter on compute hosts as well (deleted ones are filtered out in model_query by default I think).\n\nAlso this will do a full table scan as there is no index (we should add it with the migration)","commit_id":"7031db1ec160bf773c5fa5ed47f3081821d4e3d1"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"818901223870a8678756cddb6a25da7030c45217","unresolved":false,"context_lines":[{"line_number":6405,"context_line":"def pci_device_get_all_by_parent_addr(context, node_id, parent_addr):"},{"line_number":6406,"context_line":"    return model_query(context, models.PciDevice).\\"},{"line_number":6407,"context_line":"                       filter_by(compute_node_id\u003dnode_id).\\"},{"line_number":6408,"context_line":"                       filter_by(parent_addr\u003dparent_addr).\\"},{"line_number":6409,"context_line":"                       all()"},{"line_number":6410,"context_line":""},{"line_number":6411,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a7e1126_4a002602","line":6408,"updated":"2015-12-22 11:32:18.000000000","message":"I think you need PCIs when there are not deleted. Also it\u0027s better to have \u0027deleted\u0027 in you query to let database reuse index previously created \u0027ix_pci_devices_compute_node_id_parent_addr_deleted\u0027 - i cannot see an other one which can be used by database.","commit_id":"0562cf14c1a3f2d50291fae487a8190360c95caa"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b0b22bf145644a990fce585898282c921891628c","unresolved":false,"context_lines":[{"line_number":6405,"context_line":"def pci_device_get_all_by_parent_addr(context, node_id, parent_addr):"},{"line_number":6406,"context_line":"    return model_query(context, models.PciDevice).\\"},{"line_number":6407,"context_line":"                       filter_by(compute_node_id\u003dnode_id).\\"},{"line_number":6408,"context_line":"                       filter_by(parent_addr\u003dparent_addr).\\"},{"line_number":6409,"context_line":"                       all()"},{"line_number":6410,"context_line":""},{"line_number":6411,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a7b0d38_9e6ef7c7","line":6408,"in_reply_to":"3a7e1126_4a002602","updated":"2015-12-24 12:21:29.000000000","message":"This is done implicitly by model_query unless told not to do it with read_deleted\u003d\u0027yes\u0027","commit_id":"0562cf14c1a3f2d50291fae487a8190360c95caa"}]}
