)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"79a890da6c91e696c30426ad7fff2be1bf365fa4","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2014-10-06 14:03:12 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Detect if iproute2 support SR-IOV commands"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add sanity_check that \u0027ip link\u0027 command supports VF management and"},{"line_number":10,"context_line":"link state changes of VF by parsing \u0027ip link help\u0027 command output."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"baa201ad_96df6fd5","line":8,"updated":"2014-10-08 11:04:29.000000000","message":"I\u0027m just curious - Is there an iproute2 version that exposes the \u0027vf\u0027 parameter, but not its state subparameter? (I\u0027m trying to see if checking if \u0027vf\u0027 is in the output of ip link help is sufficient).","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"15e1d4b871421eb7f152532164873bf257c8aff6","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2014-10-06 14:03:12 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Detect if iproute2 support SR-IOV commands"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add sanity_check that \u0027ip link\u0027 command supports VF management and"},{"line_number":10,"context_line":"link state changes of VF by parsing \u0027ip link help\u0027 command output."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"baa201ad_4f127059","line":8,"in_reply_to":"baa201ad_96df6fd5","updated":"2014-10-12 09:00:48.000000000","message":"Yes, there are versions that has VF section, but no state , like iproute2-ss091226","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"}],"neutron/agent/linux/ip_link_support.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    message \u003d _(\"ip link capability %(capability)s is not supported\")"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class IpLinkConstants:"},{"line_number":39,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":40,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_ae05747b","line":38,"updated":"2014-08-20 12:12:05.000000000","message":"Please use a new-style class here (inherit from object).","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    message \u003d _(\"ip link capability %(capability)s is not supported\")"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class IpLinkConstants:"},{"line_number":39,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":40,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_bf783c90","line":38,"in_reply_to":"1abeadc6_ae05747b","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""},{"line_number":43,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    IP_LINK_CAPABILITIES \u003d set([IP_LINK_CAPABILITY_STATE,"},{"line_number":46,"context_line":"                                IP_LINK_CAPABILITY_VLAN,"},{"line_number":47,"context_line":"                                IP_LINK_CAPABILITY_RATE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_6e78bcf2","line":44,"updated":"2014-08-20 12:12:05.000000000","message":"Why are these sets? I don\u0027t see them ever changing (since they are implied to be constants), so I would have defined these sets as tuples instead...","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""},{"line_number":43,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    IP_LINK_CAPABILITIES \u003d set([IP_LINK_CAPABILITY_STATE,"},{"line_number":46,"context_line":"                                IP_LINK_CAPABILITY_VLAN,"},{"line_number":47,"context_line":"                                IP_LINK_CAPABILITY_RATE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_1f55b04f","line":44,"in_reply_to":"1abeadc6_6e78bcf2","updated":"2014-08-20 12:57:47.000000000","message":"The search is more efficient in the \u0027set\u0027 rather than in the \u0027tuple\u0027","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    IP_LINK_SUB_CAPABILITIES \u003d set([IP_LINK_SUB_CAPABILITY_QOS])"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":54,"context_line":"    IP_LINK_SET_REGEX \u003d re.compile(\"(.*)ip link set(.*)\")"},{"line_number":55,"context_line":"    IP_LINK_REGEX \u003d re.compile(\"(.*)ip link(.*)\")"},{"line_number":56,"context_line":"    IP_LINK_VF_REGEX \u003d re.compile(\"(\\s+)\\[ vf NUM(.*)\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_8ee1989c","line":53,"updated":"2014-08-20 12:12:05.000000000","message":"Some of these expressions are easier to understand than others - can you please add small in-line comments as to what each regex does?\nAlso, these are very clustered - please add some spaces between the different types of variables...","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    IP_LINK_SUB_CAPABILITIES \u003d set([IP_LINK_SUB_CAPABILITY_QOS])"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":54,"context_line":"    IP_LINK_SET_REGEX \u003d re.compile(\"(.*)ip link set(.*)\")"},{"line_number":55,"context_line":"    IP_LINK_REGEX \u003d re.compile(\"(.*)ip link(.*)\")"},{"line_number":56,"context_line":"    IP_LINK_VF_REGEX \u003d re.compile(\"(\\s+)\\[ vf NUM(.*)\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_ffa9d4df","line":53,"in_reply_to":"1abeadc6_8ee1989c","updated":"2014-08-20 12:57:47.000000000","message":"Will try to make it more readable","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    IP_LINK_CAPABILITY_REGEX \u003d re.compile(CAPABILITY_FORMAT)"},{"line_number":68,"context_line":"    IP_LINK_SUB_CAPABILITY_REGEX \u003d re.compile(SUB_CAPABILITY_FORMAT)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def __init__(self, root_helper\u003dNone):"},{"line_number":71,"context_line":"        super(ip_lib.IPWrapper, self).__init__(root_helper\u003droot_helper)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def ip_link_capability_supported(self, capability, subcapability\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_cebe30d4","line":70,"updated":"2014-08-20 12:12:05.000000000","message":"IPWrapper\u0027s constructor already accepts a root_helper as a first parameter, so this __init__ is not needed.","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    IP_LINK_CAPABILITY_REGEX \u003d re.compile(CAPABILITY_FORMAT)"},{"line_number":68,"context_line":"    IP_LINK_SUB_CAPABILITY_REGEX \u003d re.compile(SUB_CAPABILITY_FORMAT)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def __init__(self, root_helper\u003dNone):"},{"line_number":71,"context_line":"        super(ip_lib.IPWrapper, self).__init__(root_helper\u003droot_helper)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def ip_link_capability_supported(self, capability, subcapability\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_7f8ce47f","line":70,"in_reply_to":"1abeadc6_cebe30d4","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def __init__(self, root_helper\u003dNone):"},{"line_number":71,"context_line":"        super(ip_lib.IPWrapper, self).__init__(root_helper\u003droot_helper)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def ip_link_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":74,"context_line":"        \"\"\"Validate capability support"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        checks if ip link support the given capability (and sub capability"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_8930b2e9","line":73,"updated":"2014-08-20 12:12:05.000000000","message":"I might be wrong, but if subcapability is None, then the function call at L81 will return False (because subcabability is not in IpLinkConstants.IP_LINK_SUB_CAPABILITIES), thus this function will return False.\nIf I am correct, shouldn\u0027t subcapability always be provided (and the default value of None should be removed?)","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def __init__(self, root_helper\u003dNone):"},{"line_number":71,"context_line":"        super(ip_lib.IPWrapper, self).__init__(root_helper\u003droot_helper)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def ip_link_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":74,"context_line":"        \"\"\"Validate capability support"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        checks if ip link support the given capability (and sub capability"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_ffe1d4fe","line":73,"in_reply_to":"1abeadc6_8930b2e9","updated":"2014-08-20 12:57:47.000000000","message":"Sub-capability is not always provided. At the line 91, sub-capability is checked and False is returned only if it is defined and not in the list. All current unit tests are using sub-capability \u003d None","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\"Validate capability support"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        checks if ip link support the given capability (and sub capability"},{"line_number":77,"context_line":"        if given"},{"line_number":78,"context_line":"        @param capability: for example: vlan, rate, spoofchk, state"},{"line_number":79,"context_line":"        @param subcapability: for example: qos"},{"line_number":80,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_8e7d18b4","line":77,"updated":"2014-08-20 12:12:05.000000000","message":"Please use the Sphinx when describing arguments: http://docs.openstack.org/developer/hacking/#docstrings","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        \"\"\"Validate capability support"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        checks if ip link support the given capability (and sub capability"},{"line_number":77,"context_line":"        if given"},{"line_number":78,"context_line":"        @param capability: for example: vlan, rate, spoofchk, state"},{"line_number":79,"context_line":"        @param subcapability: for example: qos"},{"line_number":80,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_bfbe7cd2","line":77,"in_reply_to":"1abeadc6_8e7d18b4","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return self._check_ip_link_output(out, capability, subcapability)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _is_known_capabilities(self, capability, subcapability):"},{"line_number":88,"context_line":"        \"\"\"Checks if capability and sub-capability are known \"\"\""},{"line_number":89,"context_line":"        if capability not in IpLinkConstants.IP_LINK_CAPABILITIES:"},{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        if (subcapability and subcapability not in"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_0e49088b","line":88,"updated":"2014-08-20 12:12:05.000000000","message":"nit: extra space between last word to \"\"\"","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        return self._check_ip_link_output(out, capability, subcapability)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def _is_known_capabilities(self, capability, subcapability):"},{"line_number":88,"context_line":"        \"\"\"Checks if capability and sub-capability are known \"\"\""},{"line_number":89,"context_line":"        if capability not in IpLinkConstants.IP_LINK_CAPABILITIES:"},{"line_number":90,"context_line":"            return False"},{"line_number":91,"context_line":"        if (subcapability and subcapability not in"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_dfb5f8ee","line":88,"in_reply_to":"1abeadc6_0e49088b","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def _get_ip_link_output(self):"},{"line_number":97,"context_line":"        \"\"\"Gets the output of the ip link help command"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        runs ip link help command and returns its output"},{"line_number":100,"context_line":"        Note: ip link help return error and writes its output to stderr"},{"line_number":101,"context_line":"                so we get the output from there. however, if this issue"},{"line_number":102,"context_line":"                will be solved and the command will write to stdout, we"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_a9756e99","line":99,"updated":"2014-08-20 12:12:05.000000000","message":"nit: sentence should start with capital letters","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    def _get_ip_link_output(self):"},{"line_number":97,"context_line":"        \"\"\"Gets the output of the ip link help command"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        runs ip link help command and returns its output"},{"line_number":100,"context_line":"        Note: ip link help return error and writes its output to stderr"},{"line_number":101,"context_line":"                so we get the output from there. however, if this issue"},{"line_number":102,"context_line":"                will be solved and the command will write to stdout, we"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_1fcf7080","line":99,"in_reply_to":"1abeadc6_a9756e99","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        @param capability: capability to look for"},{"line_number":124,"context_line":"        @param subcapability: sub-capability to look for"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        lines \u003d out.split(\"\\n\")"},{"line_number":127,"context_line":"        for line_index in xrange(len(lines)):"},{"line_number":128,"context_line":"            if self.IP_LINK_SET_REGEX.match(lines[line_index]):"},{"line_number":129,"context_line":"                return self._check_set_section(lines[(line_index + 1):],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_c9ed4a27","line":126,"updated":"2014-08-20 12:12:05.000000000","message":"Please change \"\\n\" to os.linesep for cross-platform support.","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        @param capability: capability to look for"},{"line_number":124,"context_line":"        @param subcapability: sub-capability to look for"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        lines \u003d out.split(\"\\n\")"},{"line_number":127,"context_line":"        for line_index in xrange(len(lines)):"},{"line_number":128,"context_line":"            if self.IP_LINK_SET_REGEX.match(lines[line_index]):"},{"line_number":129,"context_line":"                return self._check_set_section(lines[(line_index + 1):],"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_7fc4e45e","line":126,"in_reply_to":"1abeadc6_c9ed4a27","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        @param subcapability: sub-capability to look for"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        lines \u003d out.split(\"\\n\")"},{"line_number":127,"context_line":"        for line_index in xrange(len(lines)):"},{"line_number":128,"context_line":"            if self.IP_LINK_SET_REGEX.match(lines[line_index]):"},{"line_number":129,"context_line":"                return self._check_set_section(lines[(line_index + 1):],"},{"line_number":130,"context_line":"                                               capability, subcapability)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_691b561b","line":127,"updated":"2014-08-20 12:12:05.000000000","message":"How about:\n\n        for index, line in enumerate(lines):\n            if self.IP_LINK_SET_REGEX.match(line):\n                return self._check_set_section(lines[(index + 1):],\n                                               capability, subcapability)\n\n?\n\nAlso a similar solution can be proposed for line 144","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"        @param subcapability: sub-capability to look for"},{"line_number":125,"context_line":"        \"\"\""},{"line_number":126,"context_line":"        lines \u003d out.split(\"\\n\")"},{"line_number":127,"context_line":"        for line_index in xrange(len(lines)):"},{"line_number":128,"context_line":"            if self.IP_LINK_SET_REGEX.match(lines[line_index]):"},{"line_number":129,"context_line":"                return self._check_set_section(lines[(line_index + 1):],"},{"line_number":130,"context_line":"                                               capability, subcapability)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_1fa4d0a4","line":127,"in_reply_to":"1abeadc6_691b561b","updated":"2014-08-20 12:57:47.000000000","message":"Thanks! Will use your proposal","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"1f5003cbd5555c24164cd18022aa77809bc10e06","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _check_set_section(self, out_lines, capability, subcapability):"},{"line_number":134,"context_line":"        \"\"\"Checks the \"ip link set\" help section"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        Iterates over all lines in \"set section until it reaches the"},{"line_number":137,"context_line":"        \"vf Num\" sub-section, then it passes all left lines to parsing"},{"line_number":138,"context_line":"        \"vf section\" method"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_a9bbaee3","line":136,"updated":"2014-08-20 12:12:05.000000000","message":"nit: you started a quoted part of the sentence but never finished it (only one \")","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2ca6d79734c0d9a5bc66ba839ea5064469a8276d","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _check_set_section(self, out_lines, capability, subcapability):"},{"line_number":134,"context_line":"        \"\"\"Checks the \"ip link set\" help section"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        Iterates over all lines in \"set section until it reaches the"},{"line_number":137,"context_line":"        \"vf Num\" sub-section, then it passes all left lines to parsing"},{"line_number":138,"context_line":"        \"vf section\" method"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1abeadc6_1fd21000","line":136,"in_reply_to":"1abeadc6_a9bbaee3","updated":"2014-08-20 12:57:47.000000000","message":"Done","commit_id":"88cf3a0180bb0fcc3ab487d6fabd99e3f5ee5411"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":47,"context_line":"    VF_BLOCK_REGEX \u003d \"\\[ vf NUM(?P\u003cvf_block\u003e.*) \\] \\]\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    CAPABILITY_REGEX \u003d \"\\[ %s (.*)\""}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_ff4862ce","line":46,"updated":"2014-09-21 12:39:32.000000000","message":"Since only one function inside this class the attribute root_helper (namespace isn\u0027t used by checks.py), I think that most of this class (if not all of it) should be staticmethods, or alternatively this class shouldn\u0027t exist (making all the methods actual module-leveled functions).\n\nvf_mgmt_capability_supported should receive the root_helper and simply pass that to _get_ip_link_output.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":47,"context_line":"    VF_BLOCK_REGEX \u003d \"\\[ vf NUM(?P\u003cvf_block\u003e.*) \\] \\]\""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    CAPABILITY_REGEX \u003d \"\\[ %s (.*)\""}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_90ac80ef","line":46,"in_reply_to":"da9df570_ff4862ce","updated":"2014-09-23 05:39:58.000000000","message":"I would prefer to keep the class and use static methods","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone):"},{"line_number":53,"context_line":"        super(IpLinkSupport, self).__init__(root_helper\u003droot_helper,"},{"line_number":54,"context_line":"                                            namespace\u003dnamespace)"},{"line_number":55,"context_line":"        self.log_fail_as_error \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def vf_mgmt_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":58,"context_line":"        \"\"\"Validate capability support"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_3fdd8a15","line":55,"updated":"2014-09-21 12:39:32.000000000","message":"This variable is not needed. At L83 just use \u0027log_fail_as_error\u003dFalse\u0027 instead.\n\nAlso, why don\u0027t you want to log failures as error? If \u0027ip link help\u0027 fails you really have no way to check if the support exists, so I think this should count as an error. In cases where people don\u0027t have this package installed for some reason, this error message could really help IMO.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def __init__(self, root_helper\u003dNone, namespace\u003dNone):"},{"line_number":53,"context_line":"        super(IpLinkSupport, self).__init__(root_helper\u003droot_helper,"},{"line_number":54,"context_line":"                                            namespace\u003dnamespace)"},{"line_number":55,"context_line":"        self.log_fail_as_error \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def vf_mgmt_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":58,"context_line":"        \"\"\"Validate capability support"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_70dd5c70","line":55,"in_reply_to":"da9df570_3fdd8a15","updated":"2014-09-23 05:39:58.000000000","message":"Agree to remove the variable.\n\u0027ip link help\u0027 always returns ERROR, so till the utility will continue to behave in such way, it is considered the  \u0027regular\u0027 flow.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                                            namespace\u003dnamespace)"},{"line_number":55,"context_line":"        self.log_fail_as_error \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def vf_mgmt_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":58,"context_line":"        \"\"\"Validate capability support"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        Checks if ip link support the given capability (and sub capability"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_7f0c7295","line":57,"updated":"2014-09-21 12:39:32.000000000","message":"I\u0027m not really sure about this point, but right now, if I want to use this function for more than one capability, the \u0027ip link help\u0027 command is executed and parsed for each one. Won\u0027t it be more efficient to somehow cache (or otherwise return) the output of _find_vf_section to the user, so he can re-use it later in the code?","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                                            namespace\u003dnamespace)"},{"line_number":55,"context_line":"        self.log_fail_as_error \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def vf_mgmt_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":58,"context_line":"        \"\"\"Validate capability support"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        Checks if ip link support the given capability (and sub capability"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_d0e4483d","line":57,"in_reply_to":"da9df570_7f0c7295","updated":"2014-09-23 05:39:58.000000000","message":"The  sections can be stored for future use at class level.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"fe55cf30be52e2d63bf3d3912c7be3487971296d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                                            namespace\u003dnamespace)"},{"line_number":55,"context_line":"        self.log_fail_as_error \u003d False"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def vf_mgmt_capability_supported(self, capability, subcapability\u003dNone):"},{"line_number":58,"context_line":"        \"\"\"Validate capability support"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        Checks if ip link support the given capability (and sub capability"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_7dac50ee","line":57,"in_reply_to":"da9df570_d0e4483d","updated":"2014-09-23 08:08:18.000000000","message":"I agree, though I do not currently see this option in the code.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                     ip_link_set_section,"},{"line_number":112,"context_line":"                                     re.DOTALL | re.MULTILINE)"},{"line_number":113,"context_line":"        if not vf_block_pattern:"},{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return vf_block_pattern.group(\"vf_block\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _search_capability(self, vf_block, capability, subcapability):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_9fecb6c9","line":114,"updated":"2014-09-21 12:39:32.000000000","message":"This function shouldn\u0027t return False (as it isn\u0027t a \u0027is_XXX\u0027 type of functions). Perhaps None?\n\nI would even consider raising an exception here - since you\u0027re expecting an specific block which should always be present, if it isn\u0027t present in the output then the code is in some kind of error state, thus an exception is suitable. What do you think?","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"fe55cf30be52e2d63bf3d3912c7be3487971296d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                     ip_link_set_section,"},{"line_number":112,"context_line":"                                     re.DOTALL | re.MULTILINE)"},{"line_number":113,"context_line":"        if not vf_block_pattern:"},{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return vf_block_pattern.group(\"vf_block\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _search_capability(self, vf_block, capability, subcapability):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_7d9370a3","line":114,"in_reply_to":"da9df570_10d6d04f","updated":"2014-09-23 08:08:18.000000000","message":"+1","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                     ip_link_set_section,"},{"line_number":112,"context_line":"                                     re.DOTALL | re.MULTILINE)"},{"line_number":113,"context_line":"        if not vf_block_pattern:"},{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return vf_block_pattern.group(\"vf_block\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _search_capability(self, vf_block, capability, subcapability):"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_10d6d04f","line":114,"in_reply_to":"da9df570_9fecb6c9","updated":"2014-09-23 05:39:58.000000000","message":"1. will fix to return None.\n2. This is not an error state, the function checks if vf management is supported or not","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return vf_block_pattern.group(\"vf_block\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _search_capability(self, vf_block, capability, subcapability):"},{"line_number":118,"context_line":"        \"\"\"Searches for capability and sub-capability within the VF block"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        :param vf_block: vf Num block content"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_1fd8c61c","line":117,"updated":"2014-09-21 12:39:32.000000000","message":"Since subcapability isn\u0027t needed to check only a capability, can it be defaulted to None?","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            return False"},{"line_number":115,"context_line":"        return vf_block_pattern.group(\"vf_block\")"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _search_capability(self, vf_block, capability, subcapability):"},{"line_number":118,"context_line":"        \"\"\"Searches for capability and sub-capability within the VF block"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        :param vf_block: vf Num block content"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_70f9dcc7","line":117,"in_reply_to":"da9df570_1fd8c61c","updated":"2014-09-23 05:39:58.000000000","message":"Done","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"7e33aa8e47d14381570f78ebbcb74ea9ea83f2f7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        else:"},{"line_number":128,"context_line":"            regex \u003d self.CAPABILITY_REGEX % capability"},{"line_number":129,"context_line":"        pattern_match \u003d re.search(regex, vf_block, re.DOTALL | re.MULTILINE)"},{"line_number":130,"context_line":"        return (pattern_match is not None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_dfcd5e5f","line":130,"updated":"2014-09-21 12:39:32.000000000","message":"nit: the brackets are not needed here IMO, but that\u0027s just be.","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"b352101f2151fffd9b4ab7b27c3d6bdc33cca7ef","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        else:"},{"line_number":128,"context_line":"            regex \u003d self.CAPABILITY_REGEX % capability"},{"line_number":129,"context_line":"        pattern_match \u003d re.search(regex, vf_block, re.DOTALL | re.MULTILINE)"},{"line_number":130,"context_line":"        return (pattern_match is not None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"da9df570_90f640d6","line":130,"in_reply_to":"da9df570_dfcd5e5f","updated":"2014-09-23 05:39:58.000000000","message":"Done","commit_id":"639e25f93e8cbb0f36627fd78094e4ecd26b30eb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"92e9c65d886b3d59bfa9e8c63f48d214197e991d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        :param capability: capability to look for"},{"line_number":106,"context_line":"        :param subcapability: sub-capability to look for"},{"line_number":107,"context_line":"        \"\"\""},{"line_number":108,"context_line":"        if not cls.vf_section:"},{"line_number":109,"context_line":"            cls._find_vf_section()"},{"line_number":110,"context_line":"        if not cls.vf_section:"},{"line_number":111,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":10,"id":"da9df570_196d9304","line":108,"updated":"2014-09-28 14:06:24.000000000","message":"These 2 ifs look really weird - you\u0027re checking for the same condition twice, hinting that vf_section could be both None and False. I would see about refactoring this to be easier on the mind.","commit_id":"dc4864a37353cd38fcd23a0791f150d774c71b7a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"92e9c65d886b3d59bfa9e8c63f48d214197e991d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                                     cls.help_command_output,"},{"line_number":122,"context_line":"                                     re.DOTALL | re.MULTILINE)"},{"line_number":123,"context_line":"        if not vf_block_pattern:"},{"line_number":124,"context_line":"            return None"},{"line_number":125,"context_line":"        cls.vf_section \u003d vf_block_pattern.group(\"vf_block\")"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"da9df570_d9bf8b5f","line":124,"updated":"2014-09-28 14:06:24.000000000","message":"This should now simply be \u0027return\u0027, as by default the function doesn\u0027t return anything and you  simply want to skip the next section.\n\nSuggestion:\n\n if vf_block_pattern:\n     cls.vf_section \u003d ...","commit_id":"dc4864a37353cd38fcd23a0791f150d774c71b7a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d2628a5cbf77f5bf986c3cb25a68cb945933de52","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                return_stderr\u003dTrue,"},{"line_number":104,"context_line":"                log_fail_as_error\u003dFalse)"},{"line_number":105,"context_line":"        except Exception as e:"},{"line_number":106,"context_line":"            LOG.exception(_(\"Failed executing ip command\"))"},{"line_number":107,"context_line":"            raise UnsupportedIpLinkCommand(reason\u003dstr(e))"},{"line_number":108,"context_line":"        return _stdout or _stderr"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_febc54de","line":106,"updated":"2014-10-06 10:27:30.000000000","message":"_LE() rather than _()","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"fc4fefd60ec1cf38f7d977105db298a1bd4f515f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"                return_stderr\u003dTrue,"},{"line_number":104,"context_line":"                log_fail_as_error\u003dFalse)"},{"line_number":105,"context_line":"        except Exception as e:"},{"line_number":106,"context_line":"            LOG.exception(_(\"Failed executing ip command\"))"},{"line_number":107,"context_line":"            raise UnsupportedIpLinkCommand(reason\u003dstr(e))"},{"line_number":108,"context_line":"        return _stdout or _stderr"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_1ecf582b","line":106,"in_reply_to":"baa201ad_febc54de","updated":"2014-10-06 10:33:20.000000000","message":"Done","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d2628a5cbf77f5bf986c3cb25a68cb945933de52","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                log_fail_as_error\u003dFalse)"},{"line_number":105,"context_line":"        except Exception as e:"},{"line_number":106,"context_line":"            LOG.exception(_(\"Failed executing ip command\"))"},{"line_number":107,"context_line":"            raise UnsupportedIpLinkCommand(reason\u003dstr(e))"},{"line_number":108,"context_line":"        return _stdout or _stderr"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9ecd0888","line":107,"updated":"2014-10-06 10:27:30.000000000","message":"str(e) is unnecessary because %s does str(unicode) conversion implicitly.","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"fc4fefd60ec1cf38f7d977105db298a1bd4f515f","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                log_fail_as_error\u003dFalse)"},{"line_number":105,"context_line":"        except Exception as e:"},{"line_number":106,"context_line":"            LOG.exception(_(\"Failed executing ip command\"))"},{"line_number":107,"context_line":"            raise UnsupportedIpLinkCommand(reason\u003dstr(e))"},{"line_number":108,"context_line":"        return _stdout or _stderr"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_5ed560b7","line":107,"in_reply_to":"baa201ad_9ecd0888","updated":"2014-10-06 10:33:20.000000000","message":"Done","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"79a890da6c91e696c30426ad7fff2be1bf365fa4","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class IpLinkConstants(object):"},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":43,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_96f68f5b","line":41,"updated":"2014-10-08 11:04:29.000000000","message":"It seems like all of these values apart from \"state\" are used only in unit tests. Are you personally planning on expanding the usage of IpLinkSupport in the future? If not we can probably remove these.","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"0759ea8e3b5f73789d816cfaa50b69baa94ad980","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class IpLinkConstants(object):"},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":43,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_ef3b249a","line":41,"in_reply_to":"baa201ad_4f951087","updated":"2014-10-12 09:21:50.000000000","message":"This is generic support for possible options related to VF management capabilities.\nBut if this this something that prevents this patch to be merged, I can reduce support for only used option (state).","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"15950bc07afc91043d29737386e175c28bab5b80","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class IpLinkConstants(object):"},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":43,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_4f951087","line":41,"in_reply_to":"baa201ad_6f0f342f","updated":"2014-10-12 09:10:09.000000000","message":"Regarding subcapability and these constants - Why don\u0027t you add what you need when you need it? We don\u0027t know when future patches land, just something to consider.","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"15e1d4b871421eb7f152532164873bf257c8aff6","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"class IpLinkConstants(object):"},{"line_number":41,"context_line":"    IP_LINK_CAPABILITY_STATE \u003d \"state\""},{"line_number":42,"context_line":"    IP_LINK_CAPABILITY_VLAN \u003d \"vlan\""},{"line_number":43,"context_line":"    IP_LINK_CAPABILITY_RATE \u003d \"rate\""},{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_6f0f342f","line":41,"in_reply_to":"baa201ad_96f68f5b","updated":"2014-10-12 09:00:48.000000000","message":"There are plans to add support for QoS on SR-IOV VF. Then rate/qos capabilities are required","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"79a890da6c91e696c30426ad7fff2be1bf365fa4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""},{"line_number":45,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":49,"context_line":"    VF_BLOCK_REGEX \u003d \"\\[ vf NUM(?P\u003cvf_block\u003e.*) \\] \\]\""},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_1629bf36","line":47,"updated":"2014-10-08 11:04:29.000000000","message":"You can inherit from object instead, the test still passes.\n\nYou can also consider changing all 3 functions to module level functions. \u0027IpLinkSupport\u0027 is only used as a namespace, and the file can serve that purpose just as well.","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"15e1d4b871421eb7f152532164873bf257c8aff6","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    IP_LINK_CAPABILITY_SPOOFCHK \u003d \"spoofchk\""},{"line_number":45,"context_line":"    IP_LINK_SUB_CAPABILITY_QOS \u003d \"qos\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class IpLinkSupport(ip_lib.IPWrapper):"},{"line_number":49,"context_line":"    VF_BLOCK_REGEX \u003d \"\\[ vf NUM(?P\u003cvf_block\u003e.*) \\] \\]\""},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_ef2a447d","line":47,"in_reply_to":"baa201ad_1629bf36","updated":"2014-10-12 09:00:48.000000000","message":"I will change the inheritance.\nIts a matter of style, but I am personally not in favor of using module level methods, would prefer to leave it as part of the class.","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"}],"neutron/cmd/sanity/checks.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bc76bde532ef4c313df442576199797cd39f1f37","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                               nw_dst\u003d\u0027%s\u0027 % ip,"},{"line_number":92,"context_line":"                               actions\u003dactions)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def vf_management_supported(root_helper):"},{"line_number":96,"context_line":"    support_obj \u003d ip_link_support.IpLinkSupport(root_helper)"},{"line_number":97,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_065c967d","line":94,"updated":"2014-08-20 08:50:42.000000000","message":"Please call this test from neutron.tests.functional.sanity.test_sanity. The idea is to run all of our checks in the functional job to see that they complete successfully, that the code doesn\u0027t throw an unexpected exception or anything like that.","commit_id":"9bb691d27d41949044e386cd85119ede7ef37e9b"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"185e81ff6959429bebd9dab4a7f9ba716cfccf39","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                               nw_dst\u003d\u0027%s\u0027 % ip,"},{"line_number":92,"context_line":"                               actions\u003dactions)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def vf_management_supported(root_helper):"},{"line_number":96,"context_line":"    support_obj \u003d ip_link_support.IpLinkSupport(root_helper)"},{"line_number":97,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1abeadc6_bab772d7","line":94,"in_reply_to":"1abeadc6_065c967d","updated":"2014-08-20 09:15:14.000000000","message":"Done","commit_id":"9bb691d27d41949044e386cd85119ede7ef37e9b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"79a890da6c91e696c30426ad7fff2be1bf365fa4","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        vf_section \u003d ip_link_support.IpLinkSupport.get_vf_mgmt_section("},{"line_number":98,"context_line":"                        root_helper)"},{"line_number":99,"context_line":"        if not ip_link_support.IpLinkSupport.vf_mgmt_capability_supported("},{"line_number":100,"context_line":"                vf_section,"},{"line_number":101,"context_line":"                ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_STATE):"},{"line_number":102,"context_line":"            LOG.debug(\"ip link command does not support vf capability\")"},{"line_number":103,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_96d5afe6","line":100,"updated":"2014-10-08 11:04:29.000000000","message":"The subcapability parameter isn\u0027t used. Have you thought of just removing it and the code that uses it in vf_mgmt_capability_supported?","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"15e1d4b871421eb7f152532164873bf257c8aff6","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        vf_section \u003d ip_link_support.IpLinkSupport.get_vf_mgmt_section("},{"line_number":98,"context_line":"                        root_helper)"},{"line_number":99,"context_line":"        if not ip_link_support.IpLinkSupport.vf_mgmt_capability_supported("},{"line_number":100,"context_line":"                vf_section,"},{"line_number":101,"context_line":"                ip_link_support.IpLinkConstants.IP_LINK_CAPABILITY_STATE):"},{"line_number":102,"context_line":"            LOG.debug(\"ip link command does not support vf capability\")"},{"line_number":103,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":12,"id":"baa201ad_6f3654e9","line":100,"in_reply_to":"baa201ad_96d5afe6","updated":"2014-10-12 09:00:48.000000000","message":"sub-capability is planned to be used in the near future for QoS, like \u0027vlan qos\u0027.","commit_id":"250a243ba977f11785850b91dfdbe92d9f1180f8"}],"neutron/cmd/sanity_check.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"45734a11b4cc3ffa8e155a78a596fb05439b96f1","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    result \u003d checks.ip_link_supported("},{"line_number":78,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":79,"context_line":"    if not result:"},{"line_number":80,"context_line":"        LOG.error(_(\u0027Check for ip link command support failed. \u0027"},{"line_number":81,"context_line":"                    \u0027Please ensure that the version of ip link \u0027"},{"line_number":82,"context_line":"                    \u0027being used has VF support.\u0027))"},{"line_number":83,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_d14d4874","line":80,"updated":"2014-08-18 16:24:21.000000000","message":"you should use _LE instead of _","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2d259145513c7012c33853e28871de8f413353b2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    result \u003d checks.ip_link_supported("},{"line_number":78,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":79,"context_line":"    if not result:"},{"line_number":80,"context_line":"        LOG.error(_(\u0027Check for ip link command support failed. \u0027"},{"line_number":81,"context_line":"                    \u0027Please ensure that the version of ip link \u0027"},{"line_number":82,"context_line":"                    \u0027being used has VF support.\u0027))"},{"line_number":83,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_b9d8ae54","line":80,"in_reply_to":"1abeadc6_d14d4874","updated":"2014-08-18 18:07:54.000000000","message":"Done","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"45734a11b4cc3ffa8e155a78a596fb05439b96f1","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        cfg.CONF.set_override(\u0027nova_notify\u0027, True)"},{"line_number":117,"context_line":"    if cfg.CONF.AGENT.arp_responder:"},{"line_number":118,"context_line":"        cfg.CONF.set_override(\u0027arp_responder\u0027, True)"},{"line_number":119,"context_line":"    if cfg.CONF.SRIOV_NIC.check_ip_link:"},{"line_number":120,"context_line":"        cfg.CONF.set_override(\u0027ip_link\u0027, True)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_0c5b2788","line":119,"updated":"2014-08-18 16:24:21.000000000","message":"It seems the test should be something like:\n\n  if \u0027sriovnicswitch\u0027 in CONF.ML2.mechanism_drivers:\n\nit avoid an other config attribute that no one will set","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2d259145513c7012c33853e28871de8f413353b2","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        cfg.CONF.set_override(\u0027nova_notify\u0027, True)"},{"line_number":117,"context_line":"    if cfg.CONF.AGENT.arp_responder:"},{"line_number":118,"context_line":"        cfg.CONF.set_override(\u0027arp_responder\u0027, True)"},{"line_number":119,"context_line":"    if cfg.CONF.SRIOV_NIC.check_ip_link:"},{"line_number":120,"context_line":"        cfg.CONF.set_override(\u0027ip_link\u0027, True)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_8069bb8d","line":119,"in_reply_to":"1abeadc6_0c5b2788","updated":"2014-08-18 18:07:54.000000000","message":"Hi Cedric, I did consider something like this, actually CONF.SRIOV.agent_required \u003d\u003d True is the right attribute to check, but this test should be executed on compute nodes while this config attribute as well as ml2.mechnism_drivers are defined on server node. I am not sure I can count on this setting being properly defined on compute node. What do you think?","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1f5740ee17e3cbfc1e63fdf34390071946da79c4","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        cfg.CONF.set_override(\u0027nova_notify\u0027, True)"},{"line_number":117,"context_line":"    if cfg.CONF.AGENT.arp_responder:"},{"line_number":118,"context_line":"        cfg.CONF.set_override(\u0027arp_responder\u0027, True)"},{"line_number":119,"context_line":"    if cfg.CONF.SRIOV_NIC.check_ip_link:"},{"line_number":120,"context_line":"        cfg.CONF.set_override(\u0027ip_link\u0027, True)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_fd13d259","line":119,"in_reply_to":"1abeadc6_8069bb8d","updated":"2014-08-19 11:13:39.000000000","message":"imo we should not defined specific option for sanity-check because it implies a new option that quite no one will configure.\n\nInstead we should deduce from configuration which checks should be done. If it\u0027s not possible, then by default disable the check ... if we do the opposite then we will perform checks not required!\n\nIt\u0027s quite common to see ml2 configuration defined on all nodes (sick), that\u0027s why i would use CONF.SRIOV.agent_required \u003d\u003d True as test.","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"0fc154953973331f71b3ff66b61f929e210da231","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        cfg.CONF.set_override(\u0027nova_notify\u0027, True)"},{"line_number":117,"context_line":"    if cfg.CONF.AGENT.arp_responder:"},{"line_number":118,"context_line":"        cfg.CONF.set_override(\u0027arp_responder\u0027, True)"},{"line_number":119,"context_line":"    if cfg.CONF.SRIOV_NIC.check_ip_link:"},{"line_number":120,"context_line":"        cfg.CONF.set_override(\u0027ip_link\u0027, True)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1abeadc6_b88c0837","line":119,"in_reply_to":"1abeadc6_fd13d259","updated":"2014-08-19 12:00:34.000000000","message":"Thanks, I\u0027ll proceed with CONF.SRIOV.agent_required \u003d\u003d True as test.","commit_id":"6cd133684222faaa227f7f479de9e61b9dc51512"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a2bc6dc9a7cec48a36887470d8e925191ed18861","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                    help\u003d_(\u0027Check for nova notification support\u0027)),"},{"line_number":94,"context_line":"    BoolOptCallback(\u0027arp_responder\u0027, check_arp_responder, default\u003dFalse,"},{"line_number":95,"context_line":"                    help\u003d_(\u0027Check for ARP responder support\u0027)),"},{"line_number":96,"context_line":"    BoolOptCallback(\u0027ip_link\u0027, check_ip_link, default\u003dFalse,"},{"line_number":97,"context_line":"                    help\u003d_(\u0027Check for ip link support\u0027)),"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_bdf4faf2","line":96,"updated":"2014-08-19 11:17:32.000000000","message":"the option name is unclear, the feature tested is not ip link but VF management?","commit_id":"7efc863879cec1f2da0f746b9a1c85988df1c803"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"7eae18eba556264df4caa7538b5dc8664c60b960","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                    help\u003d_(\u0027Check for nova notification support\u0027)),"},{"line_number":94,"context_line":"    BoolOptCallback(\u0027arp_responder\u0027, check_arp_responder, default\u003dFalse,"},{"line_number":95,"context_line":"                    help\u003d_(\u0027Check for ARP responder support\u0027)),"},{"line_number":96,"context_line":"    BoolOptCallback(\u0027ip_link\u0027, check_ip_link, default\u003dFalse,"},{"line_number":97,"context_line":"                    help\u003d_(\u0027Check for ip link support\u0027)),"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_f8804048","line":96,"in_reply_to":"1abeadc6_bdf4faf2","updated":"2014-08-19 11:47:37.000000000","message":"I\u0027ll change this option to vf_management","commit_id":"7efc863879cec1f2da0f746b9a1c85988df1c803"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d2628a5cbf77f5bf986c3cb25a68cb945933de52","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    result \u003d checks.vf_management_supported("},{"line_number":78,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":79,"context_line":"    if not result:"},{"line_number":80,"context_line":"        LOG.error(_LE(\u0027Check for vf management support failed. \u0027"},{"line_number":81,"context_line":"                    \u0027Please ensure that the version of ip link \u0027"},{"line_number":82,"context_line":"                    \u0027being used has VF support.\u0027))"},{"line_number":83,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_7e7ea41a","line":80,"updated":"2014-10-06 10:27:30.000000000","message":"It seems better to use upper cases for \"VF\" rather than \"vf\". It matches VF at L.82.","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"fc4fefd60ec1cf38f7d977105db298a1bd4f515f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    result \u003d checks.vf_management_supported("},{"line_number":78,"context_line":"        root_helper\u003dcfg.CONF.AGENT.root_helper)"},{"line_number":79,"context_line":"    if not result:"},{"line_number":80,"context_line":"        LOG.error(_LE(\u0027Check for vf management support failed. \u0027"},{"line_number":81,"context_line":"                    \u0027Please ensure that the version of ip link \u0027"},{"line_number":82,"context_line":"                    \u0027being used has VF support.\u0027))"},{"line_number":83,"context_line":"    return result"}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_9eda68e6","line":80,"in_reply_to":"baa201ad_7e7ea41a","updated":"2014-10-06 10:33:20.000000000","message":"Done","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"d2628a5cbf77f5bf986c3cb25a68cb945933de52","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    BoolOptCallback(\u0027arp_responder\u0027, check_arp_responder, default\u003dFalse,"},{"line_number":95,"context_line":"                    help\u003d_(\u0027Check for ARP responder support\u0027)),"},{"line_number":96,"context_line":"    BoolOptCallback(\u0027vf_management\u0027, check_vf_management, default\u003dFalse,"},{"line_number":97,"context_line":"                    help\u003d_(\u0027Check for vf management support\u0027)),"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"]"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_5e9d6058","line":97,"updated":"2014-10-06 10:27:30.000000000","message":"Same comment","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"fc4fefd60ec1cf38f7d977105db298a1bd4f515f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    BoolOptCallback(\u0027arp_responder\u0027, check_arp_responder, default\u003dFalse,"},{"line_number":95,"context_line":"                    help\u003d_(\u0027Check for ARP responder support\u0027)),"},{"line_number":96,"context_line":"    BoolOptCallback(\u0027vf_management\u0027, check_vf_management, default\u003dFalse,"},{"line_number":97,"context_line":"                    help\u003d_(\u0027Check for vf management support\u0027)),"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"]"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baa201ad_dee07098","line":97,"in_reply_to":"baa201ad_5e9d6058","updated":"2014-10-06 10:33:20.000000000","message":"Done","commit_id":"235cbd381929e38c3a7eb7f7ce7ac62476e302b0"}],"neutron/plugins/sriovnicagent/common/config.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"a2bc6dc9a7cec48a36887470d8e925191ed18861","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       \"the physical_device_mappings list.\")),"},{"line_number":82,"context_line":"    cfg.BoolOpt(\u0027check_ip_link\u0027,"},{"line_number":83,"context_line":"                default\u003dTrue,"},{"line_number":84,"context_line":"                help\u003d_(\"Check ip link command for VF management if enabled.\")),"},{"line_number":85,"context_line":"]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_3dbaaa23","line":84,"updated":"2014-08-19 11:17:32.000000000","message":"if the option stay, the  option name is unclear (check_VF_support seems clearer) and the default value should be False otherwise it\u0027s by default checked even without using SRVIO","commit_id":"7efc863879cec1f2da0f746b9a1c85988df1c803"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"7eae18eba556264df4caa7538b5dc8664c60b960","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       \"the physical_device_mappings list.\")),"},{"line_number":82,"context_line":"    cfg.BoolOpt(\u0027check_ip_link\u0027,"},{"line_number":83,"context_line":"                default\u003dTrue,"},{"line_number":84,"context_line":"                help\u003d_(\"Check ip link command for VF management if enabled.\")),"},{"line_number":85,"context_line":"]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_78e35033","line":84,"in_reply_to":"1abeadc6_3dbaaa23","updated":"2014-08-19 11:47:37.000000000","message":"I\u0027ll change the name to  check_vf_management and update the default.\nThank you for this suggestion!","commit_id":"7efc863879cec1f2da0f746b9a1c85988df1c803"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"155f2d96de22dd3a524cf1f9fde60a63bb4b7dfa","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       \"the physical_device_mappings list.\")),"},{"line_number":82,"context_line":"    cfg.BoolOpt(\u0027check_ip_link\u0027,"},{"line_number":83,"context_line":"                default\u003dTrue,"},{"line_number":84,"context_line":"                help\u003d_(\"Check ip link command for VF management if enabled.\")),"},{"line_number":85,"context_line":"]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_4ec5ee3a","line":84,"in_reply_to":"1abeadc6_78e35033","updated":"2014-08-19 12:44:47.000000000","message":"removing this option and will use CONF.ML@_SRIOV.agent_required instead","commit_id":"7efc863879cec1f2da0f746b9a1c85988df1c803"}],"neutron/tests/unit/agent/linux/test_ip_link_support.py":[{"author":{"_account_id":9423,"name":"Roey Chen","email":"roeyc@vmware.com","username":"roeyc"},"change_message_id":"43b339c95aa7e95ad93ee4106f37175829b7f9cf","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def setUp(self):"},{"line_number":109,"context_line":"        super(TestIpLinkSupport, self).setUp()"},{"line_number":110,"context_line":"        self.ip_link_supp \u003d ip_link_support.IpLinkSupport()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_vf_mgmt(self):"},{"line_number":113,"context_line":"        with mock.patch(\"neutron.agent.linux.utils.execute\") as mock_exec:"},{"line_number":114,"context_line":"            mock_exec.return_value \u003d \"\", self.IP_LINK_HELP"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_fafd34b2","line":111,"updated":"2014-08-24 12:54:54.000000000","message":"Most of the tests are repeating the same steps,\nIt would be easier to review and understand the different cases\nif these steps would be extracted out.\n\nfor example:\n\ndef _mock_execute_return_value(self, ip_cmd_output):\n    mock_exec \u003d mock.patch(\"neutron.agent.linux.utils.execute\")\n    mock_exec.return_value \u003d ip_cmd_output  \n    return mock_exec\n\ndef _test_capability(capability, subcapability\u003dNone, \n                     expected\u003d\u0027True\u0027, stdout\u003d\"\", stderr\u003d\"\"):\n    with _mock_execute_return_value(stdout\u003d\"\", stderr\u003dIP_LINK_HELP):\n        capable \u003d self.ip_link_supp.vf_mgmt_capability_supported(capability, subcapability)\n \n    if expected:\n        self.assertTrue(capable)\n    self.assertFalse(capable)","commit_id":"4a08c2e37482a1bb3104c7a9a8c244342567b956"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"ec03c33842445e8f5b11ca62c2dd65aa1b95f106","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def setUp(self):"},{"line_number":109,"context_line":"        super(TestIpLinkSupport, self).setUp()"},{"line_number":110,"context_line":"        self.ip_link_supp \u003d ip_link_support.IpLinkSupport()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_vf_mgmt(self):"},{"line_number":113,"context_line":"        with mock.patch(\"neutron.agent.linux.utils.execute\") as mock_exec:"},{"line_number":114,"context_line":"            mock_exec.return_value \u003d \"\", self.IP_LINK_HELP"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_94fa0773","line":111,"in_reply_to":"1abeadc6_fafd34b2","updated":"2014-08-24 12:58:23.000000000","message":"Good suggestion.\nThanks!","commit_id":"4a08c2e37482a1bb3104c7a9a8c244342567b956"}]}
