)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make OVS interface name hashing algorithm common and extend it"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The OVS devcie name hashing algorithm shortens interface names that are too"},{"line_number":10,"context_line":"long. To ensure uniqueness it takes use of a hashing algorithm."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Move this function to a common place where it can be shared between ml2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_868b851e","line":9,"updated":"2015-11-12 09:26:10.000000000","message":"devcie \u003d\u003e device","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Make OVS interface name hashing algorithm common and extend it"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The OVS devcie name hashing algorithm shortens interface names that are too"},{"line_number":10,"context_line":"long. To ensure uniqueness it takes use of a hashing algorithm."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Move this function to a common place where it can be shared between ml2"},{"line_number":13,"context_line":"drivers and agents."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_c6750d32","line":10,"updated":"2015-11-12 09:26:10.000000000","message":"takes \u003d\u003e makes","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d76ac10779ad5f147b40f3d7db08a47334f3dd6c","unresolved":false,"context_lines":[{"line_number":16,"context_line":"prefix. Allow defining the max device length."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change LOG level to info to help deployers figuring out the unhashed name"},{"line_number":19,"context_line":"of an hashed inteface."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Adapt OVS and linuxbridge agent to use this common function instead of their"},{"line_number":22,"context_line":"own implementation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba8a016a_15f94ec7","line":19,"updated":"2015-11-18 12:33:46.000000000","message":"inteface \u003d\u003e interface","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a2faaa93cecc990e9c70c091babca4ffba6ff8b5","unresolved":false,"context_lines":[{"line_number":16,"context_line":"prefix. Allow defining the max device length."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change LOG level to info to help deployers figuring out the unhashed name"},{"line_number":19,"context_line":"of an hashed inteface."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Adapt OVS and linuxbridge agent to use this common function instead of their"},{"line_number":22,"context_line":"own implementation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba8a016a_3be7a012","line":19,"in_reply_to":"ba8a016a_15f94ec7","updated":"2015-11-18 14:20:23.000000000","message":"Done","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"}],"neutron/plugins/common/utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2021883030c2bac3c154272f02e9c3c24a9e64af","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(\"Too long pre- and postfix provided. New name would \""},{"line_number":169,"context_line":"                         \"exceed given length for an interface name.\")"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - hashlen - len(postfix)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_a2859107","line":168,"updated":"2015-11-11 10:06:06.000000000","message":"missing translation","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"2779a0144970b272301546ccb68aa97483626e21","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(\"Too long pre- and postfix provided. New name would \""},{"line_number":169,"context_line":"                         \"exceed given length for an interface name.\")"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - hashlen - len(postfix)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_3dd1c423","line":168,"in_reply_to":"da85f559_5d6848b9","updated":"2015-11-11 10:24:46.000000000","message":"sorry. will fix :)","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"aa7d1331b5383e3945aac5105a5a5305ea27ed99","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(\"Too long pre- and postfix provided. New name would \""},{"line_number":169,"context_line":"                         \"exceed given length for an interface name.\")"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - hashlen - len(postfix)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_5d6848b9","line":168,"in_reply_to":"da85f559_a2859107","updated":"2015-11-11 10:23:54.000000000","message":"ok, fill fix","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    # We can\u0027t just truncate because interfaces may be distinguished"},{"line_number":163,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":164,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_4defe81d","line":165,"updated":"2015-11-12 15:03:03.000000000","message":"Will a constant be better than a hardcode here ?","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    # We can\u0027t just truncate because interfaces may be distinguished"},{"line_number":163,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":164,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_17be61d4","line":165,"in_reply_to":"da85f559_4defe81d","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""},{"line_number":169,"context_line":"                           \" exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_0dea4074","line":167,"updated":"2015-11-12 15:03:03.000000000","message":"How about putting L171 before this line ? And I think len(prefix) + len(postfix) is better then len(prefix + postfix).","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""},{"line_number":169,"context_line":"                           \" exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_9792519e","line":167,"in_reply_to":"da85f559_0dea4074","updated":"2015-11-17 17:30:42.000000000","message":"partially done.\n\nnamelen is not required if the exception occurs. That\u0027s why its further below.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""},{"line_number":169,"context_line":"                           \" exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - hashlen - len(postfix)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_e6a7f1a4","line":168,"updated":"2015-11-12 09:26:10.000000000","message":"please use a space at the end of the line.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    hashlen \u003d 6"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    if (len(prefix + postfix) + hashlen) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name would\""},{"line_number":169,"context_line":"                           \" exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - hashlen - len(postfix)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_2467b526","line":168,"in_reply_to":"da85f559_e6a7f1a4","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                {\u0027prefix\u0027: prefix, \u0027truncated\u0027: name[0:namelen],"},{"line_number":178,"context_line":"                 \u0027hash\u0027: hashed_name.hexdigest()[0:hashlen],"},{"line_number":179,"context_line":"                 \u0027postfix\u0027: postfix})"},{"line_number":180,"context_line":"    LOG.info(_LI(\"The requested interface name %(requested_name)s exceeds the \""},{"line_number":181,"context_line":"                 \"%(limit)d character limitation. It was shortened to \""},{"line_number":182,"context_line":"                 \"%(new_name)s to fit.\"),"},{"line_number":183,"context_line":"             {\u0027requested_name\u0027: requested_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_26c97959","line":180,"updated":"2015-11-12 09:26:10.000000000","message":"having a info message with each port created is an overkill. why not debug?","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                {\u0027prefix\u0027: prefix, \u0027truncated\u0027: name[0:namelen],"},{"line_number":178,"context_line":"                 \u0027hash\u0027: hashed_name.hexdigest()[0:hashlen],"},{"line_number":179,"context_line":"                 \u0027postfix\u0027: postfix})"},{"line_number":180,"context_line":"    LOG.info(_LI(\"The requested interface name %(requested_name)s exceeds the \""},{"line_number":181,"context_line":"                 \"%(limit)d character limitation. It was shortened to \""},{"line_number":182,"context_line":"                 \"%(new_name)s to fit.\"),"},{"line_number":183,"context_line":"             {\u0027requested_name\u0027: requested_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_4dc288ea","line":180,"in_reply_to":"da85f559_26c97959","updated":"2015-11-12 15:03:03.000000000","message":"agree.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                {\u0027prefix\u0027: prefix, \u0027truncated\u0027: name[0:namelen],"},{"line_number":178,"context_line":"                 \u0027hash\u0027: hashed_name.hexdigest()[0:hashlen],"},{"line_number":179,"context_line":"                 \u0027postfix\u0027: postfix})"},{"line_number":180,"context_line":"    LOG.info(_LI(\"The requested interface name %(requested_name)s exceeds the \""},{"line_number":181,"context_line":"                 \"%(limit)d character limitation. It was shortened to \""},{"line_number":182,"context_line":"                 \"%(new_name)s to fit.\"),"},{"line_number":183,"context_line":"             {\u0027requested_name\u0027: requested_name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_d75a192a","line":180,"in_reply_to":"da85f559_4dc288ea","updated":"2015-11-17 17:30:42.000000000","message":"This path will only be executed in very rare cases. This message is very helpful for operators that are debugging issues as interfaces are not named along the the common naming scheme. That\u0027s why we decided in another patchset (which was reverted due to backwards compatibility issues) to go with info [1].\n\nBut if you see this an issue, I could move this log to the linuxbridge code - that it will not show up for ovs. Thoughts?\n\n\n[1] https://git.openstack.org/cgit/openstack/neutron/commit/?id\u003d3d0db13370eee09aaee5923c54d0e3188509c4e5","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    # We can\u0027t just truncate because interfaces may be distinguished"},{"line_number":165,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":166,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    if (len(prefix) + len(postfix) + INTERFACE_HASH_LEN) \u003e max_len:"},{"line_number":169,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name \""},{"line_number":170,"context_line":"                           \"would exceed given length for an interface name.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_df68d989","line":167,"updated":"2015-11-18 03:17:58.000000000","message":"Extra line here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"79e9f6f805441f2b2d77a655013e9e0894cd762f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    # We can\u0027t just truncate because interfaces may be distinguished"},{"line_number":165,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":166,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    if (len(prefix) + len(postfix) + INTERFACE_HASH_LEN) \u003e max_len:"},{"line_number":169,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name \""},{"line_number":170,"context_line":"                           \"would exceed given length for an interface name.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_b1c4215f","line":167,"in_reply_to":"ba8a016a_df68d989","updated":"2015-11-18 08:50:36.000000000","message":"removed","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":15070,"name":"Ruijing","email":"ruijing.guo@intel.com","username":"ruijing"},"change_message_id":"3cd93c0f47283b7fa89b371f08bd01bd1d072303","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":166,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":167,"context_line":"    if (len(prefix) + len(postfix) + INTERFACE_HASH_LEN) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name \""},{"line_number":169,"context_line":"                           \"would exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - INTERFACE_HASH_LEN - len(postfix)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_5739f0a2","line":168,"updated":"2015-11-19 06:44:30.000000000","message":"typo:\nchange \"pre-\" to \"prefix\"","commit_id":"3a3cbc34fcf333d6da204b19e5b14c3855990e94"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"cdf00cbfb386c6b27e47c0ae0a5cc4e643018b28","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    # by an ident at the end. A hash over the name should be unique."},{"line_number":166,"context_line":"    # Leave part of the interface name on for easier identification"},{"line_number":167,"context_line":"    if (len(prefix) + len(postfix) + INTERFACE_HASH_LEN) \u003e max_len:"},{"line_number":168,"context_line":"        raise ValueError(_(\"Too long pre- and postfix provided. New name \""},{"line_number":169,"context_line":"                           \"would exceed given length for an interface name.\"))"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    namelen \u003d max_len - len(prefix) - INTERFACE_HASH_LEN - len(postfix)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_2e065286","line":168,"in_reply_to":"ba8a016a_5739f0a2","updated":"2015-11-19 09:44:37.000000000","message":"will fix if another respin is required.","commit_id":"3a3cbc34fcf333d6da204b19e5b14c3855990e94"},{"author":{"_account_id":15070,"name":"Ruijing","email":"ruijing.guo@intel.com","username":"ruijing"},"change_message_id":"3cd93c0f47283b7fa89b371f08bd01bd1d072303","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    if isinstance(name, six.text_type):"},{"line_number":173,"context_line":"        hashed_name \u003d hashlib.sha1(name.encode(\u0027utf-8\u0027))"},{"line_number":174,"context_line":"    else:"},{"line_number":175,"context_line":"        hashed_name \u003d hashlib.sha1(name)"},{"line_number":176,"context_line":"    new_name \u003d (\u0027%(prefix)s%(truncated)s%(hash)s%(postfix)s\u0027 %"},{"line_number":177,"context_line":"                {\u0027prefix\u0027: prefix, \u0027truncated\u0027: name[0:namelen],"},{"line_number":178,"context_line":"                 \u0027hash\u0027: hashed_name.hexdigest()[0:INTERFACE_HASH_LEN],"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_1d5b89f7","line":175,"updated":"2015-11-19 06:44:30.000000000","message":"better to hash requested_name.\n\npossibly we just implement as following so that we don\u0027t need to raise error in Line 168\n\nrequested_name \u003d prefix + postfix + name.\n\nif (requested_name is too long) {\nnew_name \u003d truncate(request_name) + hash(request_name)\n\n}","commit_id":"3a3cbc34fcf333d6da204b19e5b14c3855990e94"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"cdf00cbfb386c6b27e47c0ae0a5cc4e643018b28","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    if isinstance(name, six.text_type):"},{"line_number":173,"context_line":"        hashed_name \u003d hashlib.sha1(name.encode(\u0027utf-8\u0027))"},{"line_number":174,"context_line":"    else:"},{"line_number":175,"context_line":"        hashed_name \u003d hashlib.sha1(name)"},{"line_number":176,"context_line":"    new_name \u003d (\u0027%(prefix)s%(truncated)s%(hash)s%(postfix)s\u0027 %"},{"line_number":177,"context_line":"                {\u0027prefix\u0027: prefix, \u0027truncated\u0027: name[0:namelen],"},{"line_number":178,"context_line":"                 \u0027hash\u0027: hashed_name.hexdigest()[0:INTERFACE_HASH_LEN],"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba8a016a_aed32203","line":175,"in_reply_to":"ba8a016a_1d5b89f7","updated":"2015-11-19 09:44:37.000000000","message":"This method was basically copied over from ovs with some small modifications. To stay backwards compatible we cannot change the name we\u0027re hashing. This would break existing installations.","commit_id":"3a3cbc34fcf333d6da204b19e5b14c3855990e94"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"23b1d7bec4d825967b82e866d14727d868db9b90","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Common utilities and helper functions for Openstack Networking Plugins."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import hashlib"},{"line_number":20,"context_line":"import webob.exc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_7b801a47","line":19,"updated":"2015-11-22 19:20:05.000000000","message":"incorrect import groups, it should be:\n\n import hashlib\n\n from oslo_log import log as logging\n import six\n import webob.exc","commit_id":"67fcd1ab6ebecbf836b4c31f4dcf858eeb2029af"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b039c701509508f459d73f50876a0a37445c01ed","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Common utilities and helper functions for Openstack Networking Plugins."},{"line_number":17,"context_line":"\"\"\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import hashlib"},{"line_number":20,"context_line":"import webob.exc"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_51be4e00","line":19,"in_reply_to":"ba8a016a_7b801a47","updated":"2015-11-23 08:29:08.000000000","message":"Done","commit_id":"67fcd1ab6ebecbf836b4c31f4dcf858eeb2029af"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"23b1d7bec4d825967b82e866d14727d868db9b90","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    return core_plugin.create_port(context, {\u0027port\u0027: port_data})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def get_interface_name(name, prefix\u003d\u0027\u0027, postfix\u003d\u0027\u0027,"},{"line_number":153,"context_line":"                       max_len\u003dn_const.DEVICE_NAME_MAX_LEN):"},{"line_number":154,"context_line":"    \"\"\"Construct an interface name based on the prefix, postfix and name."},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_5b7bd67b","line":152,"updated":"2015-11-22 19:20:05.000000000","message":"no reason to define postfix, it\u0027s unused, it should be added in the daughter change","commit_id":"67fcd1ab6ebecbf836b4c31f4dcf858eeb2029af"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"b039c701509508f459d73f50876a0a37445c01ed","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    return core_plugin.create_port(context, {\u0027port\u0027: port_data})"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def get_interface_name(name, prefix\u003d\u0027\u0027, postfix\u003d\u0027\u0027,"},{"line_number":153,"context_line":"                       max_len\u003dn_const.DEVICE_NAME_MAX_LEN):"},{"line_number":154,"context_line":"    \"\"\"Construct an interface name based on the prefix, postfix and name."},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba8a016a_914b562b","line":152,"in_reply_to":"ba8a016a_5b7bd67b","updated":"2015-11-23 08:29:08.000000000","message":"agree. Done!","commit_id":"67fcd1ab6ebecbf836b4c31f4dcf858eeb2029af"}],"neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"683447311ff151fd223efd065f010e6e13dd534a","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_4f84bc09","line":152,"updated":"2015-10-22 16:41:00.000000000","message":"For long names, It\u0027s really confusing that the substring before the . depends on vlan_id length.\n\nI would prefer you do:\n\n if len(physical_interface) +vlan_len \u003e\u003d n_const.DEVICE_NAME_MAX_LEN:\n   physical_interface \u003d p_utils.get_interface(\n     physical_interface, max_length\u003dn_const.DEVICE_NAME_MAX_LEN - 5)\n return \u0027%s.%s\u0027 % (physical_interface, vlan_id)\n\nwhich ensures physical_interface part doesn\u0027t depend on vlan_id except when 10 \u003c len(phy...) \u003c14 (for bw compatibility)","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"672750a20cfaf6b7e3b3a4f9b1e30566bddcfe4e","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_9cf757d2","line":152,"in_reply_to":"3a29b11f_4f84bc09","updated":"2015-10-23 09:30:00.000000000","message":"Cedric, I don\u0027t share your concern here. The physical_interface part does not have any dependency on the vlan_id length in the case where len(phys_interface) \u003c 10.\n\nThe get_interface_name() method does this:\n\n    requested_name \u003d pyhs_if + \".vlan-id\"\n    if len(requested_name) \u003c\u003d DEVICE_MAX_LEN:\n\t        return requested_name\n\nBackwardscompatibility should be ensured. I added an extra testcase for it.\n\nThe simplest solution in my opinion is really the code I proposed here. Or did I miss one of your points? Thanks!","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"cc80dab70aed8a1e95ae7731bbf7350399ba6ea9","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_624b5288","line":152,"in_reply_to":"3a29b11f_9cf757d2","updated":"2015-11-10 15:14:32.000000000","message":"\"which ensures physical_interface part doesn\u0027t depend on vlan_id except when 10 \u003c len(phy...) \u003c14 (for bw compatibility)\"\n\n--\u003e this is exactly the case where your proposal breaks backwards compatibility again. You would need an algorithm to shorten the name only by 2 chars for a 1 digit vlan and up to 5 chars for a 4 digit vlan. You\u0027re just doing -5 in every case.\n\nHowever, I think the code proposed in this patchset is the most simplest. Does that make sense from your point of view as well?","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"ace97f802a642f800f0933764343d6a0665ee8c9","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_e23e398b","line":152,"in_reply_to":"da85f559_5b70580b","updated":"2015-11-11 10:00:04.000000000","message":"iiuc, proposed implementation generates a prefix (part before the period) per vlan_len (for a specific long physical_interface):\n\n PREFIX1.X    # where len(PREFIX2) \u003d 13\n PREFIX2.XX   # where len(PREFIX2) \u003d 12\n PREFIX3.XXX  # where len(PREFIX3) \u003d 11\n PREFIX4.XXXX # where len(PREFIX4) \u003d 10\n\nIt really doesn\u0027t help debugging.\n\nIMO, we should provide an implementation which generates a prefix not depending on vlan_len when possible","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"6a36ff886598b6700fb468a20a2132644dccdd40","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_6da810dc","line":152,"in_reply_to":"da85f559_624b5288","updated":"2015-11-10 21:20:15.000000000","message":"\"You\u0027re just doing -5 in every case.\", sure??? It seems the condition:\n\n if len(physical_interface) + vlan_len \u003e\u003d n_const.DEVICE_NAME_MAX_LEN\n\ndepends on vlan length when 10 \u003c len(physical_interface) \u003c14","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"43921c49f7e93970a68232d58c57236befdafc2d","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_5b70580b","line":152,"in_reply_to":"da85f559_6da810dc","updated":"2015-11-11 07:50:55.000000000","message":"oh sorry, you\u0027re absolutely right! Your if describes all combinations that will cause an error today - so please forgive my second comment.\n\nMy point in my first comment was more, that this is exactly what I\u0027m doing within the get_interface_name method. Sure I could check it in this method upfront and use the get_interface_name method for only generating the stuff before the \".\" like you proposed. The result is the same in both cases. \n\nIf you insist on your proposal I\u0027m fine to implement it like this. I just think that the original proposal is more simple and straight forward.\n\nThanks for your feedback!","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d821b85e401919d416b1d583ad96abae889a3c3c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_bdb854c9","line":152,"in_reply_to":"da85f559_7d1e6c60","updated":"2015-11-11 10:26:59.000000000","message":"we should provide an implementation which generates a prefix not depending on vlan_len WHEN POSSIBLE :)","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"aa7d1331b5383e3945aac5105a5a5305ea27ed99","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        if vlan_len \u003e 4:"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds 4 digits!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        vlan_name \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":154,"context_line":"                                               postfix\u003dvlan_postfix)"},{"line_number":155,"context_line":"        return vlan_name"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_7d1e6c60","line":152,"in_reply_to":"da85f559_e23e398b","updated":"2015-11-11 10:23:54.000000000","message":"Now I get your point and I totally agree. Ideally it would look like this:\n\n PREFIX1.X       # where len(PREFIX1) \u003d 10\n PREFIX1.XX     # where len(PREFIX1) \u003d 10\n PREFIX1.XXX   # where len(PREFIX1) \u003d 10\n PREFIX1.XXXX # where len(PREFIX1) \u003d 10\n\nMy proposed patchset generates things like described in your comment before.\n\nBut please have a look at the following case:\n\n PREFIX1.X       # where len(PREFIX1.X) \u003d 15   --\u003e still working along the old scheme to stay backwardscompatible.\n PREFIX1.XX     #where  len(PREFIX1.XX) \u003d 16 --\u003e would fail along the old scheme, so a shortened PREFIX2 \u003d! PREFIX1 is required\n\nSo for this cases we will end in different prefixes anyhow. \n\nWhat do you think?","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        bridge_name \u003d BRIDGE_NAME_PREFIX + network_id[0:11]"},{"line_number":142,"context_line":"        return bridge_name"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_vlan_device_name(self, physical_interface, vlan_id):"},{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_140da8e7","line":144,"updated":"2015-11-11 16:48:40.000000000","message":"why renaming it?","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"31a24b43259e3e6a704469029847bfcd49f1f8e6","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        bridge_name \u003d BRIDGE_NAME_PREFIX + network_id[0:11]"},{"line_number":142,"context_line":"        return bridge_name"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_vlan_device_name(self, physical_interface, vlan_id):"},{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_b03da390","line":144,"in_reply_to":"da85f559_140da8e7","updated":"2015-11-12 09:05:14.000000000","message":"I personally struggle with the name \"subinterface\". It\u0027s a very generic term. Renamed it to vlan_subinterface - which is more clear hopefully.","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def ensure_vlan(self, physical_interface, vlan_id):"},{"line_number":290,"context_line":"        \"\"\"Create a vlan unless it already exists.\"\"\""},{"line_number":291,"context_line":"        vlan_device \u003d self.get_vlan_device_name(physical_interface, vlan_id)"},{"line_number":292,"context_line":"        if not ip_lib.device_exists(vlan_device):"},{"line_number":293,"context_line":"            LOG.debug(\"Creating subinterface %(interface)s for \""},{"line_number":294,"context_line":"                      \"VLAN %(vlan_id)s on interface \""}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_1424c85d","line":291,"updated":"2015-11-11 16:48:40.000000000","message":"why renaming it?","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_vlan_subinterface_name(self, physical_interface, vlan_id):"},{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_e6be11ad","line":146,"updated":"2015-11-12 09:26:10.000000000","message":"missing translation","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_vlan_subinterface_name(self, physical_interface, vlan_id):"},{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_6ff59bc9","line":146,"in_reply_to":"da85f559_e6be11ad","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_48311659","line":148,"updated":"2015-11-12 15:03:03.000000000","message":"from previous UT case, I suppose vlan_id is str type, if so, I think we can directly use len(vlan_id) here.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        if not vlan_id:"},{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_ef8bcb1c","line":148,"in_reply_to":"da85f559_48311659","updated":"2015-11-17 17:30:42.000000000","message":"you\u0027re right. Thx","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_e8b24a05","line":149,"updated":"2015-11-12 15:03:03.000000000","message":"Isn\u0027t MAX_VLAN_TAG int itself ?","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            raise ValueError(\"No VLAN ID specified!\")"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_efb98bcc","line":149,"in_reply_to":"da85f559_e8b24a05","updated":"2015-11-17 17:30:42.000000000","message":"yes, it is. But it specifies the max vlan tag which is 4096 or so. What I need is the max number of digits which is 4\n\nBut I removed that check, as this is already checked by the Neutron server!","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d3647ef5634f8080f4278630bb68df59e012fd9","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        # Shorten physical interface name if too long"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_a6e329d8","line":150,"updated":"2015-11-12 09:26:10.000000000","message":"ditto","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        vlan_len \u003d len(str(vlan_id))"},{"line_number":149,"context_line":"        if vlan_len \u003e len(str(p_const.MAX_VLAN_TAG)):"},{"line_number":150,"context_line":"            raise ValueError(\"Invalid VLAN ID! ID exceeds max vlan length!\")"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":153,"context_line":"        # Shorten physical interface name if too long"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_4fcbf753","line":150,"in_reply_to":"da85f559_a6e329d8","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":13667,"name":"ZongKai LI","email":"onionpiece@163.com","username":"lzklibj"},"change_message_id":"d40d129f6f505eb58c90cb7d59d92d4dafcca90a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if (len(physical_interface) + len(vlan_postfix) \u003e"},{"line_number":155,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":156,"context_line":"            physical_interface \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":157,"context_line":"                                   max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)"},{"line_number":158,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_tap_device_name(self, interface_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_a8b3e296","line":157,"updated":"2015-11-12 15:03:03.000000000","message":"5 ? where can we get this magical number , and why not a constant.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"501f023cc2a6c22527bca815ba554f20cc6ab7e9","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        if (len(physical_interface) + len(vlan_postfix) \u003e"},{"line_number":155,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":156,"context_line":"            physical_interface \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":157,"context_line":"                                   max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)"},{"line_number":158,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_tap_device_name(self, interface_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_9f4ab526","line":157,"updated":"2015-11-13 02:51:33.000000000","message":"Given there are many comments, I think there will be another patch.\nSo, pay attention to the indention here. it should look like:\n\nphysical_interface \u003d p_utils.get_interface_name(\n    physical_interface, max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"501f023cc2a6c22527bca815ba554f20cc6ab7e9","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":156,"context_line":"            physical_interface \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":157,"context_line":"                                   max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)"},{"line_number":158,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_tap_device_name(self, interface_id):"},{"line_number":161,"context_line":"        if not interface_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_9f94f544","line":158,"updated":"2015-11-13 02:51:33.000000000","message":"Why not leave the vlan_postfix to be handled in p_utils.get_interface_name? Since it is a \"postfix\" and it should be part of the interface name :)","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"31d3d08df0ba31d7ab8ebb78aff2e749b6bede70","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":156,"context_line":"            physical_interface \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":157,"context_line":"                                   max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)"},{"line_number":158,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_tap_device_name(self, interface_id):"},{"line_number":161,"context_line":"        if not interface_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_bf91559b","line":158,"in_reply_to":"ba8a016a_8196934a","updated":"2015-11-18 03:06:53.000000000","message":"Thanks for the explanation.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":156,"context_line":"            physical_interface \u003d p_utils.get_interface_name(physical_interface,"},{"line_number":157,"context_line":"                                   max_len\u003dconstants.DEVICE_NAME_MAX_LEN - 5)"},{"line_number":158,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def get_tap_device_name(self, interface_id):"},{"line_number":161,"context_line":"        if not interface_id:"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_8196934a","line":158,"in_reply_to":"da85f559_9f94f544","updated":"2015-11-17 17:30:42.000000000","message":"I had this discussion with Cedric on Patchset 1 [1]\n\nThe problem is, that we need to stay backwards compatible. So we only have the freedom to define new device names where todays code is broken (if condition). In this range we decided to always generate the same name for the prefix, independent of the vlan len. If I would just use the postfix of get_interface_name, I would get different prefixes for vlan 1 and vlan 1111.\n\n[1] https://review.openstack.org/#/c/238584/1/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"},{"line_number":142,"context_line":"            # length using max_len."},{"line_number":143,"context_line":"            physical_interface \u003d p_utils.get_interface_name("},{"line_number":144,"context_line":"                                   physical_interface,"},{"line_number":145,"context_line":"                                   max_len\u003d(constants.DEVICE_NAME_MAX_LEN -"},{"line_number":146,"context_line":"                                            MAX_VLAN_POSTFIX_LEN))"},{"line_number":147,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5f2aa92d","line":144,"updated":"2015-11-18 03:17:58.000000000","message":"Indention here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"145554c2750dddfb3101bb531272d14881201c19","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"},{"line_number":142,"context_line":"            # length using max_len."},{"line_number":143,"context_line":"            physical_interface \u003d p_utils.get_interface_name("},{"line_number":144,"context_line":"                                   physical_interface,"},{"line_number":145,"context_line":"                                   max_len\u003d(constants.DEVICE_NAME_MAX_LEN -"},{"line_number":146,"context_line":"                                            MAX_VLAN_POSTFIX_LEN))"},{"line_number":147,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_cc426e3e","line":144,"in_reply_to":"ba8a016a_1183ad05","updated":"2015-11-18 08:59:36.000000000","message":"It is usually a new indention if the left parenthesis is the end in the last line, so it should looks like:\n\nphysical_interface \u003d p_utils.get_interface_name(\n    physical_interface,\n    ......\n\ntake line 589 and line 735 as reference.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"79e9f6f805441f2b2d77a655013e9e0894cd762f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"},{"line_number":142,"context_line":"            # length using max_len."},{"line_number":143,"context_line":"            physical_interface \u003d p_utils.get_interface_name("},{"line_number":144,"context_line":"                                   physical_interface,"},{"line_number":145,"context_line":"                                   max_len\u003d(constants.DEVICE_NAME_MAX_LEN -"},{"line_number":146,"context_line":"                                            MAX_VLAN_POSTFIX_LEN))"},{"line_number":147,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_1183ad05","line":144,"in_reply_to":"ba8a016a_5f2aa92d","updated":"2015-11-18 08:50:36.000000000","message":"I can move it one to the left if desired - not sure if that was your proposal?","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"ff5ec620850559b10d2149fda6acafa531c5aec3","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"},{"line_number":142,"context_line":"            # length using max_len."},{"line_number":143,"context_line":"            physical_interface \u003d p_utils.get_interface_name("},{"line_number":144,"context_line":"                                   physical_interface,"},{"line_number":145,"context_line":"                                   max_len\u003d(constants.DEVICE_NAME_MAX_LEN -"},{"line_number":146,"context_line":"                                            MAX_VLAN_POSTFIX_LEN))"},{"line_number":147,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_e75aeb4f","line":144,"in_reply_to":"ba8a016a_cc426e3e","updated":"2015-11-18 09:37:26.000000000","message":"this helps, thanks! Will respin!","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a9c086788c6e59354bd89d8d75935830e22e6c28","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"},{"line_number":142,"context_line":"            # length using max_len."},{"line_number":143,"context_line":"            physical_interface \u003d p_utils.get_interface_name("},{"line_number":144,"context_line":"                                   physical_interface,"},{"line_number":145,"context_line":"                                   max_len\u003d(constants.DEVICE_NAME_MAX_LEN -"},{"line_number":146,"context_line":"                                            MAX_VLAN_POSTFIX_LEN))"},{"line_number":147,"context_line":"        return \"%s%s\" % (physical_interface, vlan_postfix)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_e0fbb2bf","line":144,"in_reply_to":"ba8a016a_e75aeb4f","updated":"2015-11-18 10:18:33.000000000","message":"Done","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d76ac10779ad5f147b40f3d7db08a47334f3dd6c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return bridge_name"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def get_vlan_subinterface_name(self, physical_interface, vlan_id):"},{"line_number":133,"context_line":"        if not vlan_id:"},{"line_number":134,"context_line":"            raise ValueError(_(\"No VLAN ID specified!\"))"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_559cb65c","line":133,"updated":"2015-11-18 12:33:46.000000000","message":"this is a change in functionality and may break something that worked (even though it was broken due to the VLAN not existing)\n\ni would suggest doing this change in a separate patch set above this one.","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a2faaa93cecc990e9c70c091babca4ffba6ff8b5","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        return bridge_name"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def get_vlan_subinterface_name(self, physical_interface, vlan_id):"},{"line_number":133,"context_line":"        if not vlan_id:"},{"line_number":134,"context_line":"            raise ValueError(_(\"No VLAN ID specified!\"))"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_7629bd36","line":133,"in_reply_to":"ba8a016a_559cb65c","updated":"2015-11-18 14:20:23.000000000","message":"good idea!","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d76ac10779ad5f147b40f3d7db08a47334f3dd6c","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":137,"context_line":"        # Shorten physical interface name if too long"},{"line_number":138,"context_line":"        if (len(physical_interface) + len(vlan_postfix) \u003e"},{"line_number":139,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":140,"context_line":"            # We want to ensure, that the physical interface name stays the"},{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_9580dec1","line":138,"updated":"2015-11-18 12:33:46.000000000","message":"why do we need this check here?\n\nyou can do:\nphysical_interface \u003d p_utils.get_interface_name(\n                physical_interface, max_len\u003d(constants.DEVICE_NAME_MAX_LEN -\n                                             MAX_VLAN_POSTFIX_LEN))\n\nand that check is done internally?","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a2faaa93cecc990e9c70c091babca4ffba6ff8b5","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        vlan_postfix \u003d \u0027.%s\u0027 % vlan_id"},{"line_number":137,"context_line":"        # Shorten physical interface name if too long"},{"line_number":138,"context_line":"        if (len(physical_interface) + len(vlan_postfix) \u003e"},{"line_number":139,"context_line":"            constants.DEVICE_NAME_MAX_LEN):"},{"line_number":140,"context_line":"            # We want to ensure, that the physical interface name stays the"},{"line_number":141,"context_line":"            # same independent of the vlan length. Therefore we restrict the"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba8a016a_3695753e","line":138,"in_reply_to":"ba8a016a_9580dec1","updated":"2015-11-18 14:20:23.000000000","message":"This would break backwardscompatibilty. Today you can have vlans like\n PHY_INTERFACE.1   # where len(PHY_INTERFACE) \u003d 13\n\nyour proposal leads to the following:\n PHY_INTERFACE.1   # where len(PHY_INTERFACE) \u003d 10\n\nThe simplest way would be to just call get_interface_name(phys_if, postfix). The current algorithm was a wish of Cedric [1] to make sure the that you get the same pyhs_if name for vlan .1 and .111 in the case where the whole device name would be too long.\n\n[1] https://review.openstack.org/#/c/238584/1/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py","commit_id":"7c65e01080ecde7e8f786182ed8f1907cf50d225"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"501f023cc2a6c22527bca815ba554f20cc6ab7e9","unresolved":false,"context_lines":[{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"            # interconnect physical and integration bridges using veth/patchs"},{"line_number":1064,"context_line":"            int_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1065,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1066,"context_line":"            phys_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1067,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1068,"context_line":"            # Interface type of port for physical and integration bridges must"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_9f7b9529","line":1065,"updated":"2015-11-13 02:51:33.000000000","message":"pay attention to the indention here~","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":1062,"context_line":""},{"line_number":1063,"context_line":"            # interconnect physical and integration bridges using veth/patchs"},{"line_number":1064,"context_line":"            int_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1065,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1066,"context_line":"            phys_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1067,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1068,"context_line":"            # Interface type of port for physical and integration bridges must"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_b7fe7569","line":1065,"in_reply_to":"da85f559_9f7b9529","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"501f023cc2a6c22527bca815ba554f20cc6ab7e9","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            int_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1065,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1066,"context_line":"            phys_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1067,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1068,"context_line":"            # Interface type of port for physical and integration bridges must"},{"line_number":1069,"context_line":"            # be same, so check only one of them."},{"line_number":1070,"context_line":"            int_type \u003d self.int_br.db_get_val(\"Interface\", int_if_name, \"type\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_7f72714b","line":1067,"updated":"2015-11-13 02:51:33.000000000","message":"pay attention to the indention here~","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            int_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1065,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1066,"context_line":"            phys_if_name \u003d p_utils.get_interface_name(bridge,"},{"line_number":1067,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1068,"context_line":"            # Interface type of port for physical and integration bridges must"},{"line_number":1069,"context_line":"            # be same, so check only one of them."},{"line_number":1070,"context_line":"            int_type \u003d self.int_br.db_get_val(\"Interface\", int_if_name, \"type\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_d701b96b","line":1067,"in_reply_to":"da85f559_7f72714b","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"            # interconnect physical and integration bridges using veth/patchs"},{"line_number":1075,"context_line":"            int_if_name \u003d p_utils.get_interface_name("},{"line_number":1076,"context_line":"                                     bridge,"},{"line_number":1077,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1078,"context_line":"            phys_if_name \u003d p_utils.get_interface_name("},{"line_number":1079,"context_line":"                                      bridge,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5fe149fd","line":1076,"updated":"2015-11-18 03:17:58.000000000","message":"Indention here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a9c086788c6e59354bd89d8d75935830e22e6c28","unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"            # interconnect physical and integration bridges using veth/patchs"},{"line_number":1075,"context_line":"            int_if_name \u003d p_utils.get_interface_name("},{"line_number":1076,"context_line":"                                     bridge,"},{"line_number":1077,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1078,"context_line":"            phys_if_name \u003d p_utils.get_interface_name("},{"line_number":1079,"context_line":"                                      bridge,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_c0678eb5","line":1076,"in_reply_to":"ba8a016a_31eb51b2","updated":"2015-11-18 10:18:33.000000000","message":"Done","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"79e9f6f805441f2b2d77a655013e9e0894cd762f","unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"            # interconnect physical and integration bridges using veth/patchs"},{"line_number":1075,"context_line":"            int_if_name \u003d p_utils.get_interface_name("},{"line_number":1076,"context_line":"                                     bridge,"},{"line_number":1077,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1078,"context_line":"            phys_if_name \u003d p_utils.get_interface_name("},{"line_number":1079,"context_line":"                                      bridge,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_31eb51b2","line":1076,"in_reply_to":"ba8a016a_5fe149fd","updated":"2015-11-18 08:50:36.000000000","message":"what exactly is your expectation here? As \"prefix\u003dconstants.PEER_INTEGRATION_PREFIX)\" does not fit behind the get_interface_name call, I had to pick another indentation. Can you comment a concrete proposal?","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                                     bridge,"},{"line_number":1077,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1078,"context_line":"            phys_if_name \u003d p_utils.get_interface_name("},{"line_number":1079,"context_line":"                                      bridge,"},{"line_number":1080,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1081,"context_line":"            # Interface type of port for physical and integration bridges must"},{"line_number":1082,"context_line":"            # be same, so check only one of them."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_ffe83de4","line":1079,"updated":"2015-11-18 03:17:58.000000000","message":"Indention here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"a9c086788c6e59354bd89d8d75935830e22e6c28","unresolved":false,"context_lines":[{"line_number":1076,"context_line":"                                     bridge,"},{"line_number":1077,"context_line":"                                     prefix\u003dconstants.PEER_INTEGRATION_PREFIX)"},{"line_number":1078,"context_line":"            phys_if_name \u003d p_utils.get_interface_name("},{"line_number":1079,"context_line":"                                      bridge,"},{"line_number":1080,"context_line":"                                      prefix\u003dconstants.PEER_PHYSICAL_PREFIX)"},{"line_number":1081,"context_line":"            # Interface type of port for physical and integration bridges must"},{"line_number":1082,"context_line":"            # be same, so check only one of them."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_6007c2ca","line":1079,"in_reply_to":"ba8a016a_ffe83de4","updated":"2015-11-18 10:18:33.000000000","message":"Done","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"}],"neutron/tests/unit/plugins/common/test_utils.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2021883030c2bac3c154272f02e9c3c24a9e64af","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import hashlib"},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.common import utils"},{"line_number":20,"context_line":"from neutron.tests import base"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_62a3299e","line":17,"updated":"2015-11-11 10:06:06.000000000","message":"one too many lines","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"aa7d1331b5383e3945aac5105a5a5305ea27ed99","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import hashlib"},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.common import utils"},{"line_number":20,"context_line":"from neutron.tests import base"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_fdb7bc37","line":17,"in_reply_to":"da85f559_62a3299e","updated":"2015-11-11 10:23:54.000000000","message":"will fix","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2021883030c2bac3c154272f02e9c3c24a9e64af","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.common import utils"},{"line_number":20,"context_line":"from neutron.tests import base"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LONG_NAME1 \u003d \"A_REALLY_LONG_INTERFACE_NAME1\""},{"line_number":24,"context_line":"LONG_NAME2 \u003d \"A_REALLY_LONG_INTERFACE_NAME2\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_22a9a17b","line":21,"updated":"2015-11-11 10:06:06.000000000","message":"ditto","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"aa7d1331b5383e3945aac5105a5a5305ea27ed99","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from neutron.plugins.common import utils"},{"line_number":20,"context_line":"from neutron.tests import base"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LONG_NAME1 \u003d \"A_REALLY_LONG_INTERFACE_NAME1\""},{"line_number":24,"context_line":"LONG_NAME2 \u003d \"A_REALLY_LONG_INTERFACE_NAME2\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_bd84d45d","line":21,"in_reply_to":"da85f559_22a9a17b","updated":"2015-11-11 10:23:54.000000000","message":"will fix","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2021883030c2bac3c154272f02e9c3c24a9e64af","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                        (if_prefix_postfix_short, \"pre-SHORT.1111\")]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for if_new_name, if_expected_new_name in combinations:"},{"line_number":71,"context_line":"            self.assertEqual(if_new_name, if_expected_new_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_get_interface_uniqueness(self):"},{"line_number":74,"context_line":"        prefix \u003d \"prefix-\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_e2bdd9b7","line":71,"updated":"2015-11-11 10:06:06.000000000","message":"expected name should be first","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"aa7d1331b5383e3945aac5105a5a5305ea27ed99","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                        (if_prefix_postfix_short, \"pre-SHORT.1111\")]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for if_new_name, if_expected_new_name in combinations:"},{"line_number":71,"context_line":"            self.assertEqual(if_new_name, if_expected_new_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_get_interface_uniqueness(self):"},{"line_number":74,"context_line":"        prefix \u003d \"prefix-\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_3d754463","line":71,"in_reply_to":"da85f559_e2bdd9b7","updated":"2015-11-11 10:23:54.000000000","message":"will fix","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LONG_NAME2 \u003d \"A_REALLY_LONG_INTERFACE_NAME2\""},{"line_number":23,"context_line":"SHORT_NAME \u003d \"SHORT\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"MOCKED_HASH \u003d \"mockedhash\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class MockSHA(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_14584889","line":25,"updated":"2015-11-11 16:48:40.000000000","message":"no need to define this constant?","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"31a24b43259e3e6a704469029847bfcd49f1f8e6","unresolved":false,"context_lines":[{"line_number":22,"context_line":"LONG_NAME2 \u003d \"A_REALLY_LONG_INTERFACE_NAME2\""},{"line_number":23,"context_line":"SHORT_NAME \u003d \"SHORT\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"MOCKED_HASH \u003d \"mockedhash\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class MockSHA(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_b037e3fd","line":25,"in_reply_to":"da85f559_14584889","updated":"2015-11-12 09:05:14.000000000","message":"Done","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch.object(hashlib, \u0027sha1\u0027, return_value\u003dMockSHA())"},{"line_number":98,"context_line":"    def test_get_interface_max_len(self, mock_sha1):"},{"line_number":99,"context_line":"        self.assertTrue(len(utils.get_interface_name(LONG_NAME1)) \u003d\u003d 15)"},{"line_number":100,"context_line":"        self.assertTrue(len(utils.get_interface_name(LONG_NAME1, max_len\u003d10))"},{"line_number":101,"context_line":"                        \u003d\u003d 10)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_11805af6","line":99,"updated":"2015-11-11 16:48:40.000000000","message":"use:\n\n self.assertEqual(..., len())","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"31a24b43259e3e6a704469029847bfcd49f1f8e6","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @mock.patch.object(hashlib, \u0027sha1\u0027, return_value\u003dMockSHA())"},{"line_number":98,"context_line":"    def test_get_interface_max_len(self, mock_sha1):"},{"line_number":99,"context_line":"        self.assertTrue(len(utils.get_interface_name(LONG_NAME1)) \u003d\u003d 15)"},{"line_number":100,"context_line":"        self.assertTrue(len(utils.get_interface_name(LONG_NAME1, max_len\u003d10))"},{"line_number":101,"context_line":"                        \u003d\u003d 10)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_90341ffc","line":99,"in_reply_to":"da85f559_11805af6","updated":"2015-11-12 09:05:14.000000000","message":"Done","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"501f023cc2a6c22527bca815ba554f20cc6ab7e9","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(hashlib, \u0027sha1\u0027, return_value\u003dMockSHA())"},{"line_number":92,"context_line":"    def test_get_interface_max_len(self, mock_sha1):"},{"line_number":93,"context_line":"        self.assertEqual(15, len(utils.get_interface_name(LONG_NAME1)))"},{"line_number":94,"context_line":"        self.assertEqual(10, len(utils.get_interface_name(LONG_NAME1,"},{"line_number":95,"context_line":"                                                          max_len\u003d10)))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_7fd7d1ed","line":93,"updated":"2015-11-13 02:51:33.000000000","message":"Introduce the constant \"DEVICE_NAME_MAX_LEN\" here would be better.","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"61f2e0a7942359053b5d98bfd513110a6d5336f2","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @mock.patch.object(hashlib, \u0027sha1\u0027, return_value\u003dMockSHA())"},{"line_number":92,"context_line":"    def test_get_interface_max_len(self, mock_sha1):"},{"line_number":93,"context_line":"        self.assertEqual(15, len(utils.get_interface_name(LONG_NAME1)))"},{"line_number":94,"context_line":"        self.assertEqual(10, len(utils.get_interface_name(LONG_NAME1,"},{"line_number":95,"context_line":"                                                          max_len\u003d10)))"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_2416d5a7","line":93,"in_reply_to":"da85f559_7fd7d1ed","updated":"2015-11-17 17:30:42.000000000","message":"Done","commit_id":"eae77eaae152d60ee8197577fbc1824dbc9591b1"}],"neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"2021883030c2bac3c154272f02e9c3c24a9e64af","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                         \"brq\")"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    def test_get_vlan_device_name_backwards_compatibility(self):"},{"line_number":431,"context_line":"        self.assertEqual(self.lbm.get_vlan_device_name(\"abcdefghijklm\", 1),"},{"line_number":432,"context_line":"                         \"abcdefghijklm.1\")"},{"line_number":433,"context_line":"        self.assertEqual(self.lbm.get_vlan_device_name(\"abcdefghijkl\", 11),"},{"line_number":434,"context_line":"                         \"abcdefghijkl.11\")"}],"source_content_type":"text/x-python","patch_set":1,"id":"da85f559_42cdc564","line":431,"updated":"2015-11-11 10:06:06.000000000","message":"same as before","commit_id":"ed14cf3e3bece2729afafddb848fc5eb644d2df7"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                         self.lbm.get_vlan_device_name(\"abcdefghij\", 1111))"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def test_get_vlan_device_name_advanced(self):"},{"line_number":439,"context_line":"        \"\"\"If the generated vlan device name would be too long, make sure that"},{"line_number":440,"context_line":"        everything before the \u0027.\u0027 is equal. This might be helpful when"},{"line_number":441,"context_line":"        debugging problems."},{"line_number":442,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_d443a040","line":439,"updated":"2015-11-11 16:48:40.000000000","message":"It is not a valid docstring, it should be:\n\n \"\"\"\u003cTITLE ON ONE LINE\u003e\n \n \u003cDETAILS ON MANY LINES\u003e\n \"\"\"\n\nlike:\n\n \"\"\"Ensure the same hash is used for long interface names.\n\n If the generated ...\n \"\"\"","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"31a24b43259e3e6a704469029847bfcd49f1f8e6","unresolved":false,"context_lines":[{"line_number":436,"context_line":"                         self.lbm.get_vlan_device_name(\"abcdefghij\", 1111))"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"    def test_get_vlan_device_name_advanced(self):"},{"line_number":439,"context_line":"        \"\"\"If the generated vlan device name would be too long, make sure that"},{"line_number":440,"context_line":"        everything before the \u0027.\u0027 is equal. This might be helpful when"},{"line_number":441,"context_line":"        debugging problems."},{"line_number":442,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_3088d3c4","line":439,"in_reply_to":"da85f559_d443a040","updated":"2015-11-12 09:05:14.000000000","message":"done","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1db5a7fa639792e867a36f9c6c11917ab3a3f18d","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        max_device_name \u003d \"abcdefghijklmno\""},{"line_number":445,"context_line":"        vlan_dev_name1 \u003d self.lbm.get_vlan_device_name(max_device_name, 1)"},{"line_number":446,"context_line":"        vlan_dev_name2 \u003d self.lbm.get_vlan_device_name(max_device_name, 1111)"},{"line_number":447,"context_line":"        self.assertEqual(vlan_dev_name1[0:vlan_dev_name1.index(\".\")],"},{"line_number":448,"context_line":"                         vlan_dev_name2[0:vlan_dev_name2.index(\".\")])"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    def test_get_vlan_device_name_invalid(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_b11b8ec9","line":447,"updated":"2015-11-11 16:48:40.000000000","message":"The following seems better:\n\n  self.assertEqual(vlan_dev_name1.partition(\u0027.\u0027)[0], ...)","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"31a24b43259e3e6a704469029847bfcd49f1f8e6","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        max_device_name \u003d \"abcdefghijklmno\""},{"line_number":445,"context_line":"        vlan_dev_name1 \u003d self.lbm.get_vlan_device_name(max_device_name, 1)"},{"line_number":446,"context_line":"        vlan_dev_name2 \u003d self.lbm.get_vlan_device_name(max_device_name, 1111)"},{"line_number":447,"context_line":"        self.assertEqual(vlan_dev_name1[0:vlan_dev_name1.index(\".\")],"},{"line_number":448,"context_line":"                         vlan_dev_name2[0:vlan_dev_name2.index(\".\")])"},{"line_number":449,"context_line":""},{"line_number":450,"context_line":"    def test_get_vlan_device_name_invalid(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da85f559_d092a7f5","line":447,"in_reply_to":"da85f559_b11b8ec9","updated":"2015-11-12 09:05:14.000000000","message":"Done","commit_id":"523a314f1476d04ca87040cb3880401a5e54b4ff"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        lbm \u003d get_linuxbridge_manager("},{"line_number":468,"context_line":"            bridge_mappings\u003d{\"physnet0\": \"brq-user\"}, interface_mappings\u003d{})"},{"line_number":469,"context_line":"        with mock.patch.object("},{"line_number":470,"context_line":"                bridge_lib, \u0027get_bridge_names\u0027, return_value\u003dbr_list):"},{"line_number":471,"context_line":"            self.assertEqual(expected, lbm.get_deletable_bridges())"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_get_tap_devices_count(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_bfa075a0","line":470,"updated":"2015-11-18 03:17:58.000000000","message":"indention here..","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"145554c2750dddfb3101bb531272d14881201c19","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        lbm \u003d get_linuxbridge_manager("},{"line_number":468,"context_line":"            bridge_mappings\u003d{\"physnet0\": \"brq-user\"}, interface_mappings\u003d{})"},{"line_number":469,"context_line":"        with mock.patch.object("},{"line_number":470,"context_line":"                bridge_lib, \u0027get_bridge_names\u0027, return_value\u003dbr_list):"},{"line_number":471,"context_line":"            self.assertEqual(expected, lbm.get_deletable_bridges())"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_get_tap_devices_count(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_cc690ec0","line":470,"in_reply_to":"ba8a016a_517a95f2","updated":"2015-11-18 08:59:36.000000000","message":"my mistake, if it is not included in your patch, you should just leave it there.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"79e9f6f805441f2b2d77a655013e9e0894cd762f","unresolved":false,"context_lines":[{"line_number":467,"context_line":"        lbm \u003d get_linuxbridge_manager("},{"line_number":468,"context_line":"            bridge_mappings\u003d{\"physnet0\": \"brq-user\"}, interface_mappings\u003d{})"},{"line_number":469,"context_line":"        with mock.patch.object("},{"line_number":470,"context_line":"                bridge_lib, \u0027get_bridge_names\u0027, return_value\u003dbr_list):"},{"line_number":471,"context_line":"            self.assertEqual(expected, lbm.get_deletable_bridges())"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_get_tap_devices_count(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_517a95f2","line":470,"in_reply_to":"ba8a016a_bfa075a0","updated":"2015-11-18 08:50:36.000000000","message":"I\u0027m not sure if it makes sense to fix those in this patchset, as it is just not related to this change  - this will cause confusion. But feel free to open another patchset fixing those.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":"    def test_get_tap_devices_count(self):"},{"line_number":474,"context_line":"        with mock.patch.object("},{"line_number":475,"context_line":"                bridge_lib.BridgeDevice, \u0027get_interfaces\u0027) as get_ifs_fn:"},{"line_number":476,"context_line":"            get_ifs_fn.return_value \u003d [\u0027tap2101\u0027, \u0027eth0.100\u0027, \u0027vxlan-1000\u0027]"},{"line_number":477,"context_line":"            self.assertEqual(self.lbm.get_tap_devices_count(\u0027br0\u0027), 1)"},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_9f8c9136","line":475,"updated":"2015-11-18 03:17:58.000000000","message":"indention here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"d4fb68837c3b9e24b63dcebe908251f59bb561e8","unresolved":false,"context_lines":[{"line_number":479,"context_line":"    def test_get_bridge_for_tap_device(self):"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with mock.patch.object("},{"line_number":482,"context_line":"                bridge_lib.BridgeDevice, \u0027get_interface_bridge\u0027) as get_br:"},{"line_number":483,"context_line":"            get_br.return_value \u003d bridge_lib.BridgeDevice(\"brq-fake\")"},{"line_number":484,"context_line":"            self.assertEqual(get_br.return_value,"},{"line_number":485,"context_line":"                             self.lbm.get_bridge_for_tap_device(\"tap1\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_5f862914","line":482,"updated":"2015-11-18 03:17:58.000000000","message":"indention here.","commit_id":"84c622f0be65e4068a403c8e9dfb045b2fa0767f"}]}
