)]}'
{"cinder/api/contrib/hosts.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f927c688d7b5aea5a70fad36fa8bcd94c838eb6","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    curr_time \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":101,"context_line":"    context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":102,"context_line":"    filters \u003d {}"},{"line_number":103,"context_line":"    filters[\u0027disabled\u0027] \u003d False"},{"line_number":104,"context_line":"    services \u003d objects.ServiceList.get_all(context, filters)"},{"line_number":105,"context_line":"    zone \u003d \u0027\u0027"},{"line_number":106,"context_line":"    if \u0027zone\u0027 in req.GET:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_5d9f3803","line":103,"updated":"2016-02-15 11:43:04.000000000","message":"?: Why is this a 2 step process?  `filters \u003d {\u0027disabled\u0027: False}`","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"87f5bac3feacc1e00c071a4c65e6922f7753886c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    curr_time \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":101,"context_line":"    context \u003d req.environ[\u0027cinder.context\u0027]"},{"line_number":102,"context_line":"    filters \u003d {}"},{"line_number":103,"context_line":"    filters[\u0027disabled\u0027] \u003d False"},{"line_number":104,"context_line":"    services \u003d objects.ServiceList.get_all(context, filters)"},{"line_number":105,"context_line":"    zone \u003d \u0027\u0027"},{"line_number":106,"context_line":"    if \u0027zone\u0027 in req.GET:"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_404f4c92","line":103,"in_reply_to":"dae33548_5d9f3803","updated":"2016-02-15 12:02:53.000000000","message":"Done","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"}],"cinder/api/contrib/services.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"6370324f2ca8975d6fd0459e6e698b93a77472bf","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            binary \u003d req.GET[\u0027binary\u0027]"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if host:"},{"line_number":101,"context_line":"            services \u003d [s for s in services if s.host \u003d\u003d host]"},{"line_number":102,"context_line":"        # NOTE(uni): deprecating service request key, binary takes precedence"},{"line_number":103,"context_line":"        binary_key \u003d binary or service"},{"line_number":104,"context_line":"        if binary_key:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_a63e1b8a","side":"PARENT","line":101,"updated":"2016-01-05 07:04:58.000000000","message":"How about:\n    serivces \u003d [s for s in services if s.host \u003d\u003d host or vol_utils.extract_host(s.host, \u0027host\u0027) \u003d\u003d host]","commit_id":"9ae6f0de65e94315ab25c3a448855c68f6e54621"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8e10fbe44154258c3a004e3a5e0c3aff665207d6","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        # NOTE(uni): deprecating service request key, binary takes precedence"},{"line_number":103,"context_line":"        binary_key \u003d binary or service"},{"line_number":104,"context_line":"        if binary_key:"},{"line_number":105,"context_line":"            services \u003d [s for s in services if s.binary \u003d\u003d binary_key]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        svcs \u003d []"},{"line_number":108,"context_line":"        for svc in services:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_6e802047","line":105,"updated":"2016-01-04 14:00:18.000000000","message":"Both host and binary filters should be applied on the DB side","commit_id":"0630005a8b5d8b7a1d89f3b445d7b8302c67296a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"bb5140361c26518a9aa2ece4c753c00afad48225","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        filters \u003d {}"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        host \u003d \u0027\u0027"},{"line_number":89,"context_line":"        if \u0027host\u0027 in req.GET:"},{"line_number":90,"context_line":"            host \u003d req.GET[\u0027host\u0027]"},{"line_number":91,"context_line":"            filters[\u0027host\u0027] \u003d host"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_41a79fa6","line":88,"updated":"2016-02-02 08:45:11.000000000","message":"The definition is not needed because of your changes.","commit_id":"a2891fb00d2b44fdacc802b88ae3bc56685cc4ee"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"bb5140361c26518a9aa2ece4c753c00afad48225","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        if \u0027host\u0027 in req.GET:"},{"line_number":90,"context_line":"            host \u003d req.GET[\u0027host\u0027]"},{"line_number":91,"context_line":"            filters[\u0027host\u0027] \u003d host"},{"line_number":92,"context_line":"        service \u003d \u0027\u0027"},{"line_number":93,"context_line":"        if \u0027service\u0027 in req.GET:"},{"line_number":94,"context_line":"            service \u003d req.GET[\u0027service\u0027]"},{"line_number":95,"context_line":"            filters[\u0027binary\u0027] \u003d service"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_01bc47b9","line":92,"updated":"2016-02-02 08:45:11.000000000","message":"same above.","commit_id":"a2891fb00d2b44fdacc802b88ae3bc56685cc4ee"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"bb5140361c26518a9aa2ece4c753c00afad48225","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            versionutils.report_deprecated_feature(LOG, _("},{"line_number":97,"context_line":"                \"Query by service parameter is deprecated. \""},{"line_number":98,"context_line":"                \"Please use binary parameter instead.\"))"},{"line_number":99,"context_line":"        binary \u003d \u0027\u0027"},{"line_number":100,"context_line":"        if \u0027binary\u0027 in req.GET:"},{"line_number":101,"context_line":"            binary \u003d req.GET[\u0027binary\u0027]"},{"line_number":102,"context_line":"            filters[\u0027binary\u0027] \u003d binary"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_81c83756","line":99,"updated":"2016-02-02 08:45:11.000000000","message":"same above.","commit_id":"a2891fb00d2b44fdacc802b88ae3bc56685cc4ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f927c688d7b5aea5a70fad36fa8bcd94c838eb6","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                \"Query by service parameter is deprecated. \""},{"line_number":94,"context_line":"                \"Please use binary parameter instead.\"))"},{"line_number":95,"context_line":"        if \u0027binary\u0027 in req.GET:"},{"line_number":96,"context_line":"            filters[\u0027binary\u0027] \u003d req.GET[\u0027binary\u0027]"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        services \u003d objects.ServiceList.get_all(context, filters)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_9d5ee043","line":96,"updated":"2016-02-15 11:43:04.000000000","message":"-1: This should be:\n\n   if \u0027binary\u0027 in req.GET:\n      ...\n   elif \u0027service\u0027 in req.GET:","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"}],"cinder/db/api.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"def service_get_all(context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":110,"context_line":"    \"\"\"Get all services.\"\"\""},{"line_number":111,"context_line":"    return IMPL.service_get_all(context, host, binary, disabled\u003ddisabled)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"def service_get_all_by_topic(context, topic, disabled\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_e0fac874","line":111,"updated":"2016-01-22 13:07:54.000000000","message":"nit: Not really necessary to specify the key argument for disabled.","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6695c74d959a92df86ddc0dd1fe8d7613058d790","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"@require_admin_context"},{"line_number":382,"context_line":"def service_get_all_by_host(context, host, binary):"},{"line_number":383,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":384,"context_line":"    if host:"},{"line_number":385,"context_line":"        host_attr \u003d getattr(models.Service, \u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_aedc2675","line":382,"range":{"start_line":382,"start_character":4,"end_line":382,"end_character":27},"updated":"2016-01-07 20:41:48.000000000","message":"Isn\u0027t the pair host+binary actually unique and this will be the same like service_get_by_args? And if not - shouldn\u0027t we name this service_get_all_by_args for consistency?","commit_id":"e0e75955bf82b9a561501aff7eff288b5175f769"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6695c74d959a92df86ddc0dd1fe8d7613058d790","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    if host:"},{"line_number":385,"context_line":"        host_attr \u003d getattr(models.Service, \u0027host\u0027)"},{"line_number":386,"context_line":"        conditions \u003d [host_attr \u003d\u003d host,"},{"line_number":387,"context_line":"                      host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027)]"},{"line_number":388,"context_line":"        query \u003d query.filter(or_(*conditions))"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    if binary:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_0ece92b4","line":387,"range":{"start_line":387,"start_character":0,"end_line":387,"end_character":56},"updated":"2016-01-07 20:41:48.000000000","message":"Won\u0027t this change the current behavior?","commit_id":"e0e75955bf82b9a561501aff7eff288b5175f769"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"c94a4e3a8dcfe11d4a39919448582bf8e199daa4","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    if host:"},{"line_number":385,"context_line":"        host_attr \u003d getattr(models.Service, \u0027host\u0027)"},{"line_number":386,"context_line":"        conditions \u003d [host_attr \u003d\u003d host,"},{"line_number":387,"context_line":"                      host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027)]"},{"line_number":388,"context_line":"        query \u003d query.filter(or_(*conditions))"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    if binary:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_abbb43e4","line":387,"range":{"start_line":387,"start_character":0,"end_line":387,"end_character":56},"in_reply_to":"fa69d971_0ece92b4","updated":"2016-01-10 20:39:21.000000000","message":"In such a way we produce the clause with the keyword LIKE to form SQL Query. So the service cinder-volume (which host looks like host@lvmdriver-1 or host@ceph) wouldn\u0027t be omitted.","commit_id":"e0e75955bf82b9a561501aff7eff288b5175f769"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"da7927f8f13e3b439577230f2263d5ba91eea821","unresolved":false,"context_lines":[{"line_number":382,"context_line":"def service_get_all_by_args(context, host, binary):"},{"line_number":383,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":384,"context_line":"    if host:"},{"line_number":385,"context_line":"        host_attr \u003d getattr(models.Service, \u0027host\u0027)"},{"line_number":386,"context_line":"        conditions \u003d [host_attr \u003d\u003d host,"},{"line_number":387,"context_line":"                      host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027)]"},{"line_number":388,"context_line":"        query \u003d query.filter(or_(*conditions))"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_7c357344","line":385,"updated":"2016-01-19 13:15:20.000000000","message":"-1: models.Service.host","commit_id":"e465ba68d4a41e1c1a29e6aa42f22e22c167c68e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"da7927f8f13e3b439577230f2263d5ba91eea821","unresolved":false,"context_lines":[{"line_number":384,"context_line":"    if host:"},{"line_number":385,"context_line":"        host_attr \u003d getattr(models.Service, \u0027host\u0027)"},{"line_number":386,"context_line":"        conditions \u003d [host_attr \u003d\u003d host,"},{"line_number":387,"context_line":"                      host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027)]"},{"line_number":388,"context_line":"        query \u003d query.filter(or_(*conditions))"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"    if binary:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_1c7f97ab","line":387,"updated":"2016-01-19 13:15:20.000000000","message":"nit: If we move the or_ here we don\u0027t need to construct a list just to pass it to or_ and the host_attr variable doesn\u0027t provide that much added clarity:\n\n conditions \u003d or_(models.Service.host \u003d\u003d host,\n                  host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))","commit_id":"e465ba68d4a41e1c1a29e6aa42f22e22c167c68e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"@require_admin_context"},{"line_number":372,"context_line":"def service_get_all(context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":373,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    if host:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_408634dc","line":372,"updated":"2016-01-22 13:07:54.000000000","message":"nit: When adding new fields to a method it\u0027s usually best to add them at the end.  In this case this is not necessary because there\u0027s only 1 call.","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c9ddd0c1853ff3921fcb6ef12c025add204e0b80","unresolved":false,"context_lines":[{"line_number":369,"context_line":""},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"@require_admin_context"},{"line_number":372,"context_line":"def service_get_all(context, disabled\u003dNone):"},{"line_number":373,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"    if disabled is not None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_1e9dc8bb","side":"PARENT","line":372,"updated":"2016-02-01 03:57:32.000000000","message":"Change this to\n\n    def service_get_all(context, filters\u003dNone):\n\nAnd filters can be any of [\u0027host\u0027, \u0027binary\u0027, disabled\u0027]","commit_id":"9ae6f0de65e94315ab25c3a448855c68f6e54621"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"bb5140361c26518a9aa2ece4c753c00afad48225","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    try:"},{"line_number":382,"context_line":"        host \u003d filters.pop(\u0027host\u0027)"},{"line_number":383,"context_line":"        host_attr \u003d models.Service.host"},{"line_number":384,"context_line":"        conditions \u003d or_(host_attr \u003d\u003d host, host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_817597cb","line":381,"updated":"2016-02-02 08:45:11.000000000","message":"Why try and catch KeyError here? \n\nWhy not just check whether host in filters?","commit_id":"a2891fb00d2b44fdacc802b88ae3bc56685cc4ee"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"64c947a2c5809378c0ff81648cfe0b155bea0d18","unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    try:"},{"line_number":382,"context_line":"        host \u003d filters.pop(\u0027host\u0027)"},{"line_number":383,"context_line":"        host_attr \u003d models.Service.host"},{"line_number":384,"context_line":"        conditions \u003d or_(host_attr \u003d\u003d host, host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_4ccd9385","line":381,"in_reply_to":"7a5de9d1_817597cb","updated":"2016-02-02 09:42:32.000000000","message":"It\u0027s pythonic and faster.","commit_id":"a2891fb00d2b44fdacc802b88ae3bc56685cc4ee"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f927c688d7b5aea5a70fad36fa8bcd94c838eb6","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    try:"},{"line_number":382,"context_line":"        host \u003d filters.pop(\u0027host\u0027)"},{"line_number":383,"context_line":"        host_attr \u003d models.Service.host"},{"line_number":384,"context_line":"        conditions \u003d or_(host_attr \u003d\u003d host, host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))"},{"line_number":385,"context_line":"        query \u003d query.filter(conditions)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_5d3737b0","line":382,"updated":"2016-02-15 11:43:04.000000000","message":"nit: This doesn\u0027t need a try clause: `host \u003d filters.pop(\u0027host\u0027, None)` and then the `if host` stays as it is.","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"87f5bac3feacc1e00c071a4c65e6922f7753886c","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    try:"},{"line_number":382,"context_line":"        host \u003d filters.pop(\u0027host\u0027)"},{"line_number":383,"context_line":"        host_attr \u003d models.Service.host"},{"line_number":384,"context_line":"        conditions \u003d or_(host_attr \u003d\u003d host, host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))"},{"line_number":385,"context_line":"        query \u003d query.filter(conditions)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_e0b0208e","line":382,"in_reply_to":"dae33548_5d3737b0","updated":"2016-02-15 12:02:53.000000000","message":"IMO, in such a way it\u0027s faster then than check \u0027if host\u0027","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b79fe93022248b0fe1dc9971dd994491a9fa1834","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    query \u003d model_query(context, models.Service)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"    try:"},{"line_number":382,"context_line":"        host \u003d filters.pop(\u0027host\u0027)"},{"line_number":383,"context_line":"        host_attr \u003d models.Service.host"},{"line_number":384,"context_line":"        conditions \u003d or_(host_attr \u003d\u003d host, host_attr.op(\u0027LIKE\u0027)(host + \u0027@%\u0027))"},{"line_number":385,"context_line":"        query \u003d query.filter(conditions)"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_4912d0b5","line":382,"in_reply_to":"dae33548_e0b0208e","updated":"2016-02-15 14:26:53.000000000","message":"It\u0027s only faster if we have a host, if the exception is raised this is a lot slower.\n\nSpeed was not the reason why I mentioned, it was that I thought it was easier to read.","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"}],"cinder/objects/service.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"da7927f8f13e3b439577230f2263d5ba91eea821","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027Service\u0027),"},{"line_number":107,"context_line":"    }"},{"line_number":108,"context_line":"    child_versions \u003d {"},{"line_number":109,"context_line":"        \u00271.0\u0027: \u00271.0\u0027"},{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba63e191_fc1ac316","line":109,"updated":"2016-01-19 13:15:20.000000000","message":"-1: child_versions needs updating","commit_id":"e465ba68d4a41e1c1a29e6aa42f22e22c167c68e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"@base.CinderObjectRegistry.register"},{"line_number":102,"context_line":"class ServiceList(base.ObjectListBase, base.CinderObject):"},{"line_number":103,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    fields \u003d {"},{"line_number":106,"context_line":"        \u0027objects\u0027: fields.ListOfObjectsField(\u0027Service\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_604c989e","line":103,"updated":"2016-01-22 13:07:54.000000000","message":"nit: It\u0027s usually nice to document what has changed in each version.","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @base.remotable_classmethod"},{"line_number":113,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":114,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":115,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":116,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_6b4f996b","line":113,"updated":"2016-01-22 13:07:54.000000000","message":"?: Not sure if this could create problems since you are changing an argument name and position on a remotable class method,","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bb6f6bdb4ec072f9935a5f75f730446b542252ab","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    }"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @base.remotable_classmethod"},{"line_number":121,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":122,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":123,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":124,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a68dd71_b005a711","line":121,"updated":"2016-01-25 13:13:23.000000000","message":"?: I\u0027d still like to hear other\u0027s opinions before merging this on whether this change will create problems or not since we are changing an argument name and position on a remotable class method.","commit_id":"f2df11cea65a3ed18414447f5ad0cb657935a43b"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"7a9cd3cec4c6c2172057d5054420a8585b625fe5","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    }"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @base.remotable_classmethod"},{"line_number":121,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":122,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":123,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":124,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a68dd71_932e6df9","line":121,"in_reply_to":"9a68dd71_13eb5de0","updated":"2016-01-25 13:47:24.000000000","message":"Yes, but that\u0027s a method that is inside the node and cannot be called from the outside, while on the other hand this get_all method is remotable and therefore can be called from outside the node by other code that have the old definition of the method (different argument order and different argument name), so we need to be sure that we are either not using the remotable functionality or it doesn\u0027t actually break anything regarding VOs.","commit_id":"f2df11cea65a3ed18414447f5ad0cb657935a43b"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"06e948f73dfec5b9ff124a9b2c6120c61df88791","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    }"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @base.remotable_classmethod"},{"line_number":121,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":122,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":123,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":124,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a68dd71_13eb5de0","line":121,"in_reply_to":"9a68dd71_b005a711","updated":"2016-01-25 13:41:03.000000000","message":"If we look at https://github.com/openstack/cinder/blob/master/cinder/db/api.py#L109 there are already used the argument \u0027disabled\u0027","commit_id":"f2df11cea65a3ed18414447f5ad0cb657935a43b"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c9ddd0c1853ff3921fcb6ef12c025add204e0b80","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    }"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @base.remotable_classmethod"},{"line_number":113,"context_line":"    def get_all(cls, context, filters\u003dNone):"},{"line_number":114,"context_line":"        services \u003d db.service_get_all(context, filters)"},{"line_number":115,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":116,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_dea2d0fb","side":"PARENT","line":113,"updated":"2016-02-01 03:57:32.000000000","message":"Can we make use of \u0027filters\u0027 instead of chaning the interface? \u0027host\u0027, \u0027binary\u0027, \u0027disabled\u0027 even \u0027deleted\u0027 just one of the filter this call can support.  That way it will involve change underlying DB API, but it\u0027s still be in-node.","commit_id":"9ae6f0de65e94315ab25c3a448855c68f6e54621"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c9ddd0c1853ff3921fcb6ef12c025add204e0b80","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    API version history:"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        1.0 - Initial version"},{"line_number":108,"context_line":"        1.1 - Add optinal parameters host and binary"},{"line_number":109,"context_line":"    \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_3ea204fe","line":108,"updated":"2016-02-01 03:57:32.000000000","message":"The description here is not clear, 1.1 is about adding optional parameters to get_all() method.","commit_id":"5adf26e09e1063eba84839feabc3f4dea4486d53"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"01237af7483b7d0157170cc952572b515a4fe50b","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    }"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @base.remotable_classmethod"},{"line_number":121,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":122,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":123,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":124,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a68dd71_ee002004","line":121,"updated":"2016-01-25 14:17:24.000000000","message":"?: I\u0027d still like to hear other\u0027s opinions before merging this on whether this change will create problems or not since we are changing an argument name and position on a remotable class method.  See patch 11\u0027s comments for details.","commit_id":"5adf26e09e1063eba84839feabc3f4dea4486d53"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"c9ddd0c1853ff3921fcb6ef12c025add204e0b80","unresolved":false,"context_lines":[{"line_number":118,"context_line":"    }"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    @base.remotable_classmethod"},{"line_number":121,"context_line":"    def get_all(cls, context, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":122,"context_line":"        services \u003d db.service_get_all(context, host, binary, disabled)"},{"line_number":123,"context_line":"        return base.obj_make_list(context, cls(context), objects.Service,"},{"line_number":124,"context_line":"                                  services)"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a5de9d1_fea78c08","line":121,"updated":"2016-02-01 03:57:32.000000000","message":"We can not change the interface here (and use \u0027filters\u0027 instead)","commit_id":"5adf26e09e1063eba84839feabc3f4dea4486d53"}],"cinder/tests/unit/api/contrib/test_hosts.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    return datetime.datetime(2013, 7, 3, 0, 0, 2, tzinfo\u003dtzinfo)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def stub_service_get_all(self, req, host\u003dNone, binary\u003dNone):"},{"line_number":74,"context_line":"    return SERVICE_LIST"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_ab6031d0","line":73,"updated":"2016-01-22 13:07:54.000000000","message":"-1: There\u0027s 1 missing argument","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"bb6f6bdb4ec072f9935a5f75f730446b542252ab","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    return datetime.datetime(2013, 7, 3, 0, 0, 2, tzinfo\u003dtzinfo)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def stub_service_get_all(self, host\u003dNone, binary\u003dNone, disabled\u003dNone):"},{"line_number":74,"context_line":"    return SERVICE_LIST"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9a68dd71_3d7670d7","line":73,"updated":"2016-01-25 13:13:23.000000000","message":"nit: If I\u0027m not mistaken first argument is not self but context, because this method is being called unbinded to any instance.","commit_id":"f2df11cea65a3ed18414447f5ad0cb657935a43b"}],"cinder/tests/unit/api/contrib/test_services.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    if host and not binary:"},{"line_number":141,"context_line":"        return [s for s in fake_services_list if s[\u0027host\u0027] \u003d\u003d host]"},{"line_number":142,"context_line":"    if binary and not host:"},{"line_number":143,"context_line":"        return [s for s in fake_services_list if s[\u0027binary\u0027] \u003d\u003d binary]"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"def fake_service_get_by_host_binary(context, host, binary):"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_0b5e1d44","line":143,"updated":"2016-01-22 13:07:54.000000000","message":"nit: Not really nice method implementation (I know it\u0027s not your implementation):\n\n return [s for s in fake_services_list\n         if (not host or s[\u0027host\u0027] \u003d\u003d host)\n         and (not binary or s[\u0027binary\u0027] \u003d\u003d binary)]","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f927c688d7b5aea5a70fad36fa8bcd94c838eb6","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"def fake_service_get_all(context, filters\u003dNone):"},{"line_number":135,"context_line":"    filters \u003d filters.copy() if filters else {}"},{"line_number":136,"context_line":"    host \u003d filters.get(\u0027host\u0027)"},{"line_number":137,"context_line":"    binary \u003d filters.get(\u0027binary\u0027)"},{"line_number":138,"context_line":"    return [s for s in fake_services_list"}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_fdef2bae","line":135,"updated":"2016-02-15 11:43:04.000000000","message":"-1: Why do you create a copy of filters?\n\n filters \u003d filters or {}","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6f927c688d7b5aea5a70fad36fa8bcd94c838eb6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"    host \u003d filters.get(\u0027host\u0027)"},{"line_number":137,"context_line":"    binary \u003d filters.get(\u0027binary\u0027)"},{"line_number":138,"context_line":"    return [s for s in fake_services_list"},{"line_number":139,"context_line":"            if (not host or s[\u0027host\u0027] \u003d\u003d host)"},{"line_number":140,"context_line":"            and (not binary or s[\u0027binary\u0027] \u003d\u003d binary)]"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"dae33548_3d651345","line":139,"updated":"2016-02-15 11:43:04.000000000","message":"-1: This does not match the real implementation, it\u0027s missing: or host.startswith(host + \u0027@\u0027)","commit_id":"1ee5372c750090f6d3556095aa143c5c7ff18646"}],"cinder/tests/unit/objects/test_objects.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6695c74d959a92df86ddc0dd1fe8d7613058d790","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    \u0027ConsistencyGroup\u0027: \u00271.0-b9bad093daee0b259edddb3993c60c31\u0027,"},{"line_number":30,"context_line":"    \u0027ConsistencyGroupList\u0027: \u00271.0-09d0aad5491e762ecfdf66bef02ceb8d\u0027,"},{"line_number":31,"context_line":"    \u0027Service\u0027: \u00271.0-64baeb4911dbab1153064dd1c87edb9f\u0027,"},{"line_number":32,"context_line":"    \u0027ServiceList\u0027: \u00271.0-2b2d2c2666ebfc0013115b2d1c8d08dd\u0027,"},{"line_number":33,"context_line":"    \u0027Snapshot\u0027: \u00271.0-a6c33eefeadefb324d79f72f66c54e9a\u0027,"},{"line_number":34,"context_line":"    \u0027SnapshotList\u0027: \u00271.0-71661e7180ef6cc51501704a9bea4bf1\u0027,"},{"line_number":35,"context_line":"    \u0027Volume\u0027: \u00271.2-97c3977846dae6588381e7bd3e6e6558\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_0e13f20e","line":32,"range":{"start_line":32,"start_character":22,"end_line":32,"end_character":23},"updated":"2016-01-07 20:41:48.000000000","message":"I know this is strange, but as we\u0027re adding a remoteable method we should also raise the version…","commit_id":"e0e75955bf82b9a561501aff7eff288b5175f769"}],"cinder/tests/unit/objects/test_service.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"59a2969e0e25630d3d453a26556730d1bdc830f8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        db_service \u003d fake_service.fake_db_service()"},{"line_number":105,"context_line":"        service_get_all.return_value \u003d [db_service]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        services \u003d objects.ServiceList.get_all(self.context, \u0027host\u0027, \u0027foo\u0027)"},{"line_number":108,"context_line":"        service_get_all.assert_called_once_with(self.context, \u0027host\u0027, \u0027foo\u0027,"},{"line_number":109,"context_line":"                                                None)"},{"line_number":110,"context_line":"        self.assertEqual(1, len(services))"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_0613745c","line":107,"updated":"2016-01-22 13:07:54.000000000","message":"-1: You should also test the other method argument.","commit_id":"e3e19fe64bc5b5020969670a53ba5865a4099995"}]}
