)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"bc9d97ac588b4d07a4ca51dd450dbb0174cccadc","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-07-10 18:09:44 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement list and get allocation method to compute hosts plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0a12584d5ec08723101b5dcfa4e9491a94cd6292"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_41291838","line":8,"updated":"2018-07-12 16:44:51.000000000","message":"It is missing the Partially Implements line.","commit_id":"ce8233232465b5dd1c8ca87eb37e553e0a3eec75"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"1eb6b7fd8afefb4facb8d472b226524ef820d0d5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-07-10 18:09:44 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement list and get allocation method to compute hosts plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: I0a12584d5ec08723101b5dcfa4e9491a94cd6292"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5f7c97a3_b17150ae","line":8,"in_reply_to":"5f7c97a3_41291838","updated":"2018-07-17 02:35:54.000000000","message":"Done","commit_id":"ce8233232465b5dd1c8ca87eb37e553e0a3eec75"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"cb0393882cf9cc3afb5f3c1f9f9424ecd08261d6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Masahito Muroi \u003cmuroi.masahito@lab.ntt.co.jp\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-07-25 18:29:16 +0900"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement list and get allocations method to compute hosts plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The two methods returns allocations mapped to a host. The list"},{"line_number":10,"context_line":"allocations method returns all allocations in Blazar\u0027s compute hosts."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_08be0a01","line":7,"range":{"start_line":7,"start_character":35,"end_line":7,"end_character":41},"updated":"2018-11-26 16:36:30.000000000","message":"methods","commit_id":"075c5fc7953a9c6defc6a778a1baed1ee5158c45"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"cb0393882cf9cc3afb5f3c1f9f9424ecd08261d6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement list and get allocations method to compute hosts plugin"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The two methods returns allocations mapped to a host. The list"},{"line_number":10,"context_line":"allocations method returns all allocations in Blazar\u0027s compute hosts."},{"line_number":11,"context_line":"The get allocation methods returns all allocations on a specific"},{"line_number":12,"context_line":"host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_c8b7b222","line":9,"range":{"start_line":9,"start_character":16,"end_line":9,"end_character":23},"updated":"2018-11-26 16:36:30.000000000","message":"return","commit_id":"075c5fc7953a9c6defc6a778a1baed1ee5158c45"}],"blazar/db/sqlalchemy/utils.py":[{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"b40133dcb23c0dc0741cd64d14f5a2c65b194c5b","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def get_reservation_allocations_by_host_ids(host_ids, start_date, end_date):"},{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d sa.and_(models.Lease.start_date \u003c start_date,"},{"line_number":94,"context_line":"                      models.Lease.end_date \u003c start_date)"},{"line_number":95,"context_line":"    border1 \u003d sa.and_(models.Lease.start_date \u003e end_date,"},{"line_number":96,"context_line":"                      models.Lease.end_date \u003e end_date)"},{"line_number":97,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_cec56392","line":94,"range":{"start_line":93,"start_character":17,"end_line":94,"end_character":57},"updated":"2018-07-24 05:05:04.000000000","message":"I think just \"models.Lease.end_date \u003c start_date\" is enough.","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79d562dd25c60e470718207a43ed429b0e05433","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def get_reservation_allocations_by_host_ids(host_ids, start_date, end_date):"},{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d sa.and_(models.Lease.start_date \u003c start_date,"},{"line_number":94,"context_line":"                      models.Lease.end_date \u003c start_date)"},{"line_number":95,"context_line":"    border1 \u003d sa.and_(models.Lease.start_date \u003e end_date,"},{"line_number":96,"context_line":"                      models.Lease.end_date \u003e end_date)"},{"line_number":97,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_e5fe3db4","line":94,"range":{"start_line":93,"start_character":17,"end_line":94,"end_character":57},"in_reply_to":"5f7c97a3_cec56392","updated":"2018-07-24 09:31:54.000000000","message":"Done","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"b40133dcb23c0dc0741cd64d14f5a2c65b194c5b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d sa.and_(models.Lease.start_date \u003c start_date,"},{"line_number":94,"context_line":"                      models.Lease.end_date \u003c start_date)"},{"line_number":95,"context_line":"    border1 \u003d sa.and_(models.Lease.start_date \u003e end_date,"},{"line_number":96,"context_line":"                      models.Lease.end_date \u003e end_date)"},{"line_number":97,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"},{"line_number":98,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":99,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_4eb95314","line":96,"range":{"start_line":95,"start_character":17,"end_line":96,"end_character":55},"updated":"2018-07-24 05:05:04.000000000","message":"I think just \"models.Lease.start_date \u003e end_date\" is enough.","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79d562dd25c60e470718207a43ed429b0e05433","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d sa.and_(models.Lease.start_date \u003c start_date,"},{"line_number":94,"context_line":"                      models.Lease.end_date \u003c start_date)"},{"line_number":95,"context_line":"    border1 \u003d sa.and_(models.Lease.start_date \u003e end_date,"},{"line_number":96,"context_line":"                      models.Lease.end_date \u003e end_date)"},{"line_number":97,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"},{"line_number":98,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":99,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_050499c4","line":96,"range":{"start_line":95,"start_character":17,"end_line":96,"end_character":55},"in_reply_to":"5f7c97a3_4eb95314","updated":"2018-07-24 09:31:54.000000000","message":"Done","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"cb0393882cf9cc3afb5f3c1f9f9424ecd08261d6","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d models.Lease.end_date \u003c start_date"},{"line_number":94,"context_line":"    border1 \u003d models.Lease.start_date \u003e end_date"},{"line_number":95,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"},{"line_number":96,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":97,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"},{"line_number":98,"context_line":"                     .in_(host_ids))"},{"line_number":99,"context_line":"             .filter(~sa.or_(border0, border1)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_009f0eb2","line":96,"range":{"start_line":95,"start_character":0,"end_line":96,"end_character":67},"updated":"2018-11-26 16:36:30.000000000","message":"Looks like you\u0027re doing a join twice on ComputeHostAllocation.","commit_id":"fb5da51dd223474506e7d637acaa3654a230fd46"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"9a1548de518b885617e7d7c84d0f6819a01b51b2","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    session \u003d get_session()"},{"line_number":93,"context_line":"    border0 \u003d models.Lease.end_date \u003c start_date"},{"line_number":94,"context_line":"    border1 \u003d models.Lease.start_date \u003e end_date"},{"line_number":95,"context_line":"    query \u003d (session.query(models.Reservation, models.ComputeHostAllocation)"},{"line_number":96,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":97,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"},{"line_number":98,"context_line":"                     .in_(host_ids))"},{"line_number":99,"context_line":"             .filter(~sa.or_(border0, border1)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_a04be57d","line":96,"range":{"start_line":95,"start_character":0,"end_line":96,"end_character":67},"in_reply_to":"3f79a3b5_009f0eb2","updated":"2018-12-06 09:35:42.000000000","message":"From my understand, the arguments of the query method represents a tuple of models the query returns, not a join.","commit_id":"fb5da51dd223474506e7d637acaa3654a230fd46"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"e59b9d45a2c572cd9d69c5fa741fa41d9a425497","unresolved":false,"context_lines":[{"line_number":96,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":97,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"},{"line_number":98,"context_line":"                     .in_(host_ids))"},{"line_number":99,"context_line":"             .filter(~sa.or_(border0, border1)))"},{"line_number":100,"context_line":"    return query.all()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_83f02168","line":99,"range":{"start_line":99,"start_character":21,"end_line":99,"end_character":46},"updated":"2018-10-25 08:06:43.000000000","message":"nit: I would avoid using negative filters in SQL, I would do something like:\n\n   sa.and_(models.Lease.end_date \u003e start_date,\n           models.Lease.start_date \u003c end_date)","commit_id":"fb5da51dd223474506e7d637acaa3654a230fd46"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"b97cd440022ca88cea3186956c1215945d22939f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"             .join(models.Lease).join(models.ComputeHostAllocation)"},{"line_number":97,"context_line":"             .filter(models.ComputeHostAllocation.compute_host_id"},{"line_number":98,"context_line":"                     .in_(host_ids))"},{"line_number":99,"context_line":"             .filter(~sa.or_(border0, border1)))"},{"line_number":100,"context_line":"    return query.all()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_d3b84e79","line":99,"range":{"start_line":99,"start_character":21,"end_line":99,"end_character":46},"in_reply_to":"3f79a3b5_83f02168","updated":"2018-11-06 05:49:53.000000000","message":"Thanks, Tetsuro.\n\nThis filter follows the style of other util functions in this file. I fix the expression and the others in https://review.openstack.org/#/c/615727/ .","commit_id":"fb5da51dd223474506e7d637acaa3654a230fd46"}],"blazar/plugins/oshosts/host_plugin.py":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"bc9d97ac588b4d07a4ca51dd450dbb0174cccadc","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        end \u003d datetime.date.max"},{"line_number":510,"context_line":"        allocations \u003d db_utils.get_reservations_by_host_ids(hosts_id_list,"},{"line_number":511,"context_line":"                                                            start, end)"},{"line_number":512,"context_line":"        "},{"line_number":513,"context_line":"        reservations \u003d {}"},{"line_number":514,"context_line":"        for alloc in allocations:"},{"line_number":515,"context_line":"            if alloc[\u0027compute_host_id\u0027] in reservations:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_21289c31","line":512,"range":{"start_line":512,"start_character":0,"end_line":512,"end_character":8},"updated":"2018-07-12 16:44:51.000000000","message":"Delete whitespace.","commit_id":"ce8233232465b5dd1c8ca87eb37e553e0a3eec75"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"1eb6b7fd8afefb4facb8d472b226524ef820d0d5","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        end \u003d datetime.date.max"},{"line_number":510,"context_line":"        allocations \u003d db_utils.get_reservations_by_host_ids(hosts_id_list,"},{"line_number":511,"context_line":"                                                            start, end)"},{"line_number":512,"context_line":"        "},{"line_number":513,"context_line":"        reservations \u003d {}"},{"line_number":514,"context_line":"        for alloc in allocations:"},{"line_number":515,"context_line":"            if alloc[\u0027compute_host_id\u0027] in reservations:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_f1458845","line":512,"range":{"start_line":512,"start_character":0,"end_line":512,"end_character":8},"in_reply_to":"5f7c97a3_21289c31","updated":"2018-07-17 02:35:54.000000000","message":"Done","commit_id":"ce8233232465b5dd1c8ca87eb37e553e0a3eec75"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"b40133dcb23c0dc0741cd64d14f5a2c65b194c5b","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                # they have to rerun"},{"line_number":485,"context_line":"                raise manager_ex.CantDeleteHost(host\u003dhost_id, msg\u003dstr(e))"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def list_allocations(self, query):"},{"line_number":488,"context_line":"        hosts_id_list \u003d [h[\u0027id\u0027] for h in db_api.host_list()]"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        hosts_allocations \u003d self.query_host_allocations(hosts_id_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_0e003b69","line":487,"range":{"start_line":487,"start_character":31,"end_line":487,"end_character":36},"updated":"2018-07-24 05:05:04.000000000","message":"Will it be used by another patch?","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79d562dd25c60e470718207a43ed429b0e05433","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                # they have to rerun"},{"line_number":485,"context_line":"                raise manager_ex.CantDeleteHost(host\u003dhost_id, msg\u003dstr(e))"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def list_allocations(self, query):"},{"line_number":488,"context_line":"        hosts_id_list \u003d [h[\u0027id\u0027] for h in db_api.host_list()]"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"        hosts_allocations \u003d self.query_host_allocations(hosts_id_list)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_25fc35b5","line":487,"range":{"start_line":487,"start_character":31,"end_line":487,"end_character":36},"in_reply_to":"5f7c97a3_0e003b69","updated":"2018-07-24 09:31:54.000000000","message":"Yes, this query will be used in later patch to support lease_id, reservation_id and terminated parameters.","commit_id":"92aea40adcac34b4bc88f46c1b9653349b8c420e"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"9d147b11d90c7bf9c29e4480b618adf62f560e90","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        end \u003d datetime.date.max"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"        # To reduce overhead, this method only executes one query"},{"line_number":531,"context_line":"        # to get the allocation infomation"},{"line_number":532,"context_line":"        allocs \u003d db_utils.get_reservation_allocations_by_host_ids("},{"line_number":533,"context_line":"            hosts, start, end)"},{"line_number":534,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ffd0ebdf_462c1247","line":531,"range":{"start_line":531,"start_character":32,"end_line":531,"end_character":42},"updated":"2019-01-03 09:11:44.000000000","message":"nit: information","commit_id":"05cec15e8cda8feaac7d41ec505656deaa943b2b"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"16198fec6ff764e7639fafaa9cec3ddaf003a685","unresolved":false,"context_lines":[{"line_number":528,"context_line":"        end \u003d datetime.date.max"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"        # To reduce overhead, this method only executes one query"},{"line_number":531,"context_line":"        # to get the allocation infomation"},{"line_number":532,"context_line":"        allocs \u003d db_utils.get_reservation_allocations_by_host_ids("},{"line_number":533,"context_line":"            hosts, start, end)"},{"line_number":534,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"dfd5e7cf_99f23a06","line":531,"range":{"start_line":531,"start_character":32,"end_line":531,"end_character":42},"in_reply_to":"ffd0ebdf_462c1247","updated":"2019-01-08 12:35:31.000000000","message":"Done","commit_id":"05cec15e8cda8feaac7d41ec505656deaa943b2b"}]}
