)]}'
{"neutron/cmd/sanity/checks.py":[{"author":{"_account_id":14605,"name":"vikram.choudhary","email":"vikschw@gmail.com","username":"vikram.choudhary"},"change_message_id":"fa24bbee93a301698a48f8b432ac1f59a858d105","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from neutron.plugins.common import constants as const"},{"line_number":36,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.agent.common \\"},{"line_number":37,"context_line":"    import constants as ovs_const"},{"line_number":38,"context_line":"from neutron.tests import base"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_cfd34c5e","line":38,"updated":"2016-03-30 05:32:08.000000000","message":"How about defining this function in the neutron.common.utils.py?","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"6d485982b52d09b8ec18ab283f02f00868093846","unresolved":false,"context_lines":[{"line_number":35,"context_line":"from neutron.plugins.common import constants as const"},{"line_number":36,"context_line":"from neutron.plugins.ml2.drivers.openvswitch.agent.common \\"},{"line_number":37,"context_line":"    import constants as ovs_const"},{"line_number":38,"context_line":"from neutron.tests import base"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_cbedd9b8","line":38,"in_reply_to":"ba0121b8_cfd34c5e","updated":"2016-03-30 15:23:07.000000000","message":"I think that would make sense, but maybe as a separate patch.","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ac650b0b1db2c2f59e2951d3e3dc18c45b709dd4","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def ovs_vxlan_supported(from_ip\u003d\u0027192.0.2.1\u0027, to_ip\u003d\u0027192.0.2.2\u0027):"},{"line_number":48,"context_line":"    name \u003d base.get_rand_device_name(\u0027vxlantest-\u0027)"},{"line_number":49,"context_line":"    with ovs_lib.OVSBridge(name) as br:"},{"line_number":50,"context_line":"        port \u003d br.add_tunnel_port(from_ip, to_ip, const.TYPE_VXLAN)"},{"line_number":51,"context_line":"        return port !\u003d ovs_lib.INVALID_OFPORT"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_c56f7d29","line":48,"updated":"2016-03-30 18:09:32.000000000","message":"nit: get_rand_device_name() uses a kwarg for its single parameter; would it be a better practice to thus pass using the kwarg? \n\ne.g.\n\nbase.get_rand_device_name(prefix\u003d\u0027vxlantest-\u0027)\n\n\nSame applies to other usages below.","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"8bf863572a9d9f7f6876fecccf09b4a8507bcd39","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def ovs_vxlan_supported(from_ip\u003d\u0027192.0.2.1\u0027, to_ip\u003d\u0027192.0.2.2\u0027):"},{"line_number":48,"context_line":"    name \u003d base.get_rand_device_name(\u0027vxlantest-\u0027)"},{"line_number":49,"context_line":"    with ovs_lib.OVSBridge(name) as br:"},{"line_number":50,"context_line":"        port \u003d br.add_tunnel_port(from_ip, to_ip, const.TYPE_VXLAN)"},{"line_number":51,"context_line":"        return port !\u003d ovs_lib.INVALID_OFPORT"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_236bd186","line":48,"in_reply_to":"ba0121b8_c56f7d29","updated":"2016-03-30 18:38:22.000000000","message":"Sure. In practice it won\u0027t make much difference because the signature of the function is very unlikely to change, but better is better. :)","commit_id":"3e387db0369d5072f155214730515b6166f2e479"}],"neutron/tests/base.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a01e6475f2d633027001e26146837ab5921ef71d","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - len(max(prefixes, key\u003dlen))"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_90025a3d","line":82,"updated":"2016-03-28 22:30:09.000000000","message":"Overkill, prefer the following which is more readable and faster:\n\n length \u003d max_length - max(len(p) for p in prefixes))","commit_id":"6a6106085791cb54dd79fcd9922fb4f297688c49"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"b789c6c0c7138756d466648f3ec425c2c30199aa","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - len(max(prefixes, key\u003dlen))"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_1a5f55e6","line":82,"in_reply_to":"ba0121b8_90025a3d","updated":"2016-03-29 18:50:07.000000000","message":"ha, yeah. that\u0027s certainly better. :)","commit_id":"6a6106085791cb54dd79fcd9922fb4f297688c49"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ac650b0b1db2c2f59e2951d3e3dc18c45b709dd4","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    return []"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def get_related_rand_names(prefixes, max_length\u003dNone):"},{"line_number":74,"context_line":"    \"\"\"Returns a list of the prefix strings with random characters appended"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    :param prefixes: A list of prefix strings"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_c815d440","line":73,"updated":"2016-03-30 18:09:32.000000000","message":"nit question: I\u0027m a little confused on the use of \u0027related\u0027 in the naming... How are they names related other than by their max_length or if caller passes in related prefixes?","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"8bf863572a9d9f7f6876fecccf09b4a8507bcd39","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    return []"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def get_related_rand_names(prefixes, max_length\u003dNone):"},{"line_number":74,"context_line":"    \"\"\"Returns a list of the prefix strings with random characters appended"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    :param prefixes: A list of prefix strings"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_4389a574","line":73,"in_reply_to":"ba0121b8_c815d440","updated":"2016-03-30 18:38:22.000000000","message":"All prefixes have the *same* random characters appended. If you have a couple of ports that you want to have a related random name to make debugging easier, you could have peer-abc123 and patch-abc123 for instance.","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"ac650b0b1db2c2f59e2951d3e3dc18c45b709dd4","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        max_length\u003dconstants.DEVICE_NAME_MAX_LEN, prefix\u003dprefix)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"def get_related_rand_device_names(prefixes):"},{"line_number":107,"context_line":"    return get_related_rand_names(prefixes,"},{"line_number":108,"context_line":"                                  max_length\u003dconstants.DEVICE_NAME_MAX_LEN)"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_282d7095","line":106,"updated":"2016-03-30 18:09:32.000000000","message":"Same question as above w/r/t the use of \u0027related\u0027 in the function def.","commit_id":"3e387db0369d5072f155214730515b6166f2e479"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"1c9551beda38f6718ef2017e8a83ab80a2a4104a","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def get_related_rand_names(prefixes, max_length\u003dNone):"},{"line_number":74,"context_line":"    \"\"\"Returns a list of the prefixes with the same random characters appended"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    :param prefixes: A list of prefix strings"},{"line_number":77,"context_line":"    :param max_length: The maximum length of each returned string"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_57111403","line":74,"range":{"start_line":74,"start_character":38,"end_line":74,"end_character":69},"updated":"2016-04-01 01:11:31.000000000","message":"What does this mean? It seems this method returns prefixes with different random characters.","commit_id":"12c4e89239376fe3e18bd260b46424da5226a428"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"1c9551beda38f6718ef2017e8a83ab80a2a4104a","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    return [p + utils.get_random_string(length) for p in prefixes]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_rand_name(max_length\u003dNone, prefix\u003d\u0027test\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_f7194823","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":47},"updated":"2016-04-01 01:11:31.000000000","message":"You may want to move this definition above.","commit_id":"12c4e89239376fe3e18bd260b46424da5226a428"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"5655d76cd80acd4e5e12d45b0a94e854ae4c2dee","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    return [p + utils.get_random_string(length) for p in prefixes]"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def get_rand_name(max_length\u003dNone, prefix\u003d\u0027test\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_848d20d5","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":47},"in_reply_to":"ba0121b8_f7194823","updated":"2016-04-01 14:28:51.000000000","message":"Oops! When I moved things around to re-use get_related_rand_names in get_rand_name, I rewrote the function and accidentally took out the useful part. Fixed.","commit_id":"12c4e89239376fe3e18bd260b46424da5226a428"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"8d3b81d15c0bbf14da1094b16e2ea419516892b0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    :returns: A list with each prefix appended with the same random characters"},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - max(len(p) for p in prefixes)"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    rndchrs \u003d utils.get_random_string(length)"},{"line_number":88,"context_line":"    return [p + rndchrs for p in prefixes]"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_2f7fc415","line":86,"range":{"start_line":81,"start_character":0,"end_line":86,"end_character":18},"updated":"2016-04-01 18:05:06.000000000","message":"nit:\n\nlength \u003d 8\nif max_length:\n    length \u003d max_length - max(len(p) for p in prefixes)\n    if length \u003c\u003d 0:\n        raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")","commit_id":"8ad9c902c20397f5ee643990ef1847e7f2ab799b"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"9046b7347c5855eeb5c4cba414506a5672162d7d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    :returns: A list with each prefix appended with the same random characters"},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - max(len(p) for p in prefixes)"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    rndchrs \u003d utils.get_random_string(length)"},{"line_number":88,"context_line":"    return [p + rndchrs for p in prefixes]"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_8bc16fe7","line":86,"range":{"start_line":81,"start_character":0,"end_line":86,"end_character":18},"in_reply_to":"9a061dce_e5201c9e","updated":"2016-04-05 01:29:28.000000000","message":"Yeah, the suggestion basically has the same effect except being minutely slower by doing an unnecessary assignment if max_length is set, basically to save a single line of code and an indention.","commit_id":"8ad9c902c20397f5ee643990ef1847e7f2ab799b"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"99f4455fc1c0b6060b5a8bb8430a7d596a49c65d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    :returns: A list with each prefix appended with the same random characters"},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - max(len(p) for p in prefixes)"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    rndchrs \u003d utils.get_random_string(length)"},{"line_number":88,"context_line":"    return [p + rndchrs for p in prefixes]"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_61eeecb5","line":86,"range":{"start_line":81,"start_character":0,"end_line":86,"end_character":18},"in_reply_to":"ba0121b8_2f7fc415","updated":"2016-04-01 19:53:41.000000000","message":"This would change the behavior of the function. If max_length is None, we don\u0027t do any length restriction, it will just be whatever length prefix followed by 8 random characters. With your change, max_length of None would result in the whole string being 8 characters.\n\n(I almost did the same change)","commit_id":"8ad9c902c20397f5ee643990ef1847e7f2ab799b"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1c08f68d593da94449b8a522d3cddee011c50996","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    :returns: A list with each prefix appended with the same random characters"},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - max(len(p) for p in prefixes)"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    rndchrs \u003d utils.get_random_string(length)"},{"line_number":88,"context_line":"    return [p + rndchrs for p in prefixes]"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_e5201c9e","line":86,"range":{"start_line":81,"start_character":0,"end_line":86,"end_character":18},"in_reply_to":"ba0121b8_2f7fc415","updated":"2016-04-04 23:21:26.000000000","message":"Why??? It has exactly the same effect","commit_id":"8ad9c902c20397f5ee643990ef1847e7f2ab799b"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"e4eab4e542856528e8df6cc67186a291d3616398","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    :returns: A list with each prefix appended with the same random characters"},{"line_number":79,"context_line":"    \"\"\""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    if max_length:"},{"line_number":82,"context_line":"        length \u003d max_length - max(len(p) for p in prefixes)"},{"line_number":83,"context_line":"        if length \u003c\u003d 0:"},{"line_number":84,"context_line":"            raise ValueError(\"\u0027max_length\u0027 must be longer than all prefixes\")"},{"line_number":85,"context_line":"    else:"},{"line_number":86,"context_line":"        length \u003d 8"},{"line_number":87,"context_line":"    rndchrs \u003d utils.get_random_string(length)"},{"line_number":88,"context_line":"    return [p + rndchrs for p in prefixes]"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_61738c16","line":86,"range":{"start_line":81,"start_character":0,"end_line":86,"end_character":18},"in_reply_to":"ba0121b8_61eeecb5","updated":"2016-04-01 19:55:16.000000000","message":"Wait, no. I misread your comment. length, not max_length.","commit_id":"8ad9c902c20397f5ee643990ef1847e7f2ab799b"}]}
