)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0a0b85bc9e0dcbd466547a922e5e43aeeec26d14","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a plugin to process the raw LLDP TLVs stored in Swift for"},{"line_number":10,"context_line":"the Basic Mgmt, 802.1, and 802.3 data sets and store the parsed data"},{"line_number":11,"context_line":"back in Swift.  It implements the TLV processing as described in the"},{"line_number":12,"context_line":"lldp-reporting.rst specification (https://review.openstack.org/#/c/374381/)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I854826787ff045ffb2807970deaba8b77cbe277d"},{"line_number":15,"context_line":"Closes-Bug: 1647515"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3a71b18c_5bf7258c","line":12,"range":{"start_line":12,"start_character":34,"end_line":12,"end_character":74},"updated":"2016-12-09 22:49:01.000000000","message":"nit: https://specs.openstack.org/openstack/ironic-inspector-specs/specs/lldp-reporting.html","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a plugin to process the raw LLDP TLVs stored in Swift for"},{"line_number":10,"context_line":"the Basic Mgmt, 802.1, and 802.3 data sets and store the parsed data"},{"line_number":11,"context_line":"back in Swift.  It implements the TLV processing as described in the"},{"line_number":12,"context_line":"lldp-reporting.rst specification (https://review.openstack.org/#/c/374381/)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I854826787ff045ffb2807970deaba8b77cbe277d"},{"line_number":15,"context_line":"Closes-Bug: 1647515"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a3905b3_92593901","line":12,"updated":"2017-01-20 15:56:16.000000000","message":"you can link to the rendered spec: http://specs.openstack.org/openstack/ironic-inspector-specs/specs/lldp-reporting.html","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This adds a plugin to process the raw LLDP TLVs stored in Swift for"},{"line_number":10,"context_line":"the Basic Mgmt, 802.1, and 802.3 data sets and store the parsed data"},{"line_number":11,"context_line":"back in Swift.  It implements the TLV processing as described in the"},{"line_number":12,"context_line":"lldp-reporting.rst specification (https://review.openstack.org/#/c/374381/)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I854826787ff045ffb2807970deaba8b77cbe277d"},{"line_number":15,"context_line":"Closes-Bug: 1647515"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a3905b3_26bbdae6","line":12,"in_reply_to":"5a3905b3_92593901","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"}],"ironic_inspector/common/lldp_map.py":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" Names and mapping functions used to map LLDP TLVs to name/value pairs \"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_4b3cba93","line":14,"updated":"2017-01-26 08:55:50.000000000","message":"Have you considered to use pyshark (python wrapper around tshark) for capturing/decoding packets? https://github.com/KimiNewt/pyshark","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" Names and mapping functions used to map LLDP TLVs to name/value pairs \"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_fd56c5d0","line":14,"in_reply_to":"3a461143_4b3cba93","updated":"2017-01-27 15:50:56.000000000","message":"Vasyl, thanks for the suggestion. I had not looked at it before but have now.  It doesn\u0027t appear to decode lldp packets from 802.x specs that we\u0027d need. The other issue with using a packet decoder is that we\u0027re not getting the raw packets from IPA.  There are multiple LLDP TLVs in an LLDP PDU and IPA stores them in a list in swift in the format [T, VALUE] (see the unit tests for examples).  This isn\u0027t a format that a packet decoder will handle.  Finally, I think the construct lib does a good job of parsing these packets (granted the definitions had to be defined in LLDP_TLVs).","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":68,"context_line":"def verify_valid_len(struct, name, data):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    if struct.sizeof() !\u003d len(data):"},{"line_number":71,"context_line":"        raise ValueError(_(\u0027Invalid data for %(name)s\u0027"},{"line_number":72,"context_line":"                           \u0027expected size %(expect)d, got %(actual)d\u0027) %"},{"line_number":73,"context_line":"                         {\u0027name\u0027: name,"},{"line_number":74,"context_line":"                          \u0027expect\u0027: struct.sizeof(),"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_4b0afad3","line":71,"updated":"2017-01-26 08:55:50.000000000","message":"missed space","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":68,"context_line":"def verify_valid_len(struct, name, data):"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    if struct.sizeof() !\u003d len(data):"},{"line_number":71,"context_line":"        raise ValueError(_(\u0027Invalid data for %(name)s\u0027"},{"line_number":72,"context_line":"                           \u0027expected size %(expect)d, got %(actual)d\u0027) %"},{"line_number":73,"context_line":"                         {\u0027name\u0027: name,"},{"line_number":74,"context_line":"                          \u0027expect\u0027: struct.sizeof(),"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_1d52b1dd","line":71,"in_reply_to":"3a461143_4b0afad3","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":82,"context_line":"#  data - data stream"},{"line_number":83,"context_line":"#  nv - instance of LLDPNameValues class"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def add_single_value(struct, name, data, nv):"},{"line_number":86,"context_line":"    nv.add_value(name, struct.parse(data).value)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_89297a9d","line":85,"updated":"2017-01-24 16:17:39.000000000","message":"why can\u0027t all this add_foobar functions be methods on nv?","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67438935fb316680b81fc3d763c9c0d07aec5b84","unresolved":false,"context_lines":[{"line_number":82,"context_line":"#  data - data stream"},{"line_number":83,"context_line":"#  nv - instance of LLDPNameValues class"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def add_single_value(struct, name, data, nv):"},{"line_number":86,"context_line":"    nv.add_value(name, struct.parse(data).value)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_df58948c","line":85,"in_reply_to":"5a3905b3_89297a9d","updated":"2017-01-24 17:40:10.000000000","message":"+1; in which case the mappings should be part of the LLDPNameValues class namespace such as in this example:\n\n    class A(object):\n      def func_1(self, *args):\n          print(args)\n      def func_2(self, **kwargs):\n          print(kwargs)\n      Mapping \u003d {\n          \u0027alias_1\u0027: func_1,\n          \u0027alias_2\u0027: func_2\n      }\n      def call(self, alias, *args, **kwargs):\n          try:\n             return self.Mapping[alias](self, *args, **kwargs)\n          except KeyError:\n             raise ValueError(‘Invalid alias: %s\u0027 % alias)","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":82,"context_line":"#  data - data stream"},{"line_number":83,"context_line":"#  nv - instance of LLDPNameValues class"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def add_single_value(struct, name, data, nv):"},{"line_number":86,"context_line":"    nv.add_value(name, struct.parse(data).value)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_35ae192e","line":85,"in_reply_to":"5a3905b3_89297a9d","updated":"2017-01-24 17:25:12.000000000","message":"Will look at implementing this.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":82,"context_line":"#  data - data stream"},{"line_number":83,"context_line":"#  nv - instance of LLDPNameValues class"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def add_single_value(struct, name, data, nv):"},{"line_number":86,"context_line":"    nv.add_value(name, struct.parse(data).value)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_79c02ce1","line":85,"in_reply_to":"5a3905b3_df58948c","updated":"2017-01-27 15:50:56.000000000","message":"Changed to add all functions and mappings to LLDPNameValues (class has been renamed LLDPParser).","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67438935fb316680b81fc3d763c9c0d07aec5b84","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"Basic_Mgmt_Map \u003d {"},{"line_number":173,"context_line":"    tlv.LLDP_TLV_CHASSIS_ID:"},{"line_number":174,"context_line":"        (tlv.ChassisId, LLDP_CHASSIS_ID_NM, add_single_value),"},{"line_number":175,"context_line":"    tlv.LLDP_TLV_PORT_ID:"},{"line_number":176,"context_line":"        (tlv.PortId, LLDP_PORT_ID_NM, add_single_value),"},{"line_number":177,"context_line":"    tlv.LLDP_TLV_TTL:"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_8d2981f5","line":174,"range":{"start_line":174,"start_character":8,"end_line":174,"end_character":62},"updated":"2017-01-24 17:40:10.000000000","message":"all these values in the mappings seem like deferred calls of some nv methods.\nOnce the mappings are part of the LLDPNameValues class namespace, this could be handled w/ partial functions:\n\n  class LLDPNameValues(object):\n      ...\n      Basic_Mgmt_Map  \u003d {\n          tlv.LLDP_TLV_CHASSIS_ID: functools.partial(add_single_value, tlv.ChassisId,\n              LLDP_CHASSIS_ID_NM),\n          ...,\n          tlv.LLDP_TLV_END_LLDPPDU: lambda x: None\n      }\n\n      def parse(self, lldp_type, lldp_value):\n          ...\n          self.Basic_Mgmg_Map[lldp_type](self)\n          ...","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"Basic_Mgmt_Map \u003d {"},{"line_number":173,"context_line":"    tlv.LLDP_TLV_CHASSIS_ID:"},{"line_number":174,"context_line":"        (tlv.ChassisId, LLDP_CHASSIS_ID_NM, add_single_value),"},{"line_number":175,"context_line":"    tlv.LLDP_TLV_PORT_ID:"},{"line_number":176,"context_line":"        (tlv.PortId, LLDP_PORT_ID_NM, add_single_value),"},{"line_number":177,"context_line":"    tlv.LLDP_TLV_TTL:"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_14c0cd7a","line":174,"range":{"start_line":174,"start_character":8,"end_line":174,"end_character":62},"in_reply_to":"5a3905b3_8d2981f5","updated":"2017-01-27 15:50:56.000000000","message":"Used similar implementation, although without deferred calls as I need to use some of the tuple values first before calling handler.  Let me know what you think...","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"}],"ironic_inspector/common/lldp_name_values.py":[{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0a0b85bc9e0dcbd466547a922e5e43aeeec26d14","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":142,"context_line":"            return str(netaddr.IPAddress(decoded_int))"},{"line_number":143,"context_line":"        except (ValueError, netaddr.core.AddrFormatError):"},{"line_number":144,"context_line":"            raise ValueError(_LI(\u0027Invalid IP format for \"%s\"\u0027), self.name)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_capabilities(self, data):"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_f0f80b4c","line":144,"range":{"start_line":144,"start_character":29,"end_line":144,"end_character":33},"updated":"2016-12-09 22:49:01.000000000","message":"s/_LI/_/","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"20950a96f8c44c8b42b0c3f26717e937ce210594","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":142,"context_line":"            return str(netaddr.IPAddress(decoded_int))"},{"line_number":143,"context_line":"        except (ValueError, netaddr.core.AddrFormatError):"},{"line_number":144,"context_line":"            raise ValueError(_LI(\u0027Invalid IP format for \"%s\"\u0027), self.name)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_capabilities(self, data):"},{"line_number":147,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_ed08492b","line":144,"range":{"start_line":144,"start_character":29,"end_line":144,"end_character":33},"in_reply_to":"3a71b18c_f0f80b4c","updated":"2016-12-12 16:42:35.000000000","message":"Done. Plus fixed all other ones in file.","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0a0b85bc9e0dcbd466547a922e5e43aeeec26d14","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_capabilities(self, data):"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        CAPABILITY_REPEATER_BIT \u003d 0x02"},{"line_number":149,"context_line":"        CAPABILITY_BRIDGE_BIT \u003d 0x04"},{"line_number":150,"context_line":"        CAPABILITY_WLAN_BIT \u003d 0x08"},{"line_number":151,"context_line":"        CAPABILITY_ROUTER_BIT \u003d 0x10"},{"line_number":152,"context_line":"        CAPABILITY_TELEPHONE_BIT \u003d 0x20"},{"line_number":153,"context_line":"        CAPABILITY_DOCSIS_BIT \u003d 0x40"},{"line_number":154,"context_line":"        CAPABILITY_STATION_BIT \u003d 0x80"},{"line_number":155,"context_line":"        CAPABILITY_CVLAN_BIT \u003d 0x100"},{"line_number":156,"context_line":"        CAPABILITY_SVLAN_BIT \u003d 0x200"},{"line_number":157,"context_line":"        CAPABILITY_TPMR_BIT \u003d 0x400"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        sys_cap \u003d []"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_d01f8fb5","line":157,"range":{"start_line":148,"start_character":8,"end_line":157,"end_character":35},"updated":"2016-12-09 22:49:01.000000000","message":"should be class-level","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"20950a96f8c44c8b42b0c3f26717e937ce210594","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _set_capabilities(self, data):"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        CAPABILITY_REPEATER_BIT \u003d 0x02"},{"line_number":149,"context_line":"        CAPABILITY_BRIDGE_BIT \u003d 0x04"},{"line_number":150,"context_line":"        CAPABILITY_WLAN_BIT \u003d 0x08"},{"line_number":151,"context_line":"        CAPABILITY_ROUTER_BIT \u003d 0x10"},{"line_number":152,"context_line":"        CAPABILITY_TELEPHONE_BIT \u003d 0x20"},{"line_number":153,"context_line":"        CAPABILITY_DOCSIS_BIT \u003d 0x40"},{"line_number":154,"context_line":"        CAPABILITY_STATION_BIT \u003d 0x80"},{"line_number":155,"context_line":"        CAPABILITY_CVLAN_BIT \u003d 0x100"},{"line_number":156,"context_line":"        CAPABILITY_SVLAN_BIT \u003d 0x200"},{"line_number":157,"context_line":"        CAPABILITY_TPMR_BIT \u003d 0x400"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        sys_cap \u003d []"},{"line_number":160,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_4d105d4f","line":157,"range":{"start_line":148,"start_character":8,"end_line":157,"end_character":35},"in_reply_to":"3a71b18c_d01f8fb5","updated":"2016-12-12 16:42:35.000000000","message":"Moved to class level.","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0a0b85bc9e0dcbd466547a922e5e43aeeec26d14","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            b \u003d data[1]"},{"line_number":163,"context_line":"        except IndexError:"},{"line_number":164,"context_line":"            raise ValueError(_LI(\u0027Incomplete lldp tlv for \"%s\"\u0027), self.name)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        if b \u0026 CAPABILITY_REPEATER_BIT:"},{"line_number":167,"context_line":"            sys_cap.append(\u0027Repeater\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_d04dcfc5","line":164,"range":{"start_line":164,"start_character":29,"end_line":164,"end_character":32},"updated":"2016-12-09 22:49:01.000000000","message":"s/_LI/_/","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"20950a96f8c44c8b42b0c3f26717e937ce210594","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        try:"},{"line_number":162,"context_line":"            b \u003d data[1]"},{"line_number":163,"context_line":"        except IndexError:"},{"line_number":164,"context_line":"            raise ValueError(_LI(\u0027Incomplete lldp tlv for \"%s\"\u0027), self.name)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        if b \u0026 CAPABILITY_REPEATER_BIT:"},{"line_number":167,"context_line":"            sys_cap.append(\u0027Repeater\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_4d377de3","line":164,"range":{"start_line":164,"start_character":29,"end_line":164,"end_character":32},"in_reply_to":"3a71b18c_d04dcfc5","updated":"2016-12-12 16:42:35.000000000","message":"Done.","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"0a0b85bc9e0dcbd466547a922e5e43aeeec26d14","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        self.name \u003d \"port_mau_type\""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        # See dot3MauType in RFC 4836"},{"line_number":561,"context_line":"        mau_types \u003d {"},{"line_number":562,"context_line":"            0: \"Unknown\","},{"line_number":563,"context_line":"            1: \"AUI\","},{"line_number":564,"context_line":"            2: \"10BASE-5\","}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_f0c00b2d","line":561,"range":{"start_line":561,"start_character":8,"end_line":561,"end_character":17},"updated":"2016-12-09 22:49:01.000000000","message":"I\u0027d make this a class-level attribute","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"20950a96f8c44c8b42b0c3f26717e937ce210594","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        self.name \u003d \"port_mau_type\""},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"        # See dot3MauType in RFC 4836"},{"line_number":561,"context_line":"        mau_types \u003d {"},{"line_number":562,"context_line":"            0: \"Unknown\","},{"line_number":563,"context_line":"            1: \"AUI\","},{"line_number":564,"context_line":"            2: \"10BASE-5\","}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6eadb0_cd51cd10","line":561,"range":{"start_line":561,"start_character":8,"end_line":561,"end_character":17},"in_reply_to":"3a71b18c_f0c00b2d","updated":"2016-12-12 16:42:35.000000000","message":"Done.","commit_id":"798504bcd965cc831fe7c486745b595065d66b80"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":58,"context_line":"dot3_MTU \u003d 4"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class BaseLLDP(object):"},{"line_number":62,"context_line":"    \"\"\"BaseLLDP class."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Each LLDP TLV contains one or more name/value pairs.  For a"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_66fe77af","line":61,"range":{"start_line":61,"start_character":6,"end_line":61,"end_character":14},"updated":"2016-12-15 17:31:39.000000000","message":"I don\u0027t like that the parsed value is being converted straight to a string. It\u0027s very difficult to check various properties of the fields if they\u0027re stored this way, hindering this module reusability.\nI\u0027d prefer something as an attribute approach:\n\n  BaseLLDP.capability_repeater\n  BaseLLDP.capability_SVLAN\n  ...\n\nwith a ``BaseLLDP.__str__`` that builds the string representation explicitly when needed.\nBetter maybe an ``as_dict`` method that would be usable to dump the (nested) structures into json when storing.","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"29557ccd032f32d358bcbe8bb74e1ea35d4e1f67","unresolved":false,"context_lines":[{"line_number":58,"context_line":"dot3_MTU \u003d 4"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class BaseLLDP(object):"},{"line_number":62,"context_line":"    \"\"\"BaseLLDP class."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    Each LLDP TLV contains one or more name/value pairs.  For a"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_e71eef6e","line":61,"range":{"start_line":61,"start_character":6,"end_line":61,"end_character":14},"in_reply_to":"1a6eadb0_66fe77af","updated":"2016-12-15 22:08:13.000000000","message":"Well the values get stored in swift as strings (except for numerical values like mtu) per the spec -https://specs.openstack.org/openstack/ironic-inspector-specs/specs/lldp-reporting.html#data-model-impact.\nI could look at storing them as bits and then converting to list of strings when added to swift, but not sure what that would gain.\n\nThis may change however if the construct class can be used, still checking on mechanism for bringing that in.","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":164,"context_line":"         \"\"\""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            bool_str \u003d str((byte \u0026 bit) !\u003d 0)"},{"line_number":168,"context_line":"        except IndexError:"},{"line_number":169,"context_line":"            raise ValueError(_(\u0027Invalid index for \"%s\"\u0027), self.name)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_a62c0f9a","line":167,"range":{"start_line":167,"start_character":23,"end_line":167,"end_character":26},"updated":"2016-12-15 17:31:39.000000000","message":"not sure it is reasonable to str here; in a generic case, one might have to use checks like if \"True\" \u003d\u003d  BaseLLDP.boolean_bit_attribute","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"29557ccd032f32d358bcbe8bb74e1ea35d4e1f67","unresolved":false,"context_lines":[{"line_number":164,"context_line":"         \"\"\""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        try:"},{"line_number":167,"context_line":"            bool_str \u003d str((byte \u0026 bit) !\u003d 0)"},{"line_number":168,"context_line":"        except IndexError:"},{"line_number":169,"context_line":"            raise ValueError(_(\u0027Invalid index for \"%s\"\u0027), self.name)"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_2b719144","line":167,"range":{"start_line":167,"start_character":23,"end_line":167,"end_character":26},"in_reply_to":"1a6eadb0_a62c0f9a","updated":"2016-12-15 22:08:13.000000000","message":"Yeah I agree, might make sense to store as 0/1 here.","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        return hash(self.name)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"class BaseList(BaseLLDP):"},{"line_number":258,"context_line":"    \"\"\"BaseList class"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    Used when value is a string containing values for TLVs"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_53704edc","line":257,"range":{"start_line":257,"start_character":15,"end_line":257,"end_character":23},"updated":"2016-12-15 17:31:39.000000000","message":"seems this would be better composition than inheritance","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":273,"context_line":"# https://standards.ieee.org/findstds/standard/802.1AB-2016.html"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"class ChassisID(BaseLLDP):"},{"line_number":277,"context_line":"    \"\"\"ChassisID class\"\"\""},{"line_number":278,"context_line":"    SUBTYPE_CHASSIS_COMP \u003d 1"},{"line_number":279,"context_line":"    SUBTYPE_IFALIAS \u003d 2"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_a93dc090","line":276,"range":{"start_line":276,"start_character":16,"end_line":276,"end_character":24},"updated":"2016-12-15 17:31:39.000000000","message":"I don\u0027t think I understand the inheritance here;\ndoes ChassisID.CAPABILITY_REPEATER_BIT make sense for ChassisID parsing?","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"29557ccd032f32d358bcbe8bb74e1ea35d4e1f67","unresolved":false,"context_lines":[{"line_number":273,"context_line":"# https://standards.ieee.org/findstds/standard/802.1AB-2016.html"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"class ChassisID(BaseLLDP):"},{"line_number":277,"context_line":"    \"\"\"ChassisID class\"\"\""},{"line_number":278,"context_line":"    SUBTYPE_CHASSIS_COMP \u003d 1"},{"line_number":279,"context_line":"    SUBTYPE_IFALIAS \u003d 2"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_ab592137","line":276,"range":{"start_line":276,"start_character":16,"end_line":276,"end_character":24},"in_reply_to":"1a6eadb0_a93dc090","updated":"2016-12-15 22:08:13.000000000","message":"The CAPABILITY_REPEATER_BIT would only be used by _set_capabilities. It was moved based on earlier comments, but I think the definition of these bits belong in this function.  Again, this will change if can use construct class.","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    def __init__(self, data):"},{"line_number":627,"context_line":"        super(Dot3_MTU, self).__init__()"},{"line_number":628,"context_line":"        self.name \u003d \"port_mtu\""},{"line_number":629,"context_line":"        self.value \u003d self._get_int(data[0:2])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_49efcce8","line":629,"range":{"start_line":629,"start_character":21,"end_line":629,"end_character":45},"updated":"2016-12-15 17:31:39.000000000","message":"shouldn\u0027t it be str-ed?","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"29557ccd032f32d358bcbe8bb74e1ea35d4e1f67","unresolved":false,"context_lines":[{"line_number":626,"context_line":"    def __init__(self, data):"},{"line_number":627,"context_line":"        super(Dot3_MTU, self).__init__()"},{"line_number":628,"context_line":"        self.name \u003d \"port_mtu\""},{"line_number":629,"context_line":"        self.value \u003d self._get_int(data[0:2])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_8bb38509","line":629,"range":{"start_line":629,"start_character":21,"end_line":629,"end_character":45},"in_reply_to":"1a6eadb0_49efcce8","updated":"2016-12-15 22:08:13.000000000","message":"In swift, most numeric values don\u0027t seem to be stored as strings, e.g. for memory \"size\": 17179869184.  However, this question came up a couple times, will change to make it a str.","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"}],"ironic_inspector/common/lldp_parsers.py":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ironic_inspector.common.i18n import _"},{"line_number":19,"context_line":"from ironic_inspector.common import lldp_tlvs as tlv"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ironic_inspector import utils"},{"line_number":22,"context_line":"LOG \u003d utils.getProcessingLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# Names used in name/value pair from parsed TLVs"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_1ecdf284","line":22,"range":{"start_line":18,"start_character":0,"end_line":22,"end_character":41},"updated":"2017-01-31 10:56:42.000000000","message":"nit, should be:\n\nfrom ironic_inspector.common.i18n import _\nfrom ironic_inspector.common import lldp_tlvs as tlv\nfrom ironic_inspector import utils\n\n\nLOG \u003d utils.getProcessingLogger(__name__)","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from ironic_inspector.common.i18n import _"},{"line_number":19,"context_line":"from ironic_inspector.common import lldp_tlvs as tlv"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ironic_inspector import utils"},{"line_number":22,"context_line":"LOG \u003d utils.getProcessingLogger(__name__)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"# Names used in name/value pair from parsed TLVs"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_1fd070c8","line":22,"range":{"start_line":18,"start_character":0,"end_line":22,"end_character":41},"in_reply_to":"3a461143_1ecdf284","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":55,"context_line":"class LLDPParser(object):"},{"line_number":56,"context_line":"    \"\"\"Base class to handle parsing of LLDP TLVs\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self, nv\u003dNone):"},{"line_number":59,"context_line":"        if not nv:"},{"line_number":60,"context_line":"            self.nv_dict \u003d {}"},{"line_number":61,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_7e92764d","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":32},"updated":"2017-01-31 10:56:42.000000000","message":"nit: would be nice to have doc string with `nv` description","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"class LLDPParser(object):"},{"line_number":56,"context_line":"    \"\"\"Base class to handle parsing of LLDP TLVs\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self, nv\u003dNone):"},{"line_number":59,"context_line":"        if not nv:"},{"line_number":60,"context_line":"            self.nv_dict \u003d {}"},{"line_number":61,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_9fa9c026","line":58,"range":{"start_line":58,"start_character":0,"end_line":58,"end_character":32},"in_reply_to":"3a461143_7e92764d","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    \"\"\"Base class to handle parsing of LLDP TLVs\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def __init__(self, nv\u003dNone):"},{"line_number":59,"context_line":"        if not nv:"},{"line_number":60,"context_line":"            self.nv_dict \u003d {}"},{"line_number":61,"context_line":"        else:"},{"line_number":62,"context_line":"            self.nv_dict \u003d nv"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Parser maps are used to associate a LLDP TLV with a function handler"},{"line_number":65,"context_line":"        # and arguments necessary to parse the TLV and generate one or more"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_5e493ab6","line":62,"range":{"start_line":59,"start_character":0,"end_line":62,"end_character":29},"updated":"2017-01-31 10:56:42.000000000","message":"nit: self.nv_dict \u003d nv if nv is not None","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def add_value(self, name, value):"},{"line_number":83,"context_line":"        \"\"\"Add name value pair to dict\"\"\""},{"line_number":84,"context_line":"        self.nv_dict.setdefault(name, value)  # don\u0027t change name if exists"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def append_value(self, name, value):"},{"line_number":87,"context_line":"        \"\"\"Add value to a list mapped to name\"\"\""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_31fc9f3d","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":44},"updated":"2017-01-31 10:56:42.000000000","message":"why do you need setdefault here? You don\u0027t return value","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def add_value(self, name, value):"},{"line_number":83,"context_line":"        \"\"\"Add name value pair to dict\"\"\""},{"line_number":84,"context_line":"        self.nv_dict.setdefault(name, value)  # don\u0027t change name if exists"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def append_value(self, name, value):"},{"line_number":87,"context_line":"        \"\"\"Add value to a list mapped to name\"\"\""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_7f0a5427","line":84,"range":{"start_line":84,"start_character":7,"end_line":84,"end_character":44},"in_reply_to":"3a461143_31fc9f3d","updated":"2017-02-01 00:54:34.000000000","message":"I only want to set the key if the key does not already exist.  In other words, if a TLV has been added don\u0027t overwrite it.  Updated comment.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        \"\"\"Add name value pair to dict\"\"\""},{"line_number":84,"context_line":"        self.nv_dict.setdefault(name, value)  # don\u0027t change name if exists"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def append_value(self, name, value):"},{"line_number":87,"context_line":"        \"\"\"Add value to a list mapped to name\"\"\""},{"line_number":88,"context_line":"        self.nv_dict.setdefault(name, []).append(value)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_f1613706","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":20},"updated":"2017-01-31 10:56:42.000000000","message":"you already have add_value, imo it\u0027s confusing. Maybe set_value and append_value","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        \"\"\"Add a single name/value pair the the nv dict\"\"\""},{"line_number":100,"context_line":"        self.add_value(kwargs[\u0027name\u0027], struct.value)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def parse_tlv(self, type, data):"},{"line_number":103,"context_line":"        \"\"\"Parse TLVs from mapping table\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # The handler function will generate name/value pairs using the"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_312f3fa2","line":102,"range":{"start_line":102,"start_character":24,"end_line":102,"end_character":28},"updated":"2017-01-31 10:56:42.000000000","message":"please rename this arg, type is built-in function\n\nAlso I\u0027d prefer doc string, it\u0027s hard to say what type `type and data` should be.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        \"\"\"Add a single name/value pair the the nv dict\"\"\""},{"line_number":100,"context_line":"        self.add_value(kwargs[\u0027name\u0027], struct.value)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def parse_tlv(self, type, data):"},{"line_number":103,"context_line":"        \"\"\"Parse TLVs from mapping table\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        # The handler function will generate name/value pairs using the"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_2225135b","line":102,"range":{"start_line":102,"start_character":24,"end_line":102,"end_character":28},"in_reply_to":"3a461143_312f3fa2","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # True will be returned"},{"line_number":109,"context_line":"        s \u003d self.parser_map.get(type)"},{"line_number":110,"context_line":"        if s:"},{"line_number":111,"context_line":"            func \u003d s[0]  # handler"},{"line_number":112,"context_line":"            if func:"},{"line_number":113,"context_line":"                tlv_parser \u003d s[1]"},{"line_number":114,"context_line":"                name \u003d s[2]"},{"line_number":115,"context_line":"                check_len \u003d s[3]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"                # Some constructs require a length validation to ensure the"},{"line_number":118,"context_line":"                # proper number of bytes has been provided, for example"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_74d37560","line":115,"range":{"start_line":111,"start_character":0,"end_line":115,"end_character":32},"updated":"2017-01-31 10:56:42.000000000","message":"looks like we need to handle KeyError here","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # True will be returned"},{"line_number":109,"context_line":"        s \u003d self.parser_map.get(type)"},{"line_number":110,"context_line":"        if s:"},{"line_number":111,"context_line":"            func \u003d s[0]  # handler"},{"line_number":112,"context_line":"            if func:"},{"line_number":113,"context_line":"                tlv_parser \u003d s[1]"},{"line_number":114,"context_line":"                name \u003d s[2]"},{"line_number":115,"context_line":"                check_len \u003d s[3]"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"                # Some constructs require a length validation to ensure the"},{"line_number":118,"context_line":"                # proper number of bytes has been provided, for example"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_821ec709","line":115,"range":{"start_line":111,"start_character":0,"end_line":115,"end_character":32},"in_reply_to":"3a461143_74d37560","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def add_mgmt_address(self, struct, **kwargs):"},{"line_number":178,"context_line":"        \"\"\"Handle LLDP_TLV_MGMT_ADDRESS\"\"\""},{"line_number":179,"context_line":"        # There may be multiple Mgmt Address TLVs so store in list"},{"line_number":180,"context_line":"        self.append_value(kwargs[\u0027name\u0027], struct.address)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _get_capabilities_list(self, caps):"},{"line_number":183,"context_line":"        \"\"\"Get capabilities from bit map\"\"\""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_7461b5a8","line":180,"range":{"start_line":180,"start_character":34,"end_line":180,"end_character":38},"updated":"2017-01-31 10:56:42.000000000","message":"if name is mandatory I\u0027d add one more arg instead of using kwargs","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def add_mgmt_address(self, struct, **kwargs):"},{"line_number":178,"context_line":"        \"\"\"Handle LLDP_TLV_MGMT_ADDRESS\"\"\""},{"line_number":179,"context_line":"        # There may be multiple Mgmt Address TLVs so store in list"},{"line_number":180,"context_line":"        self.append_value(kwargs[\u0027name\u0027], struct.address)"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    def _get_capabilities_list(self, caps):"},{"line_number":183,"context_line":"        \"\"\"Get capabilities from bit map\"\"\""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_290ed6e4","line":180,"range":{"start_line":180,"start_character":34,"end_line":180,"end_character":38},"in_reply_to":"3a461143_7461b5a8","updated":"2017-02-01 00:54:34.000000000","message":"Changed to use name and data instead of kwargs. However all functions that are called through the parser_map must take the same amount of args, so they all\ntake name and data.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        See http://www.ieee802.org/1/pages/802.1Q-2014.html, Annex D"},{"line_number":210,"context_line":"        and http: // standards.ieee.org / about / get / 802 / 802.3.html"},{"line_number":211,"context_line":"        \"\"\""},{"line_number":212,"context_line":"        oui_data \u003d kwargs[\u0027data\u0027]"},{"line_number":213,"context_line":"        oui \u003d binascii.hexlify(struct.oui).decode()"},{"line_number":214,"context_line":"        subtype \u003d struct.subtype"},{"line_number":215,"context_line":"        oui_data \u003d oui_data[4:]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_74a455b9","line":212,"range":{"start_line":212,"start_character":9,"end_line":212,"end_character":33},"updated":"2017-01-31 10:56:42.000000000","message":"ditto \u0027data\u0027, please specify new arg for mandatory values","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        See http://www.ieee802.org/1/pages/802.1Q-2014.html, Annex D"},{"line_number":210,"context_line":"        and http: // standards.ieee.org / about / get / 802 / 802.3.html"},{"line_number":211,"context_line":"        \"\"\""},{"line_number":212,"context_line":"        oui_data \u003d kwargs[\u0027data\u0027]"},{"line_number":213,"context_line":"        oui \u003d binascii.hexlify(struct.oui).decode()"},{"line_number":214,"context_line":"        subtype \u003d struct.subtype"},{"line_number":215,"context_line":"        oui_data \u003d oui_data[4:]"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_49116203","line":212,"range":{"start_line":212,"start_character":9,"end_line":212,"end_character":33},"in_reply_to":"3a461143_74a455b9","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                 LLDP_PORT_LINK_AGG_NM, True)"},{"line_number":257,"context_line":"        }"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def add_dot1_port_protocol_vlan(self, struct, **kwargs):"},{"line_number":260,"context_line":"        \"\"\"Handle dot1_PORT_PROTOCOL_VLANID\"\"\""},{"line_number":261,"context_line":"        self.add_value(LLDP_PORT_PROT_VLAN_ENABLED_NM, struct.flags.enabled)"},{"line_number":262,"context_line":"        self.add_value(LLDP_PORT_PROT_VLAN_SUPPORT_NM, struct.flags.supported)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_f4a685ac","line":259,"range":{"start_line":259,"start_character":52,"end_line":259,"end_character":58},"updated":"2017-01-31 10:56:42.000000000","message":"nit: not needed","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":256,"context_line":"                 LLDP_PORT_LINK_AGG_NM, True)"},{"line_number":257,"context_line":"        }"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def add_dot1_port_protocol_vlan(self, struct, **kwargs):"},{"line_number":260,"context_line":"        \"\"\"Handle dot1_PORT_PROTOCOL_VLANID\"\"\""},{"line_number":261,"context_line":"        self.add_value(LLDP_PORT_PROT_VLAN_ENABLED_NM, struct.flags.enabled)"},{"line_number":262,"context_line":"        self.add_value(LLDP_PORT_PROT_VLAN_SUPPORT_NM, struct.flags.supported)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_49288233","line":259,"range":{"start_line":259,"start_character":52,"end_line":259,"end_character":58},"in_reply_to":"3a461143_f4a685ac","updated":"2017-02-01 00:54:34.000000000","message":"Function is called using parser_map so must have params even if not used.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":264,"context_line":"        self.append_value(LLDP_PORT_PROT_VLANIDS_NM, struct.vlanid)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def add_dot1_vlans(self, struct, **kwargs):"},{"line_number":267,"context_line":"        \"\"\"Handle dot1_VLAN_NAME\"\"\""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        # There can be multiple vlan TLVs, add dictionary entry with id/vlan"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_54a83977","line":266,"range":{"start_line":266,"start_character":39,"end_line":266,"end_character":45},"updated":"2017-01-31 10:56:42.000000000","message":"not needed","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":264,"context_line":"        self.append_value(LLDP_PORT_PROT_VLANIDS_NM, struct.vlanid)"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    def add_dot1_vlans(self, struct, **kwargs):"},{"line_number":267,"context_line":"        \"\"\"Handle dot1_VLAN_NAME\"\"\""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        # There can be multiple vlan TLVs, add dictionary entry with id/vlan"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_a919e623","line":266,"range":{"start_line":266,"start_character":39,"end_line":266,"end_character":45},"in_reply_to":"3a461143_54a83977","updated":"2017-02-01 00:54:34.000000000","message":"Must have params.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        vlan_dict[\u0027id\u0027] \u003d struct.vlanid"},{"line_number":273,"context_line":"        self.append_value(LLDP_PORT_VLANS_NM, vlan_dict)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def add_dot1_protocol_identities(self, struct, **kwargs):"},{"line_number":276,"context_line":"        \"\"\"handle dot1_PROTOCOL_IDENTITY\"\"\""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # There can be multiple protocol ids TLVs, store in list"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_94bc61bc","line":275,"range":{"start_line":275,"start_character":53,"end_line":275,"end_character":59},"updated":"2017-01-31 10:56:42.000000000","message":"ditto","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if not nv:"},{"line_number":68,"context_line":"            self.nv_dict \u003d {}"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self.nv_dict \u003d nv"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.node_info \u003d node_info"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_5d549953","line":70,"updated":"2017-02-03 09:58:15.000000000","message":"nit:\n\n  self.nv_dict \u003d nv or {}","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        if not nv:"},{"line_number":68,"context_line":"            self.nv_dict \u003d {}"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            self.nv_dict \u003d nv"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.node_info \u003d node_info"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_ce967fef","line":70,"in_reply_to":"1a430d35_5d549953","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # are not mapped to a name/value pair (e.g. LLDP_TLV_TTL)."},{"line_number":86,"context_line":"        #"},{"line_number":87,"context_line":"        # Each class that inherits from this base class must provide a"},{"line_number":88,"context_line":"        # parser map."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self.parser_map \u003d {}"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_7d515562","line":88,"updated":"2017-02-03 09:58:15.000000000","message":"nit: I wonder if this should be moved to a class docstring","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        # are not mapped to a name/value pair (e.g. LLDP_TLV_TTL)."},{"line_number":86,"context_line":"        #"},{"line_number":87,"context_line":"        # Each class that inherits from this base class must provide a"},{"line_number":88,"context_line":"        # parser map."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        self.parser_map \u003d {}"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_6b9d7865","line":88,"in_reply_to":"1a430d35_7d515562","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def set_value(self, name, value):"},{"line_number":93,"context_line":"        \"\"\"Set name value pair in dictionary\"\"\""},{"line_number":94,"context_line":"        self.nv_dict.setdefault(name, value)  # don\u0027t change key if it exists"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def append_value(self, name, value):"},{"line_number":97,"context_line":"        \"\"\"Add value to a list mapped to name\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_9d4e01c0","line":94,"updated":"2017-02-03 09:58:15.000000000","message":"nit: please move this comment to method docstring, it\u0027s quite important","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def set_value(self, name, value):"},{"line_number":93,"context_line":"        \"\"\"Set name value pair in dictionary\"\"\""},{"line_number":94,"context_line":"        self.nv_dict.setdefault(name, value)  # don\u0027t change key if it exists"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def append_value(self, name, value):"},{"line_number":97,"context_line":"        \"\"\"Add value to a list mapped to name\"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_cb958c33","line":94,"in_reply_to":"1a430d35_9d4e01c0","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def parse_tlv(self, tlv_type, data):"},{"line_number":105,"context_line":"        \"\"\"Parse TLVs from mapping table"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :param: tlv_type - type identifier for TLV"},{"line_number":108,"context_line":"        :param: data - raw TLV value"},{"line_number":109,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_bd4bbdaf","line":106,"updated":"2017-02-03 09:58:15.000000000","message":"nit: I would not mind a more detailed docstring explaining how it works","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def parse_tlv(self, tlv_type, data):"},{"line_number":105,"context_line":"        \"\"\"Parse TLVs from mapping table"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :param: tlv_type - type identifier for TLV"},{"line_number":108,"context_line":"        :param: data - raw TLV value"},{"line_number":109,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_2b79b0c8","line":106,"in_reply_to":"1a430d35_bd4bbdaf","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Parse TLVs from mapping table"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :param: tlv_type - type identifier for TLV"},{"line_number":108,"context_line":"        :param: data - raw TLV value"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # The handler function will generate name/value pairs using the"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_ddc6c915","line":108,"updated":"2017-02-03 09:58:15.000000000","message":":return: ?","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        \"\"\"Parse TLVs from mapping table"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        :param: tlv_type - type identifier for TLV"},{"line_number":108,"context_line":"        :param: data - raw TLV value"},{"line_number":109,"context_line":"        \"\"\""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # The handler function will generate name/value pairs using the"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_6b7f38ab","line":108,"in_reply_to":"1a430d35_ddc6c915","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        # name/value pairs will be added, but since the TLV was handled,"},{"line_number":114,"context_line":"        # True will be returned"},{"line_number":115,"context_line":"        s \u003d self.parser_map.get(tlv_type)"},{"line_number":116,"context_line":"        if s:"},{"line_number":117,"context_line":"            func \u003d s[0]  # handler"},{"line_number":118,"context_line":"            if func:"},{"line_number":119,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_fdcb851c","line":116,"updated":"2017-02-03 09:58:15.000000000","message":"nit: please reduce indentation by\n\n if not s:\n    return False","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":115,"context_line":"        s \u003d self.parser_map.get(tlv_type)"},{"line_number":116,"context_line":"        if s:"},{"line_number":117,"context_line":"            func \u003d s[0]  # handler"},{"line_number":118,"context_line":"            if func:"},{"line_number":119,"context_line":"                try:"},{"line_number":120,"context_line":"                    tlv_parser \u003d s[1]"},{"line_number":121,"context_line":"                    name \u003d s[2]"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_1dd131ce","line":118,"updated":"2017-02-03 09:58:15.000000000","message":"ditto\n\n if not func:\n     return True","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"aeae460bc8c68a03824ae1ea372f181d115b17a3","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                    LOG.warning(_LW(\u0027Invalid data for %(name)s \u0027"},{"line_number":133,"context_line":"                                    \u0027expected len %(expect)d, got %(actual)d\u0027),"},{"line_number":134,"context_line":"                                {\u0027name\u0027: name, \u0027expect\u0027: tlv_parser.sizeof(),"},{"line_number":135,"context_line":"                                \u0027actual\u0027: len(data)})"},{"line_number":136,"context_line":"                    return False"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"                # Use the construct parser to parse TLV so that it\u0027s"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_6ac7e263","line":135,"updated":"2017-02-01 10:37:43.000000000","message":"nit: node_info\u003dself.node_info","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":132,"context_line":"                    LOG.warning(_LW(\u0027Invalid data for %(name)s \u0027"},{"line_number":133,"context_line":"                                    \u0027expected len %(expect)d, got %(actual)d\u0027),"},{"line_number":134,"context_line":"                                {\u0027name\u0027: name, \u0027expect\u0027: tlv_parser.sizeof(),"},{"line_number":135,"context_line":"                                \u0027actual\u0027: len(data)})"},{"line_number":136,"context_line":"                    return False"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"                # Use the construct parser to parse TLV so that it\u0027s"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_6e710b76","line":135,"in_reply_to":"3a461143_6ac7e263","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                    func(struct, name, data)"},{"line_number":151,"context_line":"                except ValueError as e:"},{"line_number":152,"context_line":"                    LOG.warning(_LW(\"TLV value error: %s\"), e,"},{"line_number":153,"context_line":"                                node_info\u003dself.node_info)"},{"line_number":154,"context_line":"            return True"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_3dd6edc5","line":153,"updated":"2017-02-03 09:58:15.000000000","message":"should we return False here? otherwise we fall through to the next line and return True","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                    func(struct, name, data)"},{"line_number":151,"context_line":"                except ValueError as e:"},{"line_number":152,"context_line":"                    LOG.warning(_LW(\"TLV value error: %s\"), e,"},{"line_number":153,"context_line":"                                node_info\u003dself.node_info)"},{"line_number":154,"context_line":"            return True"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_fea76408","line":153,"in_reply_to":"1a430d35_3dd6edc5","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    # This method is in base class since it can be used by both dot1 and dot3"},{"line_number":159,"context_line":"    def add_dot1_link_aggregation(self, struct, name, data):"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.set_value(LLDP_PORT_LINK_AGG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_5ddbb9ed","line":158,"updated":"2017-02-03 09:58:15.000000000","message":"please convert this comment to a proper docstring","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    # This method is in base class since it can be used by both dot1 and dot3"},{"line_number":159,"context_line":"    def add_dot1_link_aggregation(self, struct, name, data):"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        self.set_value(LLDP_PORT_LINK_AGG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_7e8b7468","line":158,"in_reply_to":"1a430d35_5ddbb9ed","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def add_mgmt_address(self, struct, name, data):"},{"line_number":202,"context_line":"        \"\"\"Handle LLDP_TLV_MGMT_ADDRESS\"\"\""},{"line_number":203,"context_line":"        # There may be multiple Mgmt Address TLVs so store in list"},{"line_number":204,"context_line":"        self.append_value(name, struct.address)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _get_capabilities_list(self, caps):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_7dd875f0","line":203,"updated":"2017-02-03 09:58:15.000000000","message":"ditto, please move to the docstring","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            else:"},{"line_number":251,"context_line":"                LOG.debug(\"Subtype %d not found for 802.3\", subtype)"},{"line_number":252,"context_line":"        else:"},{"line_number":253,"context_line":"            LOG.debug(\"Organizationally Unique ID %s not \""},{"line_number":254,"context_line":"                      \"recognized\", oui)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_9de521aa","line":253,"updated":"2017-02-03 09:58:15.000000000","message":"does it make sense to convert this to a warning?","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            else:"},{"line_number":251,"context_line":"                LOG.debug(\"Subtype %d not found for 802.3\", subtype)"},{"line_number":252,"context_line":"        else:"},{"line_number":253,"context_line":"            LOG.debug(\"Organizationally Unique ID %s not \""},{"line_number":254,"context_line":"                      \"recognized\", oui)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_5e5318e2","line":253,"in_reply_to":"1a430d35_9de521aa","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def add_dot1_vlans(self, struct, name, data):"},{"line_number":290,"context_line":"        \"\"\"Handle dot1_VLAN_NAME\"\"\""},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # There can be multiple vlan TLVs, add dictionary entry with id/vlan"},{"line_number":293,"context_line":"        vlan_dict \u003d {}"},{"line_number":294,"context_line":"        vlan_dict[\u0027name\u0027] \u003d struct.vlan_name"},{"line_number":295,"context_line":"        vlan_dict[\u0027id\u0027] \u003d struct.vlanid"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_bde2dd9d","line":292,"updated":"2017-02-03 09:58:15.000000000","message":"ditto here about using docstrings","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":289,"context_line":"    def add_dot1_vlans(self, struct, name, data):"},{"line_number":290,"context_line":"        \"\"\"Handle dot1_VLAN_NAME\"\"\""},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        # There can be multiple vlan TLVs, add dictionary entry with id/vlan"},{"line_number":293,"context_line":"        vlan_dict \u003d {}"},{"line_number":294,"context_line":"        vlan_dict[\u0027name\u0027] \u003d struct.vlan_name"},{"line_number":295,"context_line":"        vlan_dict[\u0027id\u0027] \u003d struct.vlanid"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_feb684f7","line":292,"in_reply_to":"1a430d35_bde2dd9d","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self.append_value(LLDP_PORT_VLANS_NM, vlan_dict)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def add_dot1_protocol_identities(self, struct, name, data):"},{"line_number":299,"context_line":"        \"\"\"handle dot1_PROTOCOL_IDENTITY\"\"\""},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # There can be multiple protocol ids TLVs, store in list"},{"line_number":302,"context_line":"        self.append_value(LLDP_PROTOCOL_IDENTITIES_NM,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_ddede98f","line":299,"updated":"2017-02-03 09:58:15.000000000","message":"nit: Handle","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self.append_value(LLDP_PORT_VLANS_NM, vlan_dict)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def add_dot1_protocol_identities(self, struct, name, data):"},{"line_number":299,"context_line":"        \"\"\"handle dot1_PROTOCOL_IDENTITY\"\"\""},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # There can be multiple protocol ids TLVs, store in list"},{"line_number":302,"context_line":"        self.append_value(LLDP_PROTOCOL_IDENTITIES_NM,"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_1ed0b01e","line":299,"in_reply_to":"1a430d35_ddede98f","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"}],"ironic_inspector/common/lldp_tlvs.py":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" name value pair classes derived from LLDP TLVs \"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# see http://construct.readthedocs.io/en/latest/index.html"},{"line_number":17,"context_line":"import construct as c"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_98da8077","line":14,"range":{"start_line":14,"start_character":4,"end_line":14,"end_character":5},"updated":"2016-12-30 13:04:09.000000000","message":"nit: s/n/N","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" name value pair classes derived from LLDP TLVs \"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# see http://construct.readthedocs.io/en/latest/index.html"},{"line_number":17,"context_line":"import construct as c"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_3dfeb138","line":14,"range":{"start_line":14,"start_character":4,"end_line":14,"end_character":5},"in_reply_to":"ba5201f7_07145a42","updated":"2017-01-03 18:54:55.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"1bf6d8fb0b8abafa21a731a822dcb3b3130c4ea1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":12,"context_line":"# limitations under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\" name value pair classes derived from LLDP TLVs \"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"# see http://construct.readthedocs.io/en/latest/index.html"},{"line_number":17,"context_line":"import construct as c"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_07145a42","line":14,"range":{"start_line":14,"start_character":4,"end_line":14,"end_character":5},"in_reply_to":"ba5201f7_98da8077","updated":"2017-01-02 16:53:50.000000000","message":"Seems reasonable to fix capitalization in all full-sentence comment strings below as well.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":121,"context_line":"# Basic Management Set TLV field definitions"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"# Chassis ID value is based on the subtype"},{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_ebb9d5cc","line":124,"updated":"2017-01-04 19:37:19.000000000","message":"please add a mapping similar to the IANA one for the subtype to be readable:\n\nCHASSIS_ID_MAPPING \u003d {\n    (\u0027entPhysicalAlias\u0027, 1): cc.GreedyString(\"utf8\"),\n     ...\n    (\u0027mac_address\u0027, 4): MACAddress,\n    (\u0027IANA_address\u0027, 5): IANAAddress,\n     ...\n}","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":121,"context_line":"# Basic Management Set TLV field definitions"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"# Chassis ID value is based on the subtype"},{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_45e98ce5","line":124,"in_reply_to":"ba5201f7_ebb9d5cc","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"# Chassis ID value is based on the subtype"},{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_6bf40587","line":126,"range":{"start_line":126,"start_character":4,"end_line":126,"end_character":24},"updated":"2017-01-04 19:37:19.000000000","message":"please, use an Enum here to map the subtype to text representation thru the CHASSIS_ID_MAPPING","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":123,"context_line":"# Chassis ID value is based on the subtype"},{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_65e69016","line":126,"range":{"start_line":126,"start_character":4,"end_line":126,"end_character":24},"in_reply_to":"ba5201f7_6bf40587","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_7fde4d40","line":127,"range":{"start_line":127,"start_character":3,"end_line":127,"end_character":13},"updated":"2017-01-04 19:37:19.000000000","message":"shouldn\u0027t this be value? so we have:\nchassis_id.type (chassis_id)\nchassis_id.value\nchassis_id.subtype","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":124,"context_line":"# Note that \u0027GreedyString()\u0027 is used in cases where string len is not defined"},{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_a5ecf8f3","line":127,"range":{"start_line":127,"start_character":3,"end_line":127,"end_character":13},"in_reply_to":"ba5201f7_7fde4d40","updated":"2017-01-05 14:11:40.000000000","message":"Done, changed to value.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":131,"context_line":"        4: cc.Struct(\u0027id\u0027 / MACAddress),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_bfcb5552","line":128,"range":{"start_line":128,"start_character":7,"end_line":128,"end_character":53},"updated":"2017-01-04 19:37:19.000000000","message":"please, embed these using the \u0027value\u0027 field (w/ cc.Embedded)","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":125,"context_line":"ChassisId \u003d cc.Struct("},{"line_number":126,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":127,"context_line":"    \u0027chassis\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":128,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":131,"context_line":"        4: cc.Struct(\u0027id\u0027 / MACAddress),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_e5c0c052","line":128,"range":{"start_line":128,"start_character":7,"end_line":128,"end_character":53},"in_reply_to":"ba5201f7_bfcb5552","updated":"2017-01-05 14:11:40.000000000","message":"Done, added cc.Embedded","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":131,"context_line":"        4: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":132,"context_line":"        5: cc.Struct("},{"line_number":133,"context_line":"            \u0027family\u0027 / cc.Enum(cc.Int8ub, **mapping_for_enum("},{"line_number":134,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING)),"},{"line_number":135,"context_line":"            \u0027id\u0027 / cc.Switch(c.this.family, mapping_for_switch("},{"line_number":136,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING))"},{"line_number":137,"context_line":"        ),"},{"line_number":138,"context_line":"        6: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifName"},{"line_number":139,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":140,"context_line":"    }),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_abc0ad2b","line":137,"range":{"start_line":132,"start_character":8,"end_line":137,"end_character":10},"updated":"2017-01-04 19:37:19.000000000","message":"please, create an IANAAddress struct to be able to reuse e.g in PortId and store it in the \u0027value\u0027 field, so we have:\n\nchassis_id.type \u003d \u0027chassis_id\u0027\nchassis_id.subtype \u003d \u0027IANA_address\u0027\nchassis_id.value: \u0027192.168.0.1\u0027\nchassis_id.family \u003d \u0027ipv4\u0027","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":130,"context_line":"        3: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":131,"context_line":"        4: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":132,"context_line":"        5: cc.Struct("},{"line_number":133,"context_line":"            \u0027family\u0027 / cc.Enum(cc.Int8ub, **mapping_for_enum("},{"line_number":134,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING)),"},{"line_number":135,"context_line":"            \u0027id\u0027 / cc.Switch(c.this.family, mapping_for_switch("},{"line_number":136,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING))"},{"line_number":137,"context_line":"        ),"},{"line_number":138,"context_line":"        6: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifName"},{"line_number":139,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":140,"context_line":"    }),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_a5c31856","line":137,"range":{"start_line":132,"start_character":8,"end_line":137,"end_character":10},"in_reply_to":"ba5201f7_abc0ad2b","updated":"2017-01-05 14:11:40.000000000","message":"Done added define for IANAAddress and used in chassisid and ported.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":140,"context_line":"    }),"},{"line_number":141,"context_line":")"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_ab4a6daa","line":142,"updated":"2017-01-04 19:37:19.000000000","message":"please, add a PORT_ID_MAPPING:\n\nPORT_ID_MAPPING \u003d {\n    (\u0027ifAlias\u0027, 1): cc.GreedyString(\"utf8\"),\n    ...,\n    (\u0027IANA_address\u0027, 4): IANAAddress,\n    ...\n}","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":140,"context_line":"    }),"},{"line_number":141,"context_line":")"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_25ae4898","line":142,"in_reply_to":"ba5201f7_ab4a6daa","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_ab450db4","line":145,"range":{"start_line":145,"start_character":3,"end_line":145,"end_character":24},"updated":"2017-01-04 19:37:19.000000000","message":"ditto w/r Enum","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_6594d042","line":145,"range":{"start_line":145,"start_character":3,"end_line":145,"end_character":24},"in_reply_to":"ba5201f7_ab450db4","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_2a2d6546","line":146,"range":{"start_line":146,"start_character":5,"end_line":146,"end_character":9},"updated":"2017-01-04 19:37:19.000000000","message":"ditto w/ \u0027value\u0027","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":143,"context_line":"# Port ID value is based on the subtype"},{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_e58e002d","line":146,"range":{"start_line":146,"start_character":5,"end_line":146,"end_character":9},"in_reply_to":"ba5201f7_2a2d6546","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":150,"context_line":"        4: cc.Struct("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_8a2ad12a","line":147,"range":{"start_line":147,"start_character":7,"end_line":147,"end_character":52},"updated":"2017-01-04 19:37:19.000000000","message":"ditto w/ embedding","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":144,"context_line":"PortId \u003d cc.Struct("},{"line_number":145,"context_line":"    \u0027subtype\u0027 / cc.Byte,"},{"line_number":146,"context_line":"    \u0027port\u0027 / cc.Switch(c.this.subtype, {"},{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":150,"context_line":"        4: cc.Struct("}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_25856806","line":147,"range":{"start_line":147,"start_character":7,"end_line":147,"end_character":52},"in_reply_to":"ba5201f7_8a2ad12a","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":150,"context_line":"        4: cc.Struct("},{"line_number":151,"context_line":"            \u0027family\u0027 / cc.Enum(cc.Int8ub, **mapping_for_enum("},{"line_number":152,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING)),"},{"line_number":153,"context_line":"            \u0027id\u0027 / cc.Switch(c.this.family, mapping_for_switch("},{"line_number":154,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING))"},{"line_number":155,"context_line":"        ),"},{"line_number":156,"context_line":"        5: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifName"},{"line_number":157,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":158,"context_line":"    }),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_4bd2e101","line":155,"range":{"start_line":150,"start_character":1,"end_line":155,"end_character":10},"updated":"2017-01-04 19:37:19.000000000","message":"please, use an embedded IANAAddress struct here","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        1: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifAlias"},{"line_number":148,"context_line":"        2: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # entPhysicalAlias"},{"line_number":149,"context_line":"        3: cc.Struct(\u0027id\u0027 / MACAddress),"},{"line_number":150,"context_line":"        4: cc.Struct("},{"line_number":151,"context_line":"            \u0027family\u0027 / cc.Enum(cc.Int8ub, **mapping_for_enum("},{"line_number":152,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING)),"},{"line_number":153,"context_line":"            \u0027id\u0027 / cc.Switch(c.this.family, mapping_for_switch("},{"line_number":154,"context_line":"                IANA_ADDRESS_FAMILY_ID_MAPPING))"},{"line_number":155,"context_line":"        ),"},{"line_number":156,"context_line":"        5: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\")),  # ifName"},{"line_number":157,"context_line":"        7: cc.Struct(\u0027id\u0027 / cc.GreedyString(\"utf8\"))   # local string"},{"line_number":158,"context_line":"    }),"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_457eec19","line":155,"range":{"start_line":150,"start_character":1,"end_line":155,"end_character":10},"in_reply_to":"ba5201f7_4bd2e101","updated":"2017-01-05 14:11:40.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"d7d57e80030e42a1ae3cf561565c1c4a4aa5956d","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    }),"},{"line_number":159,"context_line":")"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"PortDesc \u003d cc.Struct(\u0027desc\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"SysName \u003d cc.Struct(\u0027name\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"SysDesc \u003d cc.Struct(\u0027desc\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"MgmtAddress \u003d cc.Struct("},{"line_number":168,"context_line":"    \u0027len\u0027 / cc.Int8ub,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_2eb4cbcf","line":165,"range":{"start_line":161,"start_character":0,"end_line":165,"end_character":53},"updated":"2017-01-04 19:37:19.000000000","message":"please, create a TLV (super) struct\u0026mapping w/ these:\n\nTLV_MAPPING \u003d {\n    (LLDP_TLV_CHASSIS_ID_NM, LLDP_TLV_CHASSIS_ID): ChassisID,\n    ...\n    (ORG_SPECIFIC_ID, ORG_SPECIFIC_NM): OrgSpecific\n}\n\nTLV \u003d cc.Struct(\n    \u0027type\u0027 / cc.Enum(cc.Int16ub, **mapping_from_enum(TLV_MAPPING)),\n    \u0027length\u0027 / cc.Rebuild(cc.Int16ub, c.len_(c.this.value)),\n    \u0027value\u0027 / cc.Embedded(cc.Switch(c.this.type, mapping_for_switch(TLV_MAPPING)))\n)","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"95cce37c2e231b652aaaf7ecdfd6cfb8fd521661","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    }),"},{"line_number":159,"context_line":")"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"PortDesc \u003d cc.Struct(\u0027desc\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"SysName \u003d cc.Struct(\u0027name\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"SysDesc \u003d cc.Struct(\u0027desc\u0027 / cc.GreedyString(\"utf8\"))"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"MgmtAddress \u003d cc.Struct("},{"line_number":168,"context_line":"    \u0027len\u0027 / cc.Int8ub,"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_85c29432","line":165,"range":{"start_line":161,"start_character":0,"end_line":165,"end_character":53},"in_reply_to":"ba5201f7_2eb4cbcf","updated":"2017-01-05 14:11:40.000000000","message":"As discussed, TLVs are stored by IPA in format [type, value], so using a TLV struct will not provide any additional value.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":17,"context_line":"import construct as c"},{"line_number":18,"context_line":"from construct import core as cc"},{"line_number":19,"context_line":"import functools"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from ironic_inspector import utils"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_b25c75ee","line":19,"updated":"2017-01-20 15:56:16.000000000","message":"functools is a part of stdlib, so its import should go in a separate block above this one","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":17,"context_line":"import construct as c"},{"line_number":18,"context_line":"from construct import core as cc"},{"line_number":19,"context_line":"import functools"},{"line_number":20,"context_line":"import netaddr"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from ironic_inspector import utils"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_2678432a","line":19,"in_reply_to":"5a3905b3_b25c75ee","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def bytes_to_int(obj):"},{"line_number":86,"context_line":"    return functools.reduce(lambda x, y: x \u003c\u003c 8 | y, obj[0:])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"def mapping_for_enum(mapping):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_d273c17e","line":86,"updated":"2017-01-20 15:56:16.000000000","message":"why do you need obj[0:]? it\u0027s equivalent to just obj.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def bytes_to_int(obj):"},{"line_number":86,"context_line":"    return functools.reduce(lambda x, y: x \u003c\u003c 8 | y, obj[0:])"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"def mapping_for_enum(mapping):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_46738f4d","line":86,"in_reply_to":"5a3905b3_d273c17e","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        if bit:"},{"line_number":199,"context_line":"            caps_list.append(cap)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    return caps_list"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Capabilities \u003d cc.BitStruct("},{"line_number":204,"context_line":"    cc.Padding(5),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_f26efd94","line":201,"updated":"2017-01-20 15:56:16.000000000","message":"a bit shorter:\n\n return [cap for (bit, cap) in cap_map if bit]","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        if bit:"},{"line_number":199,"context_line":"            caps_list.append(cap)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    return caps_list"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"Capabilities \u003d cc.BitStruct("},{"line_number":204,"context_line":"    cc.Padding(5),"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_8693b74e","line":201,"in_reply_to":"5a3905b3_f26efd94","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        self.iface \u003d iface"},{"line_number":397,"context_line":"        self.nv_dict \u003d {}"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def add_name_value(self, name, value):"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":402,"context_line":"        if name not in self.nv_dict:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_126e2995","line":399,"updated":"2017-01-20 15:56:16.000000000","message":"nit: I\u0027d call these 2 methods \"add_value\" and \"append_value\"","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        self.iface \u003d iface"},{"line_number":397,"context_line":"        self.nv_dict \u003d {}"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def add_name_value(self, name, value):"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":402,"context_line":"        if name not in self.nv_dict:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_26dda30e","line":399,"in_reply_to":"5a3905b3_126e2995","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":402,"context_line":"        if name not in self.nv_dict:"},{"line_number":403,"context_line":"            self.nv_dict[name] \u003d value"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def add_value_to_list(self, name, value):"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3269658c","line":403,"updated":"2017-01-20 15:56:16.000000000","message":"nit:\n\n self.nv_dict.setdefault(name, value)","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":402,"context_line":"        if name not in self.nv_dict:"},{"line_number":403,"context_line":"            self.nv_dict[name] \u003d value"},{"line_number":404,"context_line":""},{"line_number":405,"context_line":"    def add_value_to_list(self, name, value):"},{"line_number":406,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_6605eb78","line":403,"in_reply_to":"5a3905b3_3269658c","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        else:"},{"line_number":412,"context_line":"            curr_list \u003d self.nv_dict[name]"},{"line_number":413,"context_line":"            curr_list.append(value)"},{"line_number":414,"context_line":"            self.nv_dict[name] \u003d curr_list"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def get_name_values(self):"},{"line_number":417,"context_line":"        return self.nv_dict"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_5206f1ce","line":414,"updated":"2017-01-20 15:56:16.000000000","message":"similar to above:\n\n self.nv_dict.setdefault(name, []).append(value)","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        else:"},{"line_number":412,"context_line":"            curr_list \u003d self.nv_dict[name]"},{"line_number":413,"context_line":"            curr_list.append(value)"},{"line_number":414,"context_line":"            self.nv_dict[name] \u003d curr_list"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def get_name_values(self):"},{"line_number":417,"context_line":"        return self.nv_dict"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_a16fbdc3","line":414,"in_reply_to":"5a3905b3_5206f1ce","updated":"2017-01-20 20:23:45.000000000","message":"Done. Thanks, I like this syntax.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            curr_list.append(value)"},{"line_number":414,"context_line":"            self.nv_dict[name] \u003d curr_list"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def get_name_values(self):"},{"line_number":417,"context_line":"        return self.nv_dict"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_72092ddd","line":416,"updated":"2017-01-20 15:56:16.000000000","message":"this method does not seem very useful, provided that nv_dict is a public attribute..","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            curr_list.append(value)"},{"line_number":414,"context_line":"            self.nv_dict[name] \u003d curr_list"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    def get_name_values(self):"},{"line_number":417,"context_line":"        return self.nv_dict"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_e1c5458e","line":416,"in_reply_to":"5a3905b3_72092ddd","updated":"2017-01-20 20:23:45.000000000","message":"Removed","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"af8697c1fd0ba834ae5865b23b8e7a7f5112aebb","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import functools"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":19,"context_line":"import construct as c"},{"line_number":20,"context_line":"from construct import core as cc"},{"line_number":21,"context_line":"import netaddr"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_7e22f902","line":19,"updated":"2017-01-26 17:28:03.000000000","message":"I think this is a bad idea. Seems like typing \u0027construct\u0027 is not that difficult.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import functools"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":19,"context_line":"import construct as c"},{"line_number":20,"context_line":"from construct import core as cc"},{"line_number":21,"context_line":"import netaddr"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_bde8bde3","line":19,"in_reply_to":"3a461143_7e22f902","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"af8697c1fd0ba834ae5865b23b8e7a7f5112aebb","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":19,"context_line":"import construct as c"},{"line_number":20,"context_line":"from construct import core as cc"},{"line_number":21,"context_line":"import netaddr"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from ironic_inspector import utils"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_be1c61c2","line":20,"updated":"2017-01-26 17:28:03.000000000","message":"Ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"# See http://construct.readthedocs.io/en/latest/index.html"},{"line_number":19,"context_line":"import construct as c"},{"line_number":20,"context_line":"from construct import core as cc"},{"line_number":21,"context_line":"import netaddr"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from ironic_inspector import utils"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_7de815b5","line":20,"in_reply_to":"3a461143_be1c61c2","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":228,"context_line":"#"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_a91ab67a","line":231,"updated":"2017-01-24 16:17:39.000000000","message":"a human-readable docstring/comment would not hurt here..","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":228,"context_line":"#"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_3dbdad68","line":231,"in_reply_to":"5a3905b3_757b41be","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":228,"context_line":"#"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_757b41be","line":231,"in_reply_to":"5a3905b3_a91ab67a","updated":"2017-01-24 17:25:12.000000000","message":"Will fix.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["},{"line_number":235,"context_line":"        (pmd._10base_t_hdx, \u002710BASE-T hdx\u0027),"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_c91d4274","line":232,"updated":"2017-01-24 16:17:39.000000000","message":"I wonder if a set is more suitable for capabilities...","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["},{"line_number":235,"context_line":"        (pmd._10base_t_hdx, \u002710BASE-T hdx\u0027),"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_5dc0b9e0","line":232,"in_reply_to":"5a3905b3_55572525","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":229,"context_line":""},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"def get_autoneg_cap(pmd):"},{"line_number":232,"context_line":"    caps_list \u003d []"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    pmd_map \u003d ["},{"line_number":235,"context_line":"        (pmd._10base_t_hdx, \u002710BASE-T hdx\u0027),"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_55572525","line":232,"in_reply_to":"5a3905b3_c91d4274","updated":"2017-01-24 17:25:12.000000000","message":"Will change to set.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":58,"context_line":"dot3_MTU \u003d 4"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def bytes_to_int(obj):"},{"line_number":62,"context_line":"    return functools.reduce(lambda x, y: x \u003c\u003c 8 | y, obj)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_3449edd0","line":61,"range":{"start_line":61,"start_character":4,"end_line":61,"end_character":22},"updated":"2017-01-31 10:56:42.000000000","message":"nit: doc string with obj type?","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":58,"context_line":"dot3_MTU \u003d 4"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"def bytes_to_int(obj):"},{"line_number":62,"context_line":"    return functools.reduce(lambda x, y: x \u003c\u003c 8 | y, obj)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_c97b92bc","line":61,"range":{"start_line":61,"start_character":4,"end_line":61,"end_character":22},"in_reply_to":"3a461143_3449edd0","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"IPv4Address \u003d core.ExprAdapter("},{"line_number":74,"context_line":"    core.Byte[4],"},{"line_number":75,"context_line":"    encoder\u003dlambda obj, ctx: netaddr.IPAddress(obj).words,"},{"line_number":76,"context_line":"    decoder\u003dlambda obj, ctx: str(netaddr.IPAddress(bytes_to_int(obj)))"},{"line_number":77,"context_line":")"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_5472f911","line":75,"range":{"start_line":75,"start_character":29,"end_line":75,"end_character":46},"updated":"2017-01-31 10:56:42.000000000","message":"IPAddress could raise exception","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"IPv4Address \u003d core.ExprAdapter("},{"line_number":74,"context_line":"    core.Byte[4],"},{"line_number":75,"context_line":"    encoder\u003dlambda obj, ctx: netaddr.IPAddress(obj).words,"},{"line_number":76,"context_line":"    decoder\u003dlambda obj, ctx: str(netaddr.IPAddress(bytes_to_int(obj)))"},{"line_number":77,"context_line":")"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_09503a31","line":75,"range":{"start_line":75,"start_character":29,"end_line":75,"end_character":46},"in_reply_to":"3a461143_5472f911","updated":"2017-02-01 00:54:34.000000000","message":"Added exception handler.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"}],"ironic_inspector/plugins/lldp_basic.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":53,"context_line":"# subtypes"},{"line_number":54,"context_line":"dot3_MACPHY_CONFIG_STATUS \u003d 1"},{"line_number":55,"context_line":"dot3_LINK_AGGREGATION \u003d 3  # Deprecated, but still in use"},{"line_number":56,"context_line":"dot3_MTU \u003d 4"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class LLDPBasicProcessingHook(base.ProcessingHook):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_30976ded","line":56,"updated":"2016-12-05 10:12:22.000000000","message":"should we maybe move these constants to lldp_name_value.py (maybe we shouldn\u0027t, just asking)?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":53,"context_line":"# subtypes"},{"line_number":54,"context_line":"dot3_MACPHY_CONFIG_STATUS \u003d 1"},{"line_number":55,"context_line":"dot3_LINK_AGGREGATION \u003d 3  # Deprecated, but still in use"},{"line_number":56,"context_line":"dot3_MTU \u003d 4"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class LLDPBasicProcessingHook(base.ProcessingHook):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_722ab191","line":56,"in_reply_to":"3a71b18c_30976ded","updated":"2016-12-06 01:15:43.000000000","message":"Yes, moved.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        \"\"\"Create an object with value set to a list"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        :param nv_list: list object type"},{"line_number":71,"context_line":"        :param obj_set: set of name/value objects"},{"line_number":72,"context_line":"        :return: obj"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_509ce90e","line":71,"updated":"2016-12-05 10:12:22.000000000","message":"please mention that it is modified in the method","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        \"\"\"Create an object with value set to a list"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        :param nv_list: list object type"},{"line_number":71,"context_line":"        :param obj_set: set of name/value objects"},{"line_number":72,"context_line":"        :return: obj"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_7201d105","line":71,"in_reply_to":"3a71b18c_509ce90e","updated":"2016-12-06 01:15:43.000000000","message":"Done","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        :param nv_list: list object type"},{"line_number":71,"context_line":"        :param obj_set: set of name/value objects"},{"line_number":72,"context_line":"        :return: obj"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # A list object stores multiple name/value pairs for"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_709d6509","line":72,"updated":"2016-12-05 10:12:22.000000000","message":"s/obj/resulting object/","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        :param nv_list: list object type"},{"line_number":71,"context_line":"        :param obj_set: set of name/value objects"},{"line_number":72,"context_line":"        :return: obj"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        # A list object stores multiple name/value pairs for"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_c506611b","line":72,"in_reply_to":"3a71b18c_709d6509","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # A list object stores multiple name/value pairs for"},{"line_number":76,"context_line":"        # TLVs that can be in the raw LLDP data more than once."},{"line_number":77,"context_line":"        # If this list object doesn\u0027t exist in set, add it."},{"line_number":78,"context_line":"        if nv_list not in obj_set:"},{"line_number":79,"context_line":"            obj_set.add(nv_list())"},{"line_number":80,"context_line":"        for obj in obj_set:"},{"line_number":81,"context_line":"            if isinstance(obj, nv_list):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_90a2014a","line":78,"updated":"2016-12-05 10:12:22.000000000","message":"I don\u0027t understand this code... It looks like you\u0027re doing something like\n\n if list in obj_set:\n   obj_set.add([])\n\nwhich is not something I\u0027d expect to work. I realize there might be some magic going on enabling it, but could you make this bit somewhat clearer?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        # A list object stores multiple name/value pairs for"},{"line_number":76,"context_line":"        # TLVs that can be in the raw LLDP data more than once."},{"line_number":77,"context_line":"        # If this list object doesn\u0027t exist in set, add it."},{"line_number":78,"context_line":"        if nv_list not in obj_set:"},{"line_number":79,"context_line":"            obj_set.add(nv_list())"},{"line_number":80,"context_line":"        for obj in obj_set:"},{"line_number":81,"context_line":"            if isinstance(obj, nv_list):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_456091cf","line":78,"in_reply_to":"3a71b18c_90a2014a","updated":"2016-12-06 01:15:43.000000000","message":"This can be clearer.  Each name value pair can be in the set once, per the ironic-inspector spec.  For VLANs, mgmt address, and protocol id, the \u0027value\u0027 is a list that comes from separate, multiple TLVs. So the instance gets created first and the vlans etc. in the TLVs are added to the list. This create the instance and adds it to the set.\n\nI\u0027ve updated the text to hopefully make it clearer.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        elif type \u003d\u003d LLDP_TLV_PORT_ID:"},{"line_number":96,"context_line":"            obj_set.add(nv.PortID(data))"},{"line_number":97,"context_line":"        elif type \u003d\u003d LLDP_TLV_TTL:"},{"line_number":98,"context_line":"            # No need to store this since TTL not relevant here"},{"line_number":99,"context_line":"            pass"},{"line_number":100,"context_line":"        elif type \u003d\u003d LLDP_TLV_END_LLDPPDU:"},{"line_number":101,"context_line":"            # Ignore"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b08b7dc2","line":98,"updated":"2016-12-05 10:12:22.000000000","message":"\"here\" - where? :) why not return False? should we log such situations?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        elif type \u003d\u003d LLDP_TLV_PORT_ID:"},{"line_number":96,"context_line":"            obj_set.add(nv.PortID(data))"},{"line_number":97,"context_line":"        elif type \u003d\u003d LLDP_TLV_TTL:"},{"line_number":98,"context_line":"            # No need to store this since TTL not relevant here"},{"line_number":99,"context_line":"            pass"},{"line_number":100,"context_line":"        elif type \u003d\u003d LLDP_TLV_END_LLDPPDU:"},{"line_number":101,"context_line":"            # Ignore"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_2571d576","line":98,"in_reply_to":"3a71b18c_b08b7dc2","updated":"2016-12-06 01:15:43.000000000","message":"Its normal that a TTL TLV will be in the LLDPPU set of TLVs but is irrelevant since we\u0027re not tracking when the packet was received.  It can just be dropped. Changed to return True, since the TLV was handled, just not used.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            # No need to store this since TTL not relevant here"},{"line_number":99,"context_line":"            pass"},{"line_number":100,"context_line":"        elif type \u003d\u003d LLDP_TLV_END_LLDPPDU:"},{"line_number":101,"context_line":"            # Ignore"},{"line_number":102,"context_line":"            pass"},{"line_number":103,"context_line":"        elif type \u003d\u003d LLDP_TLV_PORT_DESCRIPTION:"},{"line_number":104,"context_line":"            obj_set.add(nv.PortDesc(data))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d088f9c7","line":101,"updated":"2016-12-05 10:12:22.000000000","message":"why? and why not return False here? I guess it could use a comment","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            # No need to store this since TTL not relevant here"},{"line_number":99,"context_line":"            pass"},{"line_number":100,"context_line":"        elif type \u003d\u003d LLDP_TLV_END_LLDPPDU:"},{"line_number":101,"context_line":"            # Ignore"},{"line_number":102,"context_line":"            pass"},{"line_number":103,"context_line":"        elif type \u003d\u003d LLDP_TLV_PORT_DESCRIPTION:"},{"line_number":104,"context_line":"            obj_set.add(nv.PortDesc(data))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_a5d96559","line":101,"in_reply_to":"3a71b18c_d088f9c7","updated":"2016-12-06 01:15:43.000000000","message":"This TLV indicates the end of TLVs in the LLDPPDU packet.  Its useful when receiving LLDP TLVs but is not processed.\n\nAdded a comment and return True.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            obj_set.add(nv.Dot1_LinkAggrPortId("},{"line_number":168,"context_line":"                data[5:]))"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            LOG.info(_LI(\"802.1 subtype %d not handled\"), subtype)"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f09175f2","line":170,"updated":"2016-12-05 10:12:22.000000000","message":"info -\u003e warning? or if it\u0027s a normal situation then info -\u003e debug","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            obj_set.add(nv.Dot1_LinkAggrPortId("},{"line_number":168,"context_line":"                data[5:]))"},{"line_number":169,"context_line":"        else:"},{"line_number":170,"context_line":"            LOG.info(_LI(\"802.1 subtype %d not handled\"), subtype)"},{"line_number":171,"context_line":"            return False"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_a5c08551","line":170,"in_reply_to":"3a71b18c_f09175f2","updated":"2016-12-06 01:15:43.000000000","message":"Changed to debug.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            obj_set.add(nv.Dot1_LinkAggrPortId("},{"line_number":200,"context_line":"                data[5:]))"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            LOG.info(_LI(\"802.1 subtype %d not handled\"),"},{"line_number":203,"context_line":"                     subtype)"},{"line_number":204,"context_line":"            return False"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_108fd1cc","line":202,"updated":"2016-12-05 10:12:22.000000000","message":"802.3 and ditto about info -\u003e warning or debug","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":199,"context_line":"            obj_set.add(nv.Dot1_LinkAggrPortId("},{"line_number":200,"context_line":"                data[5:]))"},{"line_number":201,"context_line":"        else:"},{"line_number":202,"context_line":"            LOG.info(_LI(\"802.1 subtype %d not handled\"),"},{"line_number":203,"context_line":"                     subtype)"},{"line_number":204,"context_line":"            return False"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_c5ad8185","line":202,"in_reply_to":"3a71b18c_108fd1cc","updated":"2016-12-06 01:15:43.000000000","message":"Fixed 802.3 and changed to debug.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                data \u003d bytearray(binascii.a2b_hex(tlv_value))"},{"line_number":225,"context_line":"            except TypeError:"},{"line_number":226,"context_line":"                LOG.warning(_LW(\"TLV value for TLV type %d not in correct\""},{"line_number":227,"context_line":"                                \"format, TLV value must be in hexidecimal\"),"},{"line_number":228,"context_line":"                            tlv_type)"},{"line_number":229,"context_line":"                continue"},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_30be8d65","line":227,"updated":"2016-12-05 10:12:22.000000000","message":"let\u0027s log the actual error message too","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                data \u003d bytearray(binascii.a2b_hex(tlv_value))"},{"line_number":225,"context_line":"            except TypeError:"},{"line_number":226,"context_line":"                LOG.warning(_LW(\"TLV value for TLV type %d not in correct\""},{"line_number":227,"context_line":"                                \"format, TLV value must be in hexidecimal\"),"},{"line_number":228,"context_line":"                            tlv_type)"},{"line_number":229,"context_line":"                continue"},{"line_number":230,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e55c3d7f","line":227,"in_reply_to":"3a71b18c_30be8d65","updated":"2016-12-06 01:15:43.000000000","message":"Done","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                    LOG.info(_LI(\"LLDP TLV type %d not handled\"), tlv_type)"},{"line_number":252,"context_line":"            except ValueError as e:"},{"line_number":253,"context_line":"                msg \u003d str(e)"},{"line_number":254,"context_line":"                LOG.info(_LI(\"TLV skipped: %s\"), msg)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        return obj_set"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_50c309ed","line":254,"updated":"2016-12-05 10:12:22.000000000","message":"just like above, it should be either warning, if it\u0027s a dangerous situation, or debug if it\u0027s not","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                    LOG.info(_LI(\"LLDP TLV type %d not handled\"), tlv_type)"},{"line_number":252,"context_line":"            except ValueError as e:"},{"line_number":253,"context_line":"                msg \u003d str(e)"},{"line_number":254,"context_line":"                LOG.info(_LI(\"TLV skipped: %s\"), msg)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        return obj_set"},{"line_number":257,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_45e331a4","line":254,"in_reply_to":"3a71b18c_50c309ed","updated":"2016-12-06 01:15:43.000000000","message":"This will occur when data in the packet is invalid.  Will log it as a warning.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":264,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":265,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":266,"context_line":"                LOG.info(_LI(\"Skipping %s not in all_interfaces\"), if_name)"},{"line_number":267,"context_line":"                continue"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_70b48581","line":266,"updated":"2016-12-05 10:12:22.000000000","message":"info -\u003e debug","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":264,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":265,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":266,"context_line":"                LOG.info(_LI(\"Skipping %s not in all_interfaces\"), if_name)"},{"line_number":267,"context_line":"                continue"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_a5c245e7","line":266,"in_reply_to":"3a71b18c_70b48581","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":270,"context_line":"            if tlvs is None:"},{"line_number":271,"context_line":"                LOG.info(_LI(\"No LLDP Data found for interface %s\"), if_name)"},{"line_number":272,"context_line":"                continue"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"            LOG.info(_LI(\"Found LLDP Data for interface %s\"), if_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_90b9217c","line":271,"updated":"2016-12-05 10:12:22.000000000","message":"info -\u003e warning","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":268,"context_line":""},{"line_number":269,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":270,"context_line":"            if tlvs is None:"},{"line_number":271,"context_line":"                LOG.info(_LI(\"No LLDP Data found for interface %s\"), if_name)"},{"line_number":272,"context_line":"                continue"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"            LOG.info(_LI(\"Found LLDP Data for interface %s\"), if_name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_05b21994","line":271,"in_reply_to":"3a71b18c_90b9217c","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                LOG.info(_LI(\"No LLDP Data found for interface %s\"), if_name)"},{"line_number":272,"context_line":"                continue"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"            LOG.info(_LI(\"Found LLDP Data for interface %s\"), if_name)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"            lldp_objs \u003d self._get_parsed_lldp_objs(tlvs)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b0b29d92","line":274,"updated":"2016-12-05 10:12:22.000000000","message":"info -\u003e debug","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                LOG.info(_LI(\"No LLDP Data found for interface %s\"), if_name)"},{"line_number":272,"context_line":"                continue"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"            LOG.info(_LI(\"Found LLDP Data for interface %s\"), if_name)"},{"line_number":275,"context_line":""},{"line_number":276,"context_line":"            lldp_objs \u003d self._get_parsed_lldp_objs(tlvs)"},{"line_number":277,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_a56965fb","line":274,"in_reply_to":"3a71b18c_b0b29d92","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":280,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":281,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":282,"context_line":"                if not iface_to_update:"},{"line_number":283,"context_line":"                    LOG.info(_LI(\"No matching entry in all_interfaces for %s\"),"},{"line_number":284,"context_line":"                             if_name)"},{"line_number":285,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d0af1928","line":282,"updated":"2016-12-05 10:12:22.000000000","message":"this seems to be the same check as on line 265","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":280,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":281,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":282,"context_line":"                if not iface_to_update:"},{"line_number":283,"context_line":"                    LOG.info(_LI(\"No matching entry in all_interfaces for %s\"),"},{"line_number":284,"context_line":"                             if_name)"},{"line_number":285,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_c5410165","line":282,"in_reply_to":"3a71b18c_d0af1928","updated":"2016-12-06 01:15:43.000000000","message":"It is different - this checks the interface is in \u0027all_interfaces\u0027 while the previous check was that it was in \u0027\u0027interfaces\u0027 in \u0027inventory\u0027","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"6b4edc3c8abd4ac047b0be6e6cec37edef038855","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":253,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":254,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":255,"context_line":"                if not iface_to_update:"},{"line_number":256,"context_line":"                    LOG.warning(_LW("},{"line_number":257,"context_line":"                        \"No matching entry in all_interfaces for %s\"),"},{"line_number":258,"context_line":"                        if_name)"},{"line_number":259,"context_line":"                    continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"                # Create lldp_processed dict from set"},{"line_number":262,"context_line":"                proc_lldp \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_e406ff1a","line":259,"range":{"start_line":255,"start_character":16,"end_line":259,"end_character":28},"updated":"2016-12-15 17:31:39.000000000","message":"Isn\u0027t this duplicate of 237?","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"29557ccd032f32d358bcbe8bb74e1ea35d4e1f67","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":253,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":254,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":255,"context_line":"                if not iface_to_update:"},{"line_number":256,"context_line":"                    LOG.warning(_LW("},{"line_number":257,"context_line":"                        \"No matching entry in all_interfaces for %s\"),"},{"line_number":258,"context_line":"                        if_name)"},{"line_number":259,"context_line":"                    continue"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"                # Create lldp_processed dict from set"},{"line_number":262,"context_line":"                proc_lldp \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a6eadb0_2bbfd1aa","line":259,"range":{"start_line":255,"start_character":16,"end_line":259,"end_character":28},"in_reply_to":"1a6eadb0_e406ff1a","updated":"2016-12-15 22:08:13.000000000","message":"See comments in patch set 5 :-) It is different - this checks the interface is in \u0027all_interfaces\u0027 while the previous check was that it was in \u0027\u0027interfaces\u0027 in \u0027inventory\u0027","commit_id":"0e315924747b24ea3c252832e96432e7222ea2c2"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"LLDP Processing Hook for standard TLVs\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from construct import core as cc"},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic_inspector.common.i18n import _"},{"line_number":21,"context_line":"from ironic_inspector.common.i18n import _LW"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_9d927256","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":11},"updated":"2016-12-30 13:04:09.000000000","message":"wrong order, see http://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"LLDP Processing Hook for standard TLVs\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from construct import core as cc"},{"line_number":18,"context_line":"import json"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from ironic_inspector.common.i18n import _"},{"line_number":21,"context_line":"from ironic_inspector.common.i18n import _LW"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_dd6da505","line":18,"range":{"start_line":16,"start_character":0,"end_line":18,"end_character":11},"in_reply_to":"ba5201f7_9d927256","updated":"2017-01-03 18:54:55.000000000","message":"I *think* this order is OK, the pep8 tests pass (they failed when in other cases with wrong order) and the the order here binascii/construct/json matches the docs.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Check Basic Management Set"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data) is True):"},{"line_number":233,"context_line":"                    LOG.debug(\"Handled basic mgmt type %d\", tlv_type)"},{"line_number":234,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":235,"context_line":"                    # Organizationally Specific TLVs"},{"line_number":236,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_989360a3","line":233,"range":{"start_line":233,"start_character":45,"end_line":233,"end_character":49},"updated":"2016-12-30 13:04:09.000000000","message":"s/mgmt/management","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            # Check Basic Management Set"},{"line_number":231,"context_line":"            try:"},{"line_number":232,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data) is True):"},{"line_number":233,"context_line":"                    LOG.debug(\"Handled basic mgmt type %d\", tlv_type)"},{"line_number":234,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":235,"context_line":"                    # Organizationally Specific TLVs"},{"line_number":236,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_1d780dc4","line":233,"range":{"start_line":233,"start_character":45,"end_line":233,"end_character":49},"in_reply_to":"ba5201f7_989360a3","updated":"2017-01-03 18:54:55.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                                subtype, data) is True):"},{"line_number":248,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\", subtype)"},{"line_number":249,"context_line":"                    else:"},{"line_number":250,"context_line":"                        LOG.debug(\"OUI %s not handled\", oui)"},{"line_number":251,"context_line":"                else:"},{"line_number":252,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":253,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_5873b8b1","line":250,"range":{"start_line":250,"start_character":35,"end_line":250,"end_character":38},"updated":"2016-12-30 13:04:09.000000000","message":"What does OUI stand for? Please don\u0027t use not common acronyms in logs.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"1bf6d8fb0b8abafa21a731a822dcb3b3130c4ea1","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                                subtype, data) is True):"},{"line_number":248,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\", subtype)"},{"line_number":249,"context_line":"                    else:"},{"line_number":250,"context_line":"                        LOG.debug(\"OUI %s not handled\", oui)"},{"line_number":251,"context_line":"                else:"},{"line_number":252,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":253,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_a7d8ee54","line":250,"range":{"start_line":250,"start_character":35,"end_line":250,"end_character":38},"in_reply_to":"ba5201f7_5873b8b1","updated":"2017-01-02 16:53:50.000000000","message":"This is not a meaningful message by itself, how about \"Ethernet OUI %s is not a recognized LLDP TLV subtype\".","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                                subtype, data) is True):"},{"line_number":248,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\", subtype)"},{"line_number":249,"context_line":"                    else:"},{"line_number":250,"context_line":"                        LOG.debug(\"OUI %s not handled\", oui)"},{"line_number":251,"context_line":"                else:"},{"line_number":252,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":253,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_3d7311e9","line":250,"range":{"start_line":250,"start_character":35,"end_line":250,"end_character":38},"in_reply_to":"ba5201f7_a7d8ee54","updated":"2017-01-03 18:54:55.000000000","message":"Updated message.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":265,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":266,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":267,"context_line":"                LOG.debug(\"Skipping %s not in all_interfaces\", if_name)"},{"line_number":268,"context_line":"                continue"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":271,"context_line":"            if tlvs is None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_9d3c3231","line":268,"range":{"start_line":264,"start_character":0,"end_line":268,"end_character":24},"updated":"2016-12-30 13:04:09.000000000","message":"Why do you need this check?\nAFAIR interfaces is subset of all_interfaces","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":265,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":266,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":267,"context_line":"                LOG.debug(\"Skipping %s not in all_interfaces\", if_name)"},{"line_number":268,"context_line":"                continue"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":271,"context_line":"            if tlvs is None:"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_7d02f90c","line":268,"range":{"start_line":264,"start_character":0,"end_line":268,"end_character":24},"in_reply_to":"ba5201f7_9d3c3231","updated":"2017-01-03 18:54:55.000000000","message":"I think this is necessary to sanity check that the interface name from the list in inventory.interfaces is in all_interfaces.  The raw lldp data is being read from inventory.interfaces and is stored in all_interfaces. The same interface names should be in both places, this test verifies it.  Note that the check at line 307 was redundant to this and has been removed.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":305,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":306,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":307,"context_line":"                if not iface_to_update:"},{"line_number":308,"context_line":"                    LOG.warning(_LW("},{"line_number":309,"context_line":"                        \"No matching entry in all_interfaces for %s\"),"},{"line_number":310,"context_line":"                        if_name)"},{"line_number":311,"context_line":"                    continue"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_fdbb7e73","line":310,"range":{"start_line":307,"start_character":0,"end_line":310,"end_character":32},"updated":"2016-12-30 13:04:09.000000000","message":"once more check?","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":305,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":306,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":307,"context_line":"                if not iface_to_update:"},{"line_number":308,"context_line":"                    LOG.warning(_LW("},{"line_number":309,"context_line":"                        \"No matching entry in all_interfaces for %s\"),"},{"line_number":310,"context_line":"                        if_name)"},{"line_number":311,"context_line":"                    continue"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_c0021c09","line":310,"range":{"start_line":307,"start_character":0,"end_line":310,"end_character":32},"in_reply_to":"ba5201f7_fdbb7e73","updated":"2017-01-03 18:54:55.000000000","message":"Removed this as it was redundant.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                        if_name)"},{"line_number":311,"context_line":"                    continue"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":314,"context_line":"                #  lldp_out \u003d json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":315,"context_line":"                # lldp_out \u003d self.lldp_nv_dict"},{"line_number":316,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d self.lldp_nv_dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_5da48a56","line":315,"range":{"start_line":313,"start_character":0,"end_line":315,"end_character":46},"updated":"2016-12-30 13:04:09.000000000","message":"clean up please","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                        if_name)"},{"line_number":311,"context_line":"                    continue"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":314,"context_line":"                #  lldp_out \u003d json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":315,"context_line":"                # lldp_out \u003d self.lldp_nv_dict"},{"line_number":316,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d self.lldp_nv_dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_000d0437","line":315,"range":{"start_line":313,"start_character":0,"end_line":315,"end_character":46},"in_reply_to":"ba5201f7_5da48a56","updated":"2017-01-03 18:54:55.000000000","message":"Done.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":314,"context_line":"                #  lldp_out \u003d json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":315,"context_line":"                # lldp_out \u003d self.lldp_nv_dict"},{"line_number":316,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d self.lldp_nv_dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_98f600d6","line":316,"range":{"start_line":316,"start_character":16,"end_line":316,"end_character":31},"updated":"2016-12-30 13:04:09.000000000","message":"where do you save parsed data to swift? You don\u0027t adding it to introspection_data.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":314,"context_line":"                #  lldp_out \u003d json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":315,"context_line":"                # lldp_out \u003d self.lldp_nv_dict"},{"line_number":316,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d self.lldp_nv_dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_a074389c","line":316,"range":{"start_line":316,"start_character":16,"end_line":316,"end_character":31},"in_reply_to":"ba5201f7_87d04a55","updated":"2017-01-03 18:54:55.000000000","message":"This write saves the processed lldp data to the introspection data in Swift.  For example, when testing on a baremetal system, after introspection I can run:\n\"openstack baremetal introspection data save \u003cnode uuid\u003e\"\nand see all_interfaces updated:\n\"all_interfaces\": {\"em1\": {\"ip\": \"10.8.xx.xxx\", \"mac\": \"b0:83:fe:xx:xx:xx\", \"lldp_processed\": {\"system_name\": \"sw01-dist-1b-b12\", \"port_description\": \"host02.lab.eng port 1 (Prov/Trunked VLANs)\", \"port_untagged_vlan_id\": 102...\netc.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"1bf6d8fb0b8abafa21a731a822dcb3b3130c4ea1","unresolved":false,"context_lines":[{"line_number":313,"context_line":"                # print json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":314,"context_line":"                #  lldp_out \u003d json.dumps(self.lldp_nv_dict, sort_keys\u003dTrue)"},{"line_number":315,"context_line":"                # lldp_out \u003d self.lldp_nv_dict"},{"line_number":316,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d self.lldp_nv_dict"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba5201f7_87d04a55","line":316,"range":{"start_line":316,"start_character":16,"end_line":316,"end_character":31},"in_reply_to":"ba5201f7_98f600d6","updated":"2017-01-02 16:53:50.000000000","message":"I\u0027m also confused, since this gets set but I don\u0027t ever see it get used.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"a361da70fc506203a93ffcce55e66b8a2b3ce204","unresolved":false,"context_lines":[{"line_number":33,"context_line":"       basic management, 802.1, and 802.3 TLV sets."},{"line_number":34,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    lldp_nv_dict \u003d {}"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # TLVs for these name/values can appear more than once so store in list"},{"line_number":39,"context_line":"    mgmt_addr_list \u003d []"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a3905b3_3040d056","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":21},"updated":"2017-01-19 12:00:01.000000000","message":"according to[1][2][3] a hook object is a \"singleton\"; I\u0027m afraid this dict may therefore accumulate LLDP values of multiple nodes\n\n[1] https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/process.py#L124\n[2] https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/plugins/base.py#L171\n[3] http://docs.openstack.org/developer/stevedore/managers.html#extensionmanager","commit_id":"f047fcb84132883abd85065c4c9be7e608ae863c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"e8b4e814d0076ff1364b3e9b29d2c6a5ea48a26f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"       basic management, 802.1, and 802.3 TLV sets."},{"line_number":34,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":"    lldp_nv_dict \u003d {}"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    # TLVs for these name/values can appear more than once so store in list"},{"line_number":39,"context_line":"    mgmt_addr_list \u003d []"}],"source_content_type":"text/x-python","patch_set":20,"id":"5a3905b3_5179d892","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":21},"in_reply_to":"5a3905b3_3040d056","updated":"2017-01-19 14:16:57.000000000","message":"Yes, good point. I have fixed this by removing class variables.","commit_id":"f047fcb84132883abd85065c4c9be7e608ae863c"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a9a78d2f7c29bb224444a7b6c8a2534d5f6d6f8","unresolved":false,"context_lines":[{"line_number":34,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _add_name_value(self, name, value, nv):"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":40,"context_line":"        if name not in nv:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a3905b3_b74bcc2a","line":37,"range":{"start_line":37,"start_character":7,"end_line":37,"end_character":23},"updated":"2017-01-19 14:47:05.000000000","message":"An alternative would be to introduce an lldp_tlvs:LLDPParser class that would keep the parsing state (dictionaries, etc) for particular node. This would IMO enhance encapsulation and separate the concerns of parsing from the concerns of processing hooks.","commit_id":"1b5f0b323b4490bf30fb3c18f4419aeef4d9a32d"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"83e5313c499041e4b68f4121c4db8be99e8e7967","unresolved":false,"context_lines":[{"line_number":34,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":35,"context_line":"    \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _add_name_value(self, name, value, nv):"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        # Ensure that if name already exists, value won\u0027t change"},{"line_number":40,"context_line":"        if name not in nv:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a3905b3_ce1d1611","line":37,"range":{"start_line":37,"start_character":7,"end_line":37,"end_character":23},"in_reply_to":"5a3905b3_b74bcc2a","updated":"2017-01-19 17:04:00.000000000","message":"Good suggestion. I added this class.","commit_id":"1b5f0b323b4490bf30fb3c18f4419aeef4d9a32d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        # Check len when using BitStruct"},{"line_number":40,"context_line":"        if tlv.Dot1_LinkAggregationId.sizeof() !\u003d len(data):"},{"line_number":41,"context_line":"            raise ValueError(_(\u0027Invalid data dot1_LINK_AGGREGATION\u0027))"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        val \u003d tlv.Dot1_LinkAggregationId.parse(data)"},{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_92105903","line":41,"updated":"2017-01-20 15:56:16.000000000","message":"please provide more details, e.g. \"Invalid data for \u003chuman readable name\u003e, expected record of size %(expected)d, got %(actual)d\"","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        # Check len when using BitStruct"},{"line_number":40,"context_line":"        if tlv.Dot1_LinkAggregationId.sizeof() !\u003d len(data):"},{"line_number":41,"context_line":"            raise ValueError(_(\u0027Invalid data dot1_LINK_AGGREGATION\u0027))"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        val \u003d tlv.Dot1_LinkAggregationId.parse(data)"},{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_5ca280af","line":41,"in_reply_to":"5a3905b3_92105903","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        val \u003d tlv.Dot1_LinkAggregationId.parse(data)"},{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"},{"line_number":45,"context_line":"                          str(val.status.enabled))"},{"line_number":46,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_SUPPORT_NM,"},{"line_number":47,"context_line":"                          str(val.status.supported))"},{"line_number":48,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ID_NM, val.portid)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_b213950c","line":45,"updated":"2017-01-20 15:56:16.000000000","message":"enabled feels like boolean to me, why is it a string?","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        val \u003d tlv.Dot1_LinkAggregationId.parse(data)"},{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"},{"line_number":45,"context_line":"                          str(val.status.enabled))"},{"line_number":46,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_SUPPORT_NM,"},{"line_number":47,"context_line":"                          str(val.status.supported))"},{"line_number":48,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ID_NM, val.portid)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1ccab86d","line":45,"in_reply_to":"5a3905b3_b213950c","updated":"2017-01-20 20:23:45.000000000","message":"Changed to boolean","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"},{"line_number":45,"context_line":"                          str(val.status.enabled))"},{"line_number":46,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_SUPPORT_NM,"},{"line_number":47,"context_line":"                          str(val.status.supported))"},{"line_number":48,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ID_NM, val.portid)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _parse_basic_mgmt(self, type, data, nv):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_d2fae1bc","line":47,"updated":"2017-01-20 15:56:16.000000000","message":"ditto","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ENABLED_NM,"},{"line_number":45,"context_line":"                          str(val.status.enabled))"},{"line_number":46,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_SUPPORT_NM,"},{"line_number":47,"context_line":"                          str(val.status.supported))"},{"line_number":48,"context_line":"        nv.add_name_value(tlv.LLDP_PORT_LINK_AGG_ID_NM, val.portid)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def _parse_basic_mgmt(self, type, data, nv):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3cc5b45a","line":47,"in_reply_to":"5a3905b3_d2fae1bc","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        :param type: TLV type"},{"line_number":54,"context_line":"        :param data: TLV value"},{"line_number":55,"context_line":"        :return: True if TLV is handled, False if not handled"},{"line_number":56,"context_line":"        :raises: ValueError"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if type \u003d\u003d tlv.LLDP_TLV_CHASSIS_ID:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_f2f51dcb","line":56,"updated":"2017-01-20 15:56:16.000000000","message":"can the parsing library also raise something?","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        :param type: TLV type"},{"line_number":54,"context_line":"        :param data: TLV value"},{"line_number":55,"context_line":"        :return: True if TLV is handled, False if not handled"},{"line_number":56,"context_line":"        :raises: ValueError"},{"line_number":57,"context_line":"        \"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        if type \u003d\u003d tlv.LLDP_TLV_CHASSIS_ID:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_dca4b0a7","line":56,"in_reply_to":"5a3905b3_f2f51dcb","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        elif type \u003d\u003d tlv.LLDP_TLV_SYS_CAPABILITIES:"},{"line_number":83,"context_line":"            # Check len when using BitStruct"},{"line_number":84,"context_line":"            if tlv.SysCapabilities.sizeof() !\u003d len(data):"},{"line_number":85,"context_line":"                raise ValueError(_(\u0027Invalid data LLDP_TLV_SYS_CAPABILITIES\u0027))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            val \u003d tlv.SysCapabilities.parse(data)"},{"line_number":88,"context_line":"            nv.add_name_value(tlv.LLDP_CAP_SUPPORT_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_120549bb","line":85,"updated":"2017-01-20 15:56:16.000000000","message":"ditto about error reporting","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        elif type \u003d\u003d tlv.LLDP_TLV_SYS_CAPABILITIES:"},{"line_number":83,"context_line":"            # Check len when using BitStruct"},{"line_number":84,"context_line":"            if tlv.SysCapabilities.sizeof() !\u003d len(data):"},{"line_number":85,"context_line":"                raise ValueError(_(\u0027Invalid data LLDP_TLV_SYS_CAPABILITIES\u0027))"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            val \u003d tlv.SysCapabilities.parse(data)"},{"line_number":88,"context_line":"            nv.add_name_value(tlv.LLDP_CAP_SUPPORT_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_9c45c871","line":85,"in_reply_to":"5a3905b3_120549bb","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PORT_PROTOCOL_VLANID:"},{"line_number":114,"context_line":"            # Check len when using BitStruct"},{"line_number":115,"context_line":"            if tlv.Dot1_PortProtocolVlan.sizeof() !\u003d len(data):"},{"line_number":116,"context_line":"                raise ValueError(_(\u0027dot1_PORT_PROTOCOL_VLANID\u0027))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            val \u003d tlv.Dot1_PortProtocolVlan.parse(data)"},{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_320085aa","line":116,"updated":"2017-01-20 15:56:16.000000000","message":"ditto about error handling","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PORT_PROTOCOL_VLANID:"},{"line_number":114,"context_line":"            # Check len when using BitStruct"},{"line_number":115,"context_line":"            if tlv.Dot1_PortProtocolVlan.sizeof() !\u003d len(data):"},{"line_number":116,"context_line":"                raise ValueError(_(\u0027dot1_PORT_PROTOCOL_VLANID\u0027))"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            val \u003d tlv.Dot1_PortProtocolVlan.parse(data)"},{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_fc5a4c4f","line":116,"in_reply_to":"5a3905b3_320085aa","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            val \u003d tlv.Dot1_PortProtocolVlan.parse(data)"},{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"},{"line_number":120,"context_line":"                              str(val.flags.enabled))"},{"line_number":121,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_SUPPORT_NM,"},{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_522d1145","line":120,"updated":"2017-01-20 15:56:16.000000000","message":"ditto about apparently boolean value","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            val \u003d tlv.Dot1_PortProtocolVlan.parse(data)"},{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"},{"line_number":120,"context_line":"                              str(val.flags.enabled))"},{"line_number":121,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_SUPPORT_NM,"},{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1c5ab84f","line":120,"in_reply_to":"5a3905b3_522d1145","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"},{"line_number":120,"context_line":"                              str(val.flags.enabled))"},{"line_number":121,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_SUPPORT_NM,"},{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":124,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_PROT_VLANIDS_NM,"},{"line_number":125,"context_line":"                                 str(val.vlanid))"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_72304d9f","line":122,"updated":"2017-01-20 15:56:16.000000000","message":"ditto","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_ENABLED_NM,"},{"line_number":120,"context_line":"                              str(val.flags.enabled))"},{"line_number":121,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_PROT_VLAN_SUPPORT_NM,"},{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":124,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_PROT_VLANIDS_NM,"},{"line_number":125,"context_line":"                                 str(val.vlanid))"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3c55b41c","line":122,"in_reply_to":"5a3905b3_72304d9f","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":124,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_PROT_VLANIDS_NM,"},{"line_number":125,"context_line":"                                 str(val.vlanid))"},{"line_number":126,"context_line":"        elif subtype \u003d\u003d tlv.dot1_VLAN_NAME:"},{"line_number":127,"context_line":"            # There can be multiple vlan TLVs, add entry with id/vlan to list"},{"line_number":128,"context_line":"            vlan_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_92277963","line":125,"updated":"2017-01-20 15:56:16.000000000","message":"previously on line 48 you left it as int, and I think it\u0027s correct","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                              str(val.flags.supported))"},{"line_number":123,"context_line":"            # There can be multiple port/protocol vlans TLVs, store in list"},{"line_number":124,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_PROT_VLANIDS_NM,"},{"line_number":125,"context_line":"                                 str(val.vlanid))"},{"line_number":126,"context_line":"        elif subtype \u003d\u003d tlv.dot1_VLAN_NAME:"},{"line_number":127,"context_line":"            # There can be multiple vlan TLVs, add entry with id/vlan to list"},{"line_number":128,"context_line":"            vlan_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_17f9b24d","line":125,"in_reply_to":"5a3905b3_92277963","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            vlan_dict[\u0027name\u0027] \u003d val.vlan_name"},{"line_number":132,"context_line":"            vlan_dict[\u0027id\u0027] \u003d val.vlanid"},{"line_number":133,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_VLANS_NM,"},{"line_number":134,"context_line":"                                 json.dumps(vlan_dict, sort_keys\u003dTrue))"},{"line_number":135,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PROTOCOL_IDENTITY:"},{"line_number":136,"context_line":"            # There can have multiple protocol ids TLVs, store in list"},{"line_number":137,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_b22ab52a","line":134,"updated":"2017-01-20 15:56:16.000000000","message":"why use json here? seems like it\u0027s going to be extremely inconvenient to use it from a program","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            vlan_dict[\u0027name\u0027] \u003d val.vlan_name"},{"line_number":132,"context_line":"            vlan_dict[\u0027id\u0027] \u003d val.vlanid"},{"line_number":133,"context_line":"            nv.add_value_to_list(tlv.LLDP_PORT_VLANS_NM,"},{"line_number":134,"context_line":"                                 json.dumps(vlan_dict, sort_keys\u003dTrue))"},{"line_number":135,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PROTOCOL_IDENTITY:"},{"line_number":136,"context_line":"            # There can have multiple protocol ids TLVs, store in list"},{"line_number":137,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_37bdce68","line":134,"in_reply_to":"5a3905b3_b22ab52a","updated":"2017-01-20 20:23:45.000000000","message":"This was done to ensure the ordering of keys is consistent via sort_keys\u003dTrue. I will add a comment.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"},{"line_number":138,"context_line":"            nv.add_value_to_list("},{"line_number":139,"context_line":"                tlv.LLDP_PROTOCOL_IDENTITIES_NM,"},{"line_number":140,"context_line":"                str(binascii.b2a_hex(val.protocol).decode()))"},{"line_number":141,"context_line":"        elif subtype \u003d\u003d tlv.dot1_MANAGEMENT_VID:"},{"line_number":142,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_MGMT_VLANID_NM,"},{"line_number":143,"context_line":"                              tlv.Dot1_MgmtVlanId.parse(data).vlanid)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_d221014f","line":140,"updated":"2017-01-20 15:56:16.000000000","message":"decode already returns a string","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":137,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"},{"line_number":138,"context_line":"            nv.add_value_to_list("},{"line_number":139,"context_line":"                tlv.LLDP_PROTOCOL_IDENTITIES_NM,"},{"line_number":140,"context_line":"                str(binascii.b2a_hex(val.protocol).decode()))"},{"line_number":141,"context_line":"        elif subtype \u003d\u003d tlv.dot1_MANAGEMENT_VID:"},{"line_number":142,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_MGMT_VLANID_NM,"},{"line_number":143,"context_line":"                              tlv.Dot1_MgmtVlanId.parse(data).vlanid)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_f7826693","line":140,"in_reply_to":"5a3905b3_d221014f","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if subtype \u003d\u003d tlv.dot3_MACPHY_CONFIG_STATUS:"},{"line_number":162,"context_line":"            # Check len when using BitStruct"},{"line_number":163,"context_line":"            if tlv.Dot3_MACPhy_Config_Status.sizeof() !\u003d len(data):"},{"line_number":164,"context_line":"                raise ValueError(_(\u0027Invalid data dot3_MACPHY_CONFIG_STATUS\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"            val \u003d tlv.Dot3_MACPhy_Config_Status.parse(data)"},{"line_number":167,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_f21c3d15","line":164,"updated":"2017-01-20 15:56:16.000000000","message":"ditto about error handling","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if subtype \u003d\u003d tlv.dot3_MACPHY_CONFIG_STATUS:"},{"line_number":162,"context_line":"            # Check len when using BitStruct"},{"line_number":163,"context_line":"            if tlv.Dot3_MACPhy_Config_Status.sizeof() !\u003d len(data):"},{"line_number":164,"context_line":"                raise ValueError(_(\u0027Invalid data dot3_MACPHY_CONFIG_STATUS\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"            val \u003d tlv.Dot3_MACPhy_Config_Status.parse(data)"},{"line_number":167,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_ENABLED_NM,"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_374b0e89","line":164,"in_reply_to":"5a3905b3_f21c3d15","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_ENABLED_NM,"},{"line_number":168,"context_line":"                              str(val.autoneg.enabled))"},{"line_number":169,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_SUPPORT_NM,"},{"line_number":170,"context_line":"                              str(val.autoneg.supported))"},{"line_number":171,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_CAPABILITIES_NM,"},{"line_number":172,"context_line":"                              tlv.get_autoneg_cap(val.pmd_autoneg))"},{"line_number":173,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_121c6911","line":170,"updated":"2017-01-20 15:56:16.000000000","message":"ditto abot boolean types","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_ENABLED_NM,"},{"line_number":168,"context_line":"                              str(val.autoneg.enabled))"},{"line_number":169,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_LINK_AUTONEG_SUPPORT_NM,"},{"line_number":170,"context_line":"                              str(val.autoneg.supported))"},{"line_number":171,"context_line":"            nv.add_name_value(tlv.LLDP_PORT_CAPABILITIES_NM,"},{"line_number":172,"context_line":"                              tlv.get_autoneg_cap(val.pmd_autoneg))"},{"line_number":173,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_37322e11","line":170,"in_reply_to":"5a3905b3_121c6911","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"            # Check Basic Management Set"},{"line_number":213,"context_line":"            try:"},{"line_number":214,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data, nv) is True):"},{"line_number":215,"context_line":"                    LOG.debug(\"Handled basic management type %d\", tlv_type)"},{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3217a5ee","line":214,"updated":"2017-01-20 15:56:16.000000000","message":"s/is True//","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":211,"context_line":""},{"line_number":212,"context_line":"            # Check Basic Management Set"},{"line_number":213,"context_line":"            try:"},{"line_number":214,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data, nv) is True):"},{"line_number":215,"context_line":"                    LOG.debug(\"Handled basic management type %d\", tlv_type)"},{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_d7080a30","line":214,"in_reply_to":"5a3905b3_3217a5ee","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            # Check Basic Management Set"},{"line_number":213,"context_line":"            try:"},{"line_number":214,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data, nv) is True):"},{"line_number":215,"context_line":"                    LOG.debug(\"Handled basic management type %d\", tlv_type)"},{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":218,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_52d4311f","line":215,"updated":"2017-01-20 15:56:16.000000000","message":"this (and below) debug logging are useful, but can be much more useful if we include node information. We can pass node_info into this function, and then pass node_info\u003dnode_info to all debug calls.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            # Check Basic Management Set"},{"line_number":213,"context_line":"            try:"},{"line_number":214,"context_line":"                if (self._parse_basic_mgmt(tlv_type, data, nv) is True):"},{"line_number":215,"context_line":"                    LOG.debug(\"Handled basic management type %d\", tlv_type)"},{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":218,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1a69d78b","line":215,"in_reply_to":"5a3905b3_52d4311f","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":218,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"},{"line_number":219,"context_line":"                    oui \u003d str((binascii.hexlify(val.oui).decode()))"},{"line_number":220,"context_line":"                    subtype \u003d val.subtype"},{"line_number":221,"context_line":"                    data \u003d data[4:]"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_72d76d23","line":219,"updated":"2017-01-20 15:56:16.000000000","message":"str seems redundant here","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":217,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":218,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"},{"line_number":219,"context_line":"                    oui \u003d str((binascii.hexlify(val.oui).decode()))"},{"line_number":220,"context_line":"                    subtype \u003d val.subtype"},{"line_number":221,"context_line":"                    data \u003d data[4:]"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_7a101b02","line":219,"in_reply_to":"5a3905b3_72d76d23","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"                    if oui \u003d\u003d tlv.LLDP_802dot1_OUI:"},{"line_number":224,"context_line":"                        if (self._parse_802dot1(subtype, data, nv) is True):"},{"line_number":225,"context_line":"                            LOG.debug((\"Handled 802.1 subtype %d\"), subtype)"},{"line_number":226,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":227,"context_line":"                        if (self._parse_802dot3(subtype, data, nv) is True):"},{"line_number":228,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\", subtype)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_92de993d","line":225,"updated":"2017-01-20 15:56:16.000000000","message":"redundant brackets","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"                    if oui \u003d\u003d tlv.LLDP_802dot1_OUI:"},{"line_number":224,"context_line":"                        if (self._parse_802dot1(subtype, data, nv) is True):"},{"line_number":225,"context_line":"                            LOG.debug((\"Handled 802.1 subtype %d\"), subtype)"},{"line_number":226,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":227,"context_line":"                        if (self._parse_802dot3(subtype, data, nv) is True):"},{"line_number":228,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\", subtype)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_bafa83bb","line":225,"in_reply_to":"5a3905b3_92de993d","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                else:"},{"line_number":233,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":234,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"},{"line_number":235,"context_line":"                msg \u003d str(e)"},{"line_number":236,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), msg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_b2e1d500","line":235,"updated":"2017-01-20 15:56:16.000000000","message":"this is redundant, just pass e, it\u0027s converted by %s automatically","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":232,"context_line":"                else:"},{"line_number":233,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":234,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"},{"line_number":235,"context_line":"                msg \u003d str(e)"},{"line_number":236,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), msg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_5ad7df22","line":235,"in_reply_to":"5a3905b3_b2e1d500","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":234,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"},{"line_number":235,"context_line":"                msg \u003d str(e)"},{"line_number":236,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), msg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"},{"line_number":239,"context_line":"        \"\"\"Process LLDP data and update processing section in inventory\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_d2e821e5","line":236,"updated":"2017-01-20 15:56:16.000000000","message":"here it could be particularly useful to include node information","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\", tlv_type)"},{"line_number":234,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"},{"line_number":235,"context_line":"                msg \u003d str(e)"},{"line_number":236,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), msg)"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"},{"line_number":239,"context_line":"        \"\"\"Process LLDP data and update processing section in inventory\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_bae8c3e3","line":236,"in_reply_to":"5a3905b3_d2e821e5","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        try:"},{"line_number":242,"context_line":"            inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":243,"context_line":"        except utils.Error as e:"},{"line_number":244,"context_line":"            LOG.warning(_LW(\"Could not get inventory data: %(msg)s\"),"},{"line_number":245,"context_line":"                        {\u0027msg\u0027: e})"},{"line_number":246,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_f2e35d03","line":243,"updated":"2017-01-20 15:56:16.000000000","message":"you can safely let this error fall through, without a valid inventory nothing works anyway","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        try:"},{"line_number":242,"context_line":"            inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":243,"context_line":"        except utils.Error as e:"},{"line_number":244,"context_line":"            LOG.warning(_LW(\"Could not get inventory data: %(msg)s\"),"},{"line_number":245,"context_line":"                        {\u0027msg\u0027: e})"},{"line_number":246,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_7a83bb04","line":243,"in_reply_to":"5a3905b3_f2e35d03","updated":"2017-01-20 20:23:45.000000000","message":"I need to handle this as I ran into a problem with unit tests with unhandled exception.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":249,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":250,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":251,"context_line":"                LOG.debug(\"Skipping %s not in all_interfaces\", if_name)"},{"line_number":252,"context_line":"                continue"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_12f389d7","line":250,"updated":"2017-01-20 15:56:16.000000000","message":"I don\u0027t quite see how it is possible.. because of missing MAC? then let\u0027s be more specific and s/all_interfaces/because it has not MAC address/","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":249,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":250,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":251,"context_line":"                LOG.debug(\"Skipping %s not in all_interfaces\", if_name)"},{"line_number":252,"context_line":"                continue"},{"line_number":253,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3aef7388","line":250,"in_reply_to":"5a3905b3_12f389d7","updated":"2017-01-20 20:23:45.000000000","message":"This is a sanity check.  We\u0027re using the ifname from the inventory section, it should also be repeated in the all_interfaces section, but what if its not...  Anyway, changed the warning message.","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":255,"context_line":"            if tlvs is None:"},{"line_number":256,"context_line":"                LOG.warning(_LW(\"No LLDP Data found for interface %s\"),"},{"line_number":257,"context_line":"                            if_name)"},{"line_number":258,"context_line":"                continue"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\", if_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_32eec5ec","line":257,"updated":"2017-01-20 15:56:16.000000000","message":"please pass node_info to logging (see other plugins for an example)","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"},{"line_number":255,"context_line":"            if tlvs is None:"},{"line_number":256,"context_line":"                LOG.warning(_LW(\"No LLDP Data found for interface %s\"),"},{"line_number":257,"context_line":"                            if_name)"},{"line_number":258,"context_line":"                continue"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\", if_name)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1af9d74d","line":257,"in_reply_to":"5a3905b3_32eec5ec","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                            if_name)"},{"line_number":258,"context_line":"                continue"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\", if_name)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"            nv \u003d tlv.LLDPNameValues(iface)  # Store parsed name values"},{"line_number":263,"context_line":"            self._parse_lldp_tlvs(tlvs, nv)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_52bb51e5","line":260,"updated":"2017-01-20 15:56:16.000000000","message":"ditto","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                            if_name)"},{"line_number":258,"context_line":"                continue"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\", if_name)"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"            nv \u003d tlv.LLDPNameValues(iface)  # Store parsed name values"},{"line_number":263,"context_line":"            self._parse_lldp_tlvs(tlvs, nv)"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3a9693f0","line":260,"in_reply_to":"5a3905b3_52bb51e5","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"91595caaec6854dfdba24219a6f43fcccf157901","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            if nv.get_name_values():"},{"line_number":266,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":267,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":268,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d nv.get_name_values()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_72be8dd5","line":268,"updated":"2017-01-20 15:56:16.000000000","message":"get is not needed, you already checked for presence","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"ca742783b423ef1ad0c42a3ddd295c0422d6c140","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            if nv.get_name_values():"},{"line_number":266,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":267,"context_line":"                all_int \u003d introspection_data[\u0027all_interfaces\u0027]"},{"line_number":268,"context_line":"                iface_to_update \u003d all_int.get(if_name)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d nv.get_name_values()"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1a7e37ae","line":268,"in_reply_to":"5a3905b3_72be8dd5","updated":"2017-01-20 20:23:45.000000000","message":"Done","commit_id":"fa4dcf231eb48abfbf1884f29cef4a1008711edf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            vlan_dict[\u0027id\u0027] \u003d val.vlanid"},{"line_number":140,"context_line":"            # Use sore_keys to ensure keys stored consistently"},{"line_number":141,"context_line":"            nv.append_value(tlv.LLDP_PORT_VLANS_NM,"},{"line_number":142,"context_line":"                            json.dumps(vlan_dict, sort_keys\u003dTrue))"},{"line_number":143,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PROTOCOL_IDENTITY:"},{"line_number":144,"context_line":"            # There can have multiple protocol ids TLVs, store in list"},{"line_number":145,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_1576caa3","line":142,"updated":"2017-01-23 12:50:22.000000000","message":"sorry, my comment was not about sort_keys, I don\u0027t like dumping a dict to string. why is it done? the stored data is JSON, it can handle dicts perfectly well","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            vlan_dict[\u0027id\u0027] \u003d val.vlanid"},{"line_number":140,"context_line":"            # Use sore_keys to ensure keys stored consistently"},{"line_number":141,"context_line":"            nv.append_value(tlv.LLDP_PORT_VLANS_NM,"},{"line_number":142,"context_line":"                            json.dumps(vlan_dict, sort_keys\u003dTrue))"},{"line_number":143,"context_line":"        elif subtype \u003d\u003d tlv.dot1_PROTOCOL_IDENTITY:"},{"line_number":144,"context_line":"            # There can have multiple protocol ids TLVs, store in list"},{"line_number":145,"context_line":"            val \u003d tlv.Dot1_ProtocolIdentity.parse(data)"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_6998051d","line":142,"in_reply_to":"5a3905b3_1576caa3","updated":"2017-01-23 18:10:15.000000000","message":"This was done for unit tests which expected keys in order. Fixed tests and removed json.dumps here.","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":259,"context_line":"        except utils.Error as e:"},{"line_number":260,"context_line":"            LOG.warning(_LW(\"Could not get inventory data: %(msg)s\"),"},{"line_number":261,"context_line":"                        {\u0027msg\u0027: e}, node_info\u003dnode_info)"},{"line_number":262,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_357bc68d","line":259,"updated":"2017-01-23 12:50:22.000000000","message":"I don\u0027t think we should leave hacks in the code just for the sake of unit tests.. what was the problem there?","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        try:"},{"line_number":258,"context_line":"            inventory \u003d utils.get_inventory(introspection_data)"},{"line_number":259,"context_line":"        except utils.Error as e:"},{"line_number":260,"context_line":"            LOG.warning(_LW(\"Could not get inventory data: %(msg)s\"),"},{"line_number":261,"context_line":"                        {\u0027msg\u0027: e}, node_info\u003dnode_info)"},{"line_number":262,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_899b7117","line":259,"in_reply_to":"5a3905b3_357bc68d","updated":"2017-01-23 18:10:15.000000000","message":"Done","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"af8697c1fd0ba834ae5865b23b8e7a7f5112aebb","unresolved":false,"context_lines":[{"line_number":14,"context_line":"\"\"\"LLDP Processing Hook for basic TLVs\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from construct import core as cc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ironic_inspector.common.i18n import _LW"},{"line_number":20,"context_line":"from ironic_inspector.common import lldp_map"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_bea9c17d","line":17,"updated":"2017-01-26 17:28:03.000000000","message":"Should be a blank line here.\n\nbinascii is a built-in library. construct is not.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":14,"context_line":"\"\"\"LLDP Processing Hook for basic TLVs\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from construct import core as cc"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ironic_inspector.common.i18n import _LW"},{"line_number":20,"context_line":"from ironic_inspector.common import lldp_map"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_1d7e31ae","line":17,"in_reply_to":"3a461143_bea9c17d","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67438935fb316680b81fc3d763c9c0d07aec5b84","unresolved":false,"context_lines":[{"line_number":33,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _parse_tlv_from_map(self, map, type, data, nv):"},{"line_number":37,"context_line":"        \"\"\"Parse TLVs that correspond to LLDP Basic Mgmt set"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param  map: Mapping table that maps TLV to parser, name, handler"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_1f293ce6","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":55},"updated":"2017-01-24 17:40:10.000000000","message":"moving this method to LLDPNameValues would improve readability and encapsulation","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":33,"context_line":"       Store parsed data back to the ironic-inspector database."},{"line_number":34,"context_line":"    \"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _parse_tlv_from_map(self, map, type, data, nv):"},{"line_number":37,"context_line":"        \"\"\"Parse TLVs that correspond to LLDP Basic Mgmt set"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param  map: Mapping table that maps TLV to parser, name, handler"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_9d486189","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":55},"in_reply_to":"5a3905b3_1f293ce6","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"            return True"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _parse_lldp_tlvs(self, tlvs, nv, node_info):"},{"line_number":63,"context_line":"        \"\"\"Parse LLDP TLVs into dictionary of name/value pairs"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_e9103e5b","line":60,"updated":"2017-01-24 16:17:39.000000000","message":"I guess the following would look better to me:\n\n s \u003d map.get(type)\n if not s:\n   LOG.debug(\u0027No type %s found in mapping, ignoring\u0027)\n   return False\n func \u003d s[2]\n if not func:\n   return False\n return True\n\nmaybe it\u0027s only me though. However, I suspect LOG.debugging when we don\u0027t have a handler may be a good idea (maybe not)","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":"            return True"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _parse_lldp_tlvs(self, tlvs, nv, node_info):"},{"line_number":63,"context_line":"        \"\"\"Parse LLDP TLVs into dictionary of name/value pairs"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_8d9981d3","line":60,"in_reply_to":"5a3905b3_e9103e5b","updated":"2017-01-24 17:25:12.000000000","message":"Will change flow as suggested. Note though that this function should return True (as it does now) if the LLDP TLV was found in the table.  Not having a handler is valid as there are some TLVs (TTL and END_LLDPPDU for example) for which no name/value pair will be added.  So it should still return True if no handler in this case.  I will update the comment to make this clear.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67438935fb316680b81fc3d763c9c0d07aec5b84","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _parse_lldp_tlvs(self, tlvs, nv, node_info):"},{"line_number":63,"context_line":"        \"\"\"Parse LLDP TLVs into dictionary of name/value pairs"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        :param tlvs: list of raw TLVs"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_ff8470d3","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":24},"updated":"2017-01-24 17:40:10.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return False"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _parse_lldp_tlvs(self, tlvs, nv, node_info):"},{"line_number":63,"context_line":"        \"\"\"Parse LLDP TLVs into dictionary of name/value pairs"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        :param tlvs: list of raw TLVs"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_a02414af","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":24},"in_reply_to":"5a3905b3_ff8470d3","updated":"2017-01-27 15:50:56.000000000","message":"Although function is still in here to walk list of TLVs, all of the functionality has been moved to LLDPNameValues (now LLDPParser)","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                data \u003d bytearray(binascii.a2b_hex(tlv_value))"},{"line_number":76,"context_line":"            except TypeError as e:"},{"line_number":77,"context_line":"                LOG.warning(_LW("},{"line_number":78,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct\""},{"line_number":79,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":80,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":81,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_cb798a31","line":78,"updated":"2017-01-26 08:55:50.000000000","message":"missing space.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                data \u003d bytearray(binascii.a2b_hex(tlv_value))"},{"line_number":76,"context_line":"            except TypeError as e:"},{"line_number":77,"context_line":"                LOG.warning(_LW("},{"line_number":78,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct\""},{"line_number":79,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":80,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":81,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_006408e2","line":78,"in_reply_to":"3a461143_cb798a31","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                if self._parse_tlv_from_map(lldp_map.Basic_Mgmt_Map,"},{"line_number":86,"context_line":"                                            tlv_type, data, nv):"},{"line_number":87,"context_line":"                    LOG.debug(\"Handled basic management type %d\","},{"line_number":88,"context_line":"                              tlv_type, node_info\u003dnode_info)"},{"line_number":89,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":90,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":91,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_2bddae14","line":88,"updated":"2017-01-26 08:55:50.000000000","message":"why pass node_info, it is not going to be showed in the logs?","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                if self._parse_tlv_from_map(lldp_map.Basic_Mgmt_Map,"},{"line_number":86,"context_line":"                                            tlv_type, data, nv):"},{"line_number":87,"context_line":"                    LOG.debug(\"Handled basic management type %d\","},{"line_number":88,"context_line":"                              tlv_type, node_info\u003dnode_info)"},{"line_number":89,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":90,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":91,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_0336d2e5","line":88,"in_reply_to":"3a461143_2bddae14","updated":"2017-01-27 15:50:56.000000000","message":"This was a request by Dmitry, I believe it is being used by the logger in kwargs. For example in the functional test I see this output:\n2017-01-27 10:14:01.634 21746 DEBUG ironic_inspector.plugins.lldp_basic [-] [node: 44e48321-1edb-4f06-95ba-a124e0331280 state reapplying] Handled TLV type 1 _parse_lldp_tlvs ironic_inspector/plugins/lldp_basic.py:62\n\nI then removed the node_info\u003dnode_info and the output was this:\n2017-01-27 10:17:32.931 21845 DEBUG ironic_inspector.plugins.lldp_basic [-] Handled TLV type 1 _parse_lldp_tlvs ironic_inspector/plugins/lldp_basic.py:62\n\nthe 2nd one is missing the \"node: xxx\"","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":90,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":91,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"},{"line_number":92,"context_line":"                    oui \u003d (binascii.hexlify(val.oui).decode())"},{"line_number":93,"context_line":"                    subtype \u003d val.subtype"},{"line_number":94,"context_line":"                    data \u003d data[4:]"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_0914aa4a","line":92,"updated":"2017-01-24 16:17:39.000000000","message":"nit: redundant brackets","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":90,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":91,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"},{"line_number":92,"context_line":"                    oui \u003d (binascii.hexlify(val.oui).decode())"},{"line_number":93,"context_line":"                    subtype \u003d val.subtype"},{"line_number":94,"context_line":"                    data \u003d data[4:]"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_cda389ff","line":92,"in_reply_to":"5a3905b3_0914aa4a","updated":"2017-01-24 17:25:12.000000000","message":"Will fix.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":89,"context_line":"                elif tlv_type \u003d\u003d tlv.LLDP_TLV_ORG_SPECIFIC:"},{"line_number":90,"context_line":"                    # Organizationally Unique ID TLVs"},{"line_number":91,"context_line":"                    val \u003d tlv.OrgSpecific.parse(data)"},{"line_number":92,"context_line":"                    oui \u003d (binascii.hexlify(val.oui).decode())"},{"line_number":93,"context_line":"                    subtype \u003d val.subtype"},{"line_number":94,"context_line":"                    data \u003d data[4:]"},{"line_number":95,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_434e1a70","line":92,"in_reply_to":"5a3905b3_cda389ff","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67438935fb316680b81fc3d763c9c0d07aec5b84","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                    subtype \u003d val.subtype"},{"line_number":94,"context_line":"                    data \u003d data[4:]"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"                    if oui \u003d\u003d tlv.LLDP_802dot1_OUI:"},{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_758d01d2","line":96,"range":{"start_line":96,"start_character":0,"end_line":96,"end_character":51},"updated":"2017-01-24 17:40:10.000000000","message":"maybe a mapping of mappings would avoid having to do these if statements here","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                    subtype \u003d val.subtype"},{"line_number":94,"context_line":"                    data \u003d data[4:]"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"                    if oui \u003d\u003d tlv.LLDP_802dot1_OUI:"},{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_6351560e","line":96,"range":{"start_line":96,"start_character":0,"end_line":96,"end_character":51},"in_reply_to":"5a3905b3_758d01d2","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","},{"line_number":100,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":101,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_290fa637","line":100,"updated":"2017-01-24 16:17:39.000000000","message":"do we need an \"else\" branch here with logging?","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","},{"line_number":100,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":101,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_235f4e0f","line":100,"in_reply_to":"3a461143_4be2fad6","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","},{"line_number":100,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":101,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_2dab2dd8","line":100,"in_reply_to":"5a3905b3_290fa637","updated":"2017-01-24 17:25:12.000000000","message":"Good idea, will add.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot1_Q_Map,"},{"line_number":98,"context_line":"                                                    subtype, data, nv):"},{"line_number":99,"context_line":"                            LOG.debug(\"Handled 802.1 subtype %d\","},{"line_number":100,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":101,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_4be2fad6","line":100,"in_reply_to":"5a3905b3_2dab2dd8","updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                    elif oui \u003d\u003d tlv.LLDP_802dot3_OUI:"},{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"},{"line_number":104,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\","},{"line_number":105,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":106,"context_line":"                    else:"},{"line_number":107,"context_line":"                        LOG.debug(\"Organizationally Unique ID %s is not a \""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_6be7b6e4","line":104,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"},{"line_number":104,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\","},{"line_number":105,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":106,"context_line":"                    else:"},{"line_number":107,"context_line":"                        LOG.debug(\"Organizationally Unique ID %s is not a \""},{"line_number":108,"context_line":"                                  \"recognized LLDP TLV subtype\","}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_490a3227","line":105,"updated":"2017-01-24 16:17:39.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"},{"line_number":104,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\","},{"line_number":105,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":106,"context_line":"                    else:"},{"line_number":107,"context_line":"                        LOG.debug(\"Organizationally Unique ID %s is not a \""},{"line_number":108,"context_line":"                                  \"recognized LLDP TLV subtype\","}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_6db53530","line":105,"in_reply_to":"5a3905b3_490a3227","updated":"2017-01-24 17:25:12.000000000","message":"Will add.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                        if self._parse_tlv_from_map(lldp_map.Dot3_Q_Map,"},{"line_number":103,"context_line":"                                                    subtype, data, nv):"},{"line_number":104,"context_line":"                            LOG.debug(\"Handled 802.3 subtype %d\","},{"line_number":105,"context_line":"                                      subtype, node_info\u003dnode_info)"},{"line_number":106,"context_line":"                    else:"},{"line_number":107,"context_line":"                        LOG.debug(\"Organizationally Unique ID %s is not a \""},{"line_number":108,"context_line":"                                  \"recognized LLDP TLV subtype\","}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_a3a97ee1","line":105,"in_reply_to":"5a3905b3_6db53530","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                    else:"},{"line_number":107,"context_line":"                        LOG.debug(\"Organizationally Unique ID %s is not a \""},{"line_number":108,"context_line":"                                  \"recognized LLDP TLV subtype\","},{"line_number":109,"context_line":"                                  oui, node_info\u003dnode_info)"},{"line_number":110,"context_line":"                else:"},{"line_number":111,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\","},{"line_number":112,"context_line":"                              tlv_type, node_info\u003dnode_info)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_abd19efd","line":109,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":109,"context_line":"                                  oui, node_info\u003dnode_info)"},{"line_number":110,"context_line":"                else:"},{"line_number":111,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\","},{"line_number":112,"context_line":"                              tlv_type, node_info\u003dnode_info)"},{"line_number":113,"context_line":"            except (ValueError, cc.RangeError, cc.FieldError) as e:"},{"line_number":114,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), e, node_info\u003dnode_info)"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_2b04ce7c","line":112,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":123,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":124,"context_line":"                LOG.debug(\"Skipping %s, interface name missing\", if_name,"},{"line_number":125,"context_line":"                          node_info\u003dnode_info)"},{"line_number":126,"context_line":"                continue"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_abf8be7d","line":125,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                            if_name, node_info\u003dnode_info)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\","},{"line_number":135,"context_line":"                      if_name, node_info\u003dnode_info)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            nv \u003d lldp_map.LLDPNameValues(iface)  # Store parsed name values"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_69052e12","line":134,"updated":"2017-01-24 16:17:39.000000000","message":"s/Found/Processing/ maybe","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                            if_name, node_info\u003dnode_info)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\","},{"line_number":135,"context_line":"                      if_name, node_info\u003dnode_info)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            nv \u003d lldp_map.LLDPNameValues(iface)  # Store parsed name values"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_cd7aa977","line":134,"in_reply_to":"5a3905b3_69052e12","updated":"2017-01-24 17:25:12.000000000","message":"Will change.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":131,"context_line":"                            if_name, node_info\u003dnode_info)"},{"line_number":132,"context_line":"                continue"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            LOG.debug(\"Found LLDP Data for interface %s\","},{"line_number":135,"context_line":"                      if_name, node_info\u003dnode_info)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            nv \u003d lldp_map.LLDPNameValues(iface)  # Store parsed name values"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_a3809e47","line":134,"in_reply_to":"5a3905b3_cd7aa977","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"c48ab8220132d1d65a8a027cebeb3453d8b67ced","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":142,"context_line":"                iface_to_update \u003d introspection_data[\u0027all_interfaces\u0027][if_name]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"                # iface_to_update[\u0027lldp_processed\u0027] \u003d nv.get_name_values()"},{"line_number":145,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d nv.nv_dict"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_89009a03","line":144,"updated":"2017-01-24 16:17:39.000000000","message":"should be removed","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"be793c8b7bdce25b53a7f5f4bf559a455bd9b6aa","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":142,"context_line":"                iface_to_update \u003d introspection_data[\u0027all_interfaces\u0027][if_name]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"                # iface_to_update[\u0027lldp_processed\u0027] \u003d nv.get_name_values()"},{"line_number":145,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d nv.nv_dict"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_c3976a8e","line":144,"in_reply_to":"5a3905b3_6d8c5580","updated":"2017-01-27 15:50:56.000000000","message":"Done","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"527411183c2ef35cfa285a996f6671ac081d0938","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                # Store lldp data per interface in \"all_interfaces\""},{"line_number":142,"context_line":"                iface_to_update \u003d introspection_data[\u0027all_interfaces\u0027][if_name]"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"                # iface_to_update[\u0027lldp_processed\u0027] \u003d nv.get_name_values()"},{"line_number":145,"context_line":"                iface_to_update[\u0027lldp_processed\u0027] \u003d nv.nv_dict"}],"source_content_type":"text/x-python","patch_set":27,"id":"5a3905b3_6d8c5580","line":144,"in_reply_to":"5a3905b3_89009a03","updated":"2017-01-24 17:25:12.000000000","message":"Will remove.","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param tlvs: list of raw TLVs"},{"line_number":40,"context_line":"        :param node_info: node being introspected"},{"line_number":41,"context_line":"        :returns nv: dictionary of name/value pairs"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # This parser is used to generate name/value pairs for"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_6f2f2288","line":41,"range":{"start_line":41,"start_character":21,"end_line":41,"end_character":51},"updated":"2017-01-31 10:56:42.000000000","message":"please elaborate on name/value","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param tlvs: list of raw TLVs"},{"line_number":40,"context_line":"        :param node_info: node being introspected"},{"line_number":41,"context_line":"        :returns nv: dictionary of name/value pairs"},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        # This parser is used to generate name/value pairs for"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_646ba3b7","line":41,"range":{"start_line":41,"start_character":21,"end_line":41,"end_character":51},"in_reply_to":"3a461143_6f2f2288","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                else:"},{"line_number":63,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\","},{"line_number":64,"context_line":"                              tlv_type, node_info\u003dnode_info)"},{"line_number":65,"context_line":"            except (ValueError, core.RangeError, core.FieldError) as e:"},{"line_number":66,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), e, node_info\u003dnode_info)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        return parser.nv_dict"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_f40f6534","line":66,"range":{"start_line":65,"start_character":0,"end_line":66,"end_character":75},"updated":"2017-01-31 10:56:42.000000000","message":"imo we should hide this exceptions in parser","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                else:"},{"line_number":63,"context_line":"                    LOG.debug(\"LLDP TLV type %d not handled\","},{"line_number":64,"context_line":"                              tlv_type, node_info\u003dnode_info)"},{"line_number":65,"context_line":"            except (ValueError, core.RangeError, core.FieldError) as e:"},{"line_number":66,"context_line":"                LOG.warning(_LW(\"TLV skipped: %s\"), e, node_info\u003dnode_info)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"        return parser.nv_dict"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_09375aff","line":66,"range":{"start_line":65,"start_character":0,"end_line":66,"end_character":75},"in_reply_to":"3a461143_f40f6534","updated":"2017-02-01 00:54:34.000000000","message":"Done","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":76,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":77,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":78,"context_line":"                LOG.debug(\"Skipping %s, interface name missing\", if_name,"},{"line_number":79,"context_line":"                          node_info\u003dnode_info)"},{"line_number":80,"context_line":"                continue"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_af32eaa4","line":79,"range":{"start_line":77,"start_character":0,"end_line":79,"end_character":46},"updated":"2017-01-31 10:56:42.000000000","message":"why do you need this check?\ninterfaces are generated based on all_interfaces, when this condition is true?","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"bdb874ca87b73a44b3f8e42d850a89441582502c","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        for iface in inventory[\u0027interfaces\u0027]:"},{"line_number":76,"context_line":"            if_name \u003d iface[\u0027name\u0027]"},{"line_number":77,"context_line":"            if if_name not in introspection_data[\u0027all_interfaces\u0027]:"},{"line_number":78,"context_line":"                LOG.debug(\"Skipping %s, interface name missing\", if_name,"},{"line_number":79,"context_line":"                          node_info\u003dnode_info)"},{"line_number":80,"context_line":"                continue"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"            tlvs \u003d iface.get(\u0027lldp\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_c417f742","line":79,"range":{"start_line":77,"start_character":0,"end_line":79,"end_character":46},"in_reply_to":"3a461143_af32eaa4","updated":"2017-02-01 00:54:34.000000000","message":"Removed as artificial check.","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                LOG.warning(_LW("},{"line_number":52,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct \""},{"line_number":53,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_1d5a1184","line":54,"updated":"2017-02-03 09:58:15.000000000","message":"+1, this is quite important for reading the logs","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"aeae460bc8c68a03824ae1ea372f181d115b17a3","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                LOG.warning(_LW("},{"line_number":52,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct \""},{"line_number":53,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"}],"source_content_type":"text/x-python","patch_set":32,"id":"3a461143_4ad946f2","line":54,"updated":"2017-02-01 10:37:43.000000000","message":"nit: node_info\u003dnode_info","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                LOG.warning(_LW("},{"line_number":52,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct \""},{"line_number":53,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_dea8e88e","line":54,"in_reply_to":"1a430d35_1d5a1184","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                LOG.warning(_LW("},{"line_number":52,"context_line":"                    \"TLV value for TLV type %(tlv_type)d not in correct \""},{"line_number":53,"context_line":"                    \"format, value must be in hexadecimal: %(msg)s\"),"},{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_bea79cbb","line":54,"in_reply_to":"3a461143_4ad946f2","updated":"2017-02-07 22:50:33.000000000","message":"Done","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b22bb6717f280fee028a049b5aa9eb7a91525f11","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"},{"line_number":58,"context_line":"                LOG.debug(\"Handled TLV type %d\","},{"line_number":59,"context_line":"                          tlv_type, node_info\u003dnode_info)"},{"line_number":60,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_3d5fcd73","line":57,"updated":"2017-02-03 09:58:15.000000000","message":"I think we should pass node_info to this call and use it in all loggings, so that operators can easily track the node UUID","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"70e29b0c1d84ba5729621733ef71376af55e1145","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                    {\u0027tlv_type\u0027: tlv_type, \u0027msg\u0027: e})"},{"line_number":55,"context_line":"                continue"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            if parser.parse_tlv(tlv_type, data):"},{"line_number":58,"context_line":"                LOG.debug(\"Handled TLV type %d\","},{"line_number":59,"context_line":"                          tlv_type, node_info\u003dnode_info)"},{"line_number":60,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":32,"id":"1a430d35_fe84c40b","line":57,"in_reply_to":"1a430d35_3d5fcd73","updated":"2017-02-07 22:50:33.000000000","message":"node_info is passed to class in init at line 45 and used in calls.","commit_id":"8834927d4c5b448aba0c77402f6531b5e60fb305"}],"ironic_inspector/plugins/lldp_name_values.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a71b18c_7058058b","updated":"2016-12-05 10:12:22.000000000","message":"this file does not contain a plugin, and thus should probably go to ironic_inspector/common/","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"3a71b18c_88d1e059","in_reply_to":"3a71b18c_7058058b","updated":"2016-12-06 01:15:43.000000000","message":"Agreed. Move to common.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BaseLLDP(object):"},{"line_number":27,"context_line":"    \"\"\"BaseLLDP class.\"\"\""},{"line_number":28,"context_line":"    def __init__(self):"},{"line_number":29,"context_line":"        self.name \u003d \"\""},{"line_number":30,"context_line":"        self.value \u003d \"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_905da17b","line":27,"updated":"2016-12-05 10:12:22.000000000","message":"it\u0027s not clear what these classes do. I was reviewing code below and realized that every value is converted to a string, which does not feel quite right to me. Could you please expand this docstring and/or module docstring?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class BaseLLDP(object):"},{"line_number":27,"context_line":"    \"\"\"BaseLLDP class.\"\"\""},{"line_number":28,"context_line":"    def __init__(self):"},{"line_number":29,"context_line":"        self.name \u003d \"\""},{"line_number":30,"context_line":"        self.value \u003d \"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_28c9ac59","line":27,"in_reply_to":"3a71b18c_905da17b","updated":"2016-12-06 01:15:43.000000000","message":"So each LLDP TLV contains one or more name/value pairs.  For a particular name/value pair, each class contains defines from the 802.1 etc. specs used to parse the data in the TLV, the code that does the parsing, and the storage of the name/value.  These name/value pairs will be written to swift.  \n\nNote that not every value is converted to a string, integer values (i.e. mtu,\nvlan ids, link aggregation id etc. are not).  See the example in the test file.\nIn the lldp spec we show all other values store in swift as strings e.g. capabilities etc. This allows consumers (ui etc.) to use the swift data without requiring an extra level of decode. \n\nI have updated the class doctstring.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":42,"context_line":"        except ValueError:"},{"line_number":43,"context_line":"            raise ValueError(\u0027Invalid int for \"%s\"\u0027 % self.name)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        return decoded_int"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b0561d5a","line":43,"updated":"2016-12-05 10:12:22.000000000","message":"I\u0027m not sure if this error string ever hits end users, but let\u0027s i18n-ize it just in case with _()","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        try:"},{"line_number":41,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":42,"context_line":"        except ValueError:"},{"line_number":43,"context_line":"            raise ValueError(\u0027Invalid int for \"%s\"\u0027 % self.name)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        return decoded_int"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_882c8003","line":43,"in_reply_to":"3a71b18c_b0561d5a","updated":"2016-12-06 01:15:43.000000000","message":"Done.  Note that this string will be shown to the user when the ValueError is handled in lldp_basic.py","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":53,"context_line":"         \"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            bool_str \u003d \"%s\" % str((byte \u0026 bit) !\u003d 0)"},{"line_number":57,"context_line":"        except IndexError:"},{"line_number":58,"context_line":"            raise ValueError(\u0027Invalid index for \"%s\"\u0027 % self.name)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d0539969","line":56,"updated":"2016-12-05 10:12:22.000000000","message":"formatting is redundant, just use str(..)","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":53,"context_line":"         \"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            bool_str \u003d \"%s\" % str((byte \u0026 bit) !\u003d 0)"},{"line_number":57,"context_line":"        except IndexError:"},{"line_number":58,"context_line":"            raise ValueError(\u0027Invalid index for \"%s\"\u0027 % self.name)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e35515c2","line":56,"in_reply_to":"3a71b18c_d0539969","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            bool_str \u003d \"%s\" % str((byte \u0026 bit) !\u003d 0)"},{"line_number":57,"context_line":"        except IndexError:"},{"line_number":58,"context_line":"            raise ValueError(\u0027Invalid index for \"%s\"\u0027 % self.name)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return bool_str"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f04c15ca","line":58,"updated":"2016-12-05 10:12:22.000000000","message":"ditto, but I don\u0027t quite see how this code can raise an exception at all","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        try:"},{"line_number":56,"context_line":"            bool_str \u003d \"%s\" % str((byte \u0026 bit) !\u003d 0)"},{"line_number":57,"context_line":"        except IndexError:"},{"line_number":58,"context_line":"            raise ValueError(\u0027Invalid index for \"%s\"\u0027 % self.name)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        return bool_str"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_63ef45e9","line":58,"in_reply_to":"3a71b18c_f04c15ca","updated":"2016-12-06 01:15:43.000000000","message":"The byte and bit are passed in and if the byte goes beyond the actual data, in the case of invalid data in the TLV packet, it can raise an exception.  See the test case.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":68,"context_line":"         \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            decoded_str \u003d str(data.decode())"},{"line_number":72,"context_line":"            return decoded_str"},{"line_number":73,"context_line":"        except UnicodeDecodeError:"},{"line_number":74,"context_line":"            raise ValueError(\u0027Invalid string for \"%s\"\u0027 % self.name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_104a71ac","line":71,"updated":"2016-12-05 10:12:22.000000000","message":"on Python 2 this gives double conversion from and to bytestring, dunno if it\u0027s good, maybe we should leave str() out and deal with unicode. also are you sure it\u0027s always ASCII?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":68,"context_line":"         \"\"\""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            decoded_str \u003d str(data.decode())"},{"line_number":72,"context_line":"            return decoded_str"},{"line_number":73,"context_line":"        except UnicodeDecodeError:"},{"line_number":74,"context_line":"            raise ValueError(\u0027Invalid string for \"%s\"\u0027 % self.name)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_e8b89477","line":71,"in_reply_to":"3a71b18c_104a71ac","updated":"2016-12-06 01:15:43.000000000","message":"I use this function for known strings from the LLDP specs so should always be ASCII data.  I will look into removing it although I think if I don\u0027t do the conversion I having testing problems between Python 2 and 3.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            decoded_str \u003d str(data.decode())"},{"line_number":72,"context_line":"            return decoded_str"},{"line_number":73,"context_line":"        except UnicodeDecodeError:"},{"line_number":74,"context_line":"            raise ValueError(\u0027Invalid string for \"%s\"\u0027 % self.name)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def _get_mac(self, data):"},{"line_number":77,"context_line":"        \"\"\"Get a mac address string from raw LLDP data"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_30c92d27","line":74,"updated":"2016-12-05 10:12:22.000000000","message":"ditto about i18n","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                      dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":87,"context_line":"            return mac"},{"line_number":88,"context_line":"        except netaddr.core.AddrFormatError:"},{"line_number":89,"context_line":"            raise ValueError(\u0027Invalid mac format for \"%s\"\u0027 % self.name)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _get_ip(self, data):"},{"line_number":92,"context_line":"        \"\"\"Get an IP address string from raw LLDP data"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_50cea92e","line":89,"updated":"2016-12-05 10:12:22.000000000","message":"ditto about i18n","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                      dialect\u003dnetaddr.mac_unix_expanded))"},{"line_number":87,"context_line":"            return mac"},{"line_number":88,"context_line":"        except netaddr.core.AddrFormatError:"},{"line_number":89,"context_line":"            raise ValueError(\u0027Invalid mac format for \"%s\"\u0027 % self.name)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _get_ip(self, data):"},{"line_number":92,"context_line":"        \"\"\"Get an IP address string from raw LLDP data"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_89dc7b74","line":89,"in_reply_to":"3a71b18c_50cea92e","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":101,"context_line":"            return str(netaddr.IPAddress(decoded_int))"},{"line_number":102,"context_line":"        except (ValueError, netaddr.core.AddrFormatError):"},{"line_number":103,"context_line":"            raise ValueError(\u0027Invalid IP format for \"%s\"\u0027 % self.name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __eq__(self, other):"},{"line_number":106,"context_line":"        return self.name \u003d\u003d other.name"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_70cf2529","line":103,"updated":"2016-12-05 10:12:22.000000000","message":"ditto","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            decoded_int \u003d int(binascii.b2a_hex(data).decode(), 16)"},{"line_number":101,"context_line":"            return str(netaddr.IPAddress(decoded_int))"},{"line_number":102,"context_line":"        except (ValueError, netaddr.core.AddrFormatError):"},{"line_number":103,"context_line":"            raise ValueError(\u0027Invalid IP format for \"%s\"\u0027 % self.name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __eq__(self, other):"},{"line_number":106,"context_line":"        return self.name \u003d\u003d other.name"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_49f6e3f9","line":103,"in_reply_to":"3a71b18c_70cf2529","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            raise ValueError(\u0027Invalid IP format for \"%s\"\u0027 % self.name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __eq__(self, other):"},{"line_number":106,"context_line":"        return self.name \u003d\u003d other.name"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # Enforce that set contains only one instance with this name"},{"line_number":109,"context_line":"    def __hash__(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_90d4c1bd","line":106,"updated":"2016-12-05 10:12:22.000000000","message":"iirc if you define __eq__ you should also define __ne__, as it\u0027s not derived automatically","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            raise ValueError(\u0027Invalid IP format for \"%s\"\u0027 % self.name)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __eq__(self, other):"},{"line_number":106,"context_line":"        return self.name \u003d\u003d other.name"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"    # Enforce that set contains only one instance with this name"},{"line_number":109,"context_line":"    def __hash__(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_437b2928","line":106,"in_reply_to":"3a71b18c_90d4c1bd","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class BaseList(BaseLLDP):"},{"line_number":114,"context_line":"        \"\"\"BaseList class"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        Used when value is a string containing values for TLVs"},{"line_number":117,"context_line":"        that can appear multiple times (e.g. vlans)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b0dd3de2","line":114,"updated":"2016-12-05 10:12:22.000000000","message":"overly indented","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"class BaseList(BaseLLDP):"},{"line_number":114,"context_line":"        \"\"\"BaseList class"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        Used when value is a string containing values for TLVs"},{"line_number":117,"context_line":"        that can appear multiple times (e.g. vlans)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_c3bc99bd","line":114,"in_reply_to":"3a71b18c_b0dd3de2","updated":"2016-12-06 01:15:43.000000000","message":"Fixed.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    SUBTYPE_LOCAL \u003d 7"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def __init__(self, data):"},{"line_number":143,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":144,"context_line":"        self.name \u003d \"chassis_id\""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        if data[0] \u003d\u003d self.SUBTYPE_MAC:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d0dab9e7","line":143,"updated":"2016-12-05 10:12:22.000000000","message":"nit: using super() feels more native","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    SUBTYPE_LOCAL \u003d 7"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def __init__(self, data):"},{"line_number":143,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":144,"context_line":"        self.name \u003d \"chassis_id\""},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        if data[0] \u003d\u003d self.SUBTYPE_MAC:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_34dca172","line":143,"in_reply_to":"3a71b18c_d0dab9e7","updated":"2016-12-06 01:15:43.000000000","message":"Done. Changed to use super() for all classes.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    SUBTYPE_LOCAL \u003d 7"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def __init__(self, data):"},{"line_number":164,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":165,"context_line":"        self.name \u003d \"port_id\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f0e335a2","line":164,"updated":"2016-12-05 10:12:22.000000000","message":"ditto","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    SUBTYPE_LOCAL \u003d 7"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def __init__(self, data):"},{"line_number":164,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":165,"context_line":"        self.name \u003d \"port_id\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_9ae67f13","line":164,"in_reply_to":"3a71b18c_f0e335a2","updated":"2016-12-06 01:15:43.000000000","message":"Done","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                # treat all other types as strings"},{"line_number":174,"context_line":"                self.value \u003d self._get_string(data[1:])"},{"line_number":175,"context_line":"        except IndexError:"},{"line_number":176,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class SysName(BaseLLDP):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_10e1919a","line":176,"updated":"2016-12-05 10:12:22.000000000","message":"_()","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                # treat all other types as strings"},{"line_number":174,"context_line":"                self.value \u003d self._get_string(data[1:])"},{"line_number":175,"context_line":"        except IndexError:"},{"line_number":176,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"class SysName(BaseLLDP):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_fabbf3e2","line":176,"in_reply_to":"3a71b18c_10e1919a","updated":"2016-12-06 01:15:43.000000000","message":"Done","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    \"\"\"Capabilities class\"\"\""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __init__(self, data):"},{"line_number":201,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def set_capabilities(self, data):"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_30f04d67","line":201,"updated":"2016-12-05 10:12:22.000000000","message":"this __init__ is redundant","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    \"\"\"Capabilities class\"\"\""},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def __init__(self, data):"},{"line_number":201,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    def set_capabilities(self, data):"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d40c4dee","line":201,"in_reply_to":"3a71b18c_30f04d67","updated":"2016-12-06 01:15:43.000000000","message":"Removed.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        try:"},{"line_number":206,"context_line":"            sys_cap \u003d []"},{"line_number":207,"context_line":"            b \u003d data[1]"},{"line_number":208,"context_line":"            if b \u0026 0x02:"},{"line_number":209,"context_line":"                sys_cap.append(\u0027Repeater\u0027)"},{"line_number":210,"context_line":"            if b \u0026 0x04:"},{"line_number":211,"context_line":"                sys_cap.append(\u0027Bridge\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_50f5c954","line":208,"updated":"2016-12-05 10:12:22.000000000","message":"should we make these numbers top-level constants","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        try:"},{"line_number":206,"context_line":"            sys_cap \u003d []"},{"line_number":207,"context_line":"            b \u003d data[1]"},{"line_number":208,"context_line":"            if b \u0026 0x02:"},{"line_number":209,"context_line":"                sys_cap.append(\u0027Repeater\u0027)"},{"line_number":210,"context_line":"            if b \u0026 0x04:"},{"line_number":211,"context_line":"                sys_cap.append(\u0027Bridge\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_5404bd16","line":208,"in_reply_to":"3a71b18c_50f5c954","updated":"2016-12-06 01:15:43.000000000","message":"Yes, changed to use constants (although left within this class).","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            if b \u0026 0x400:"},{"line_number":227,"context_line":"                sys_cap.append(\u0027TPMR\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"            self.value \u003d str(sys_cap)"},{"line_number":230,"context_line":"        except IndexError:"},{"line_number":231,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_70e645b1","line":229,"updated":"2016-12-05 10:12:22.000000000","message":"do you really want to end up with string like \u0027[\"C-Vlan\"]\u0027? why do we even convert everything to strings?","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            if b \u0026 0x400:"},{"line_number":227,"context_line":"                sys_cap.append(\u0027TPMR\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"            self.value \u003d str(sys_cap)"},{"line_number":230,"context_line":"        except IndexError:"},{"line_number":231,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d409ad85","line":229,"in_reply_to":"3a71b18c_70e645b1","updated":"2016-12-06 01:15:43.000000000","message":"Well in the spec it looks like: [\u0027Bridge\u0027, \u0027Router\u0027]. We could store them as ints but then would need to decode when used, which would be fine I guess. \n\nThe same issue comes up with the autoneg settings below, in the spec we have this stored in swift as:          \n\"switch_port_physical_capabilities\" : [\u0027100Base-TX hdx\u0027,\n                                                 \u0027100BASE-TX fdx\u0027,\n                                                 \u00271000BASE-T fdx\u0027],","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"            self.value \u003d str(sys_cap)"},{"line_number":230,"context_line":"        except IndexError:"},{"line_number":231,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class SysCapabilities(Capabilities):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_90ebe177","line":231,"updated":"2016-12-05 10:12:22.000000000","message":"_() also the only place where this exception can be raised is data[1], right? I suggest we only wrap it, not the whole function","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"            self.value \u003d str(sys_cap)"},{"line_number":230,"context_line":"        except IndexError:"},{"line_number":231,"context_line":"            raise ValueError(\u0027Incomplete lldp tlv for \"%s\"\u0027 % self.name)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"class SysCapabilities(Capabilities):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_5a86a7db","line":231,"in_reply_to":"3a71b18c_90ebe177","updated":"2016-12-06 01:15:43.000000000","message":"Good point. Fixed.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            addr \u003d self._get_mac(data[2:len+1])"},{"line_number":275,"context_line":"        else:"},{"line_number":276,"context_line":"            # ignore this address"},{"line_number":277,"context_line":"            LOG.info(_LI(\"MgmtAddress subtype %d not handled\"),"},{"line_number":278,"context_line":"                     subtype)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if addr:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_b0045d4a","line":277,"updated":"2016-12-05 10:12:22.000000000","message":"info -\u003e debug, I think","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            addr \u003d self._get_mac(data[2:len+1])"},{"line_number":275,"context_line":"        else:"},{"line_number":276,"context_line":"            # ignore this address"},{"line_number":277,"context_line":"            LOG.info(_LI(\"MgmtAddress subtype %d not handled\"),"},{"line_number":278,"context_line":"                     subtype)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        if addr:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_9a53df6a","line":277,"in_reply_to":"3a71b18c_b0045d4a","updated":"2016-12-06 01:15:43.000000000","message":"Yes, done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":308,"context_line":"    def __init__(self, data):"},{"line_number":309,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":310,"context_line":"        self.name \u003d \"port_protocol_vlan_supported\""},{"line_number":311,"context_line":"        self.value \u003d \"%s\" % str((data[0] \u0026 0x01) !\u003d 0)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class Dot1_Port_Prot_Vlan_Enabled(BaseLLDP):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_d001d939","line":311,"updated":"2016-12-05 10:12:22.000000000","message":"formatting is redundant","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":308,"context_line":"    def __init__(self, data):"},{"line_number":309,"context_line":"        BaseLLDP.__init__(self)"},{"line_number":310,"context_line":"        self.name \u003d \"port_protocol_vlan_supported\""},{"line_number":311,"context_line":"        self.value \u003d \"%s\" % str((data[0] \u0026 0x01) !\u003d 0)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"class Dot1_Port_Prot_Vlan_Enabled(BaseLLDP):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_9adaffe6","line":311,"in_reply_to":"3a71b18c_d001d939","updated":"2016-12-06 01:15:43.000000000","message":"Fixed.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        # check for zero length"},{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            if data[0] \u003d\u003d 0:"},{"line_number":368,"context_line":"                raise ValueError(\u0027Invalid len \"%s\"\u0027 % self.name)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"            # Store protocol identity hex string after length octet"},{"line_number":371,"context_line":"            port_id \u003d str(binascii.b2a_hex(data[1:]).decode())"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_f0fa5542","line":368,"updated":"2016-12-05 10:12:22.000000000","message":"_() also s/Invalid/Zero/","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        # check for zero length"},{"line_number":366,"context_line":"        try:"},{"line_number":367,"context_line":"            if data[0] \u003d\u003d 0:"},{"line_number":368,"context_line":"                raise ValueError(\u0027Invalid len \"%s\"\u0027 % self.name)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"            # Store protocol identity hex string after length octet"},{"line_number":371,"context_line":"            port_id \u003d str(binascii.b2a_hex(data[1:]).decode())"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_ba2dfba9","line":368,"in_reply_to":"3a71b18c_f0fa5542","updated":"2016-12-06 01:15:43.000000000","message":"Done.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"17c9869631e4e60d3e931a88561ba274ff70a006","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            # Store protocol identity hex string after length octet"},{"line_number":371,"context_line":"            port_id \u003d str(binascii.b2a_hex(data[1:]).decode())"},{"line_number":372,"context_line":"        except IndexError:"},{"line_number":373,"context_line":"            raise ValueError(\u0027Invalid format \"%s\"\u0027 % self.name)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        self._set_value_to_list(port_id)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_10f8b148","line":373,"updated":"2016-12-05 10:12:22.000000000","message":"_()\n\nalso the only place which raises IndexError is data[0] so we can provide a more specific error, like \"Empty data\"\n\nalso decode() can raise UnicodeError","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"50e158d4cae70bd39c65dd7c41ec60c76530a245","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            # Store protocol identity hex string after length octet"},{"line_number":371,"context_line":"            port_id \u003d str(binascii.b2a_hex(data[1:]).decode())"},{"line_number":372,"context_line":"        except IndexError:"},{"line_number":373,"context_line":"            raise ValueError(\u0027Invalid format \"%s\"\u0027 % self.name)"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        self._set_value_to_list(port_id)"},{"line_number":376,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a71b18c_9a24bfc5","line":373,"in_reply_to":"3a71b18c_10f8b148","updated":"2016-12-06 01:15:43.000000000","message":"Fixed.","commit_id":"a748c7cd65ff84bebe74e04cbeb6d26c93c45d79"}],"ironic_inspector/test/functional.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":60,"context_line":"debug \u003d True"},{"line_number":61,"context_line":"auth_strategy \u003d noauth"},{"line_number":62,"context_line":"[database]"},{"line_number":63,"context_line":"connection \u003d sqlite:///%(db_file)s"},{"line_number":64,"context_line":"\"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_95439a41","line":63,"updated":"2017-01-23 12:50:22.000000000","message":"I suggest you change processing hooks here, not in the code","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":60,"context_line":"debug \u003d True"},{"line_number":61,"context_line":"auth_strategy \u003d noauth"},{"line_number":62,"context_line":"[database]"},{"line_number":63,"context_line":"connection \u003d sqlite:///%(db_file)s"},{"line_number":64,"context_line":"\"\"\""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_498ee9d0","line":63,"in_reply_to":"5a3905b3_95439a41","updated":"2017-01-23 18:10:15.000000000","message":"Done","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        self.assertIsNone(row.error)"},{"line_number":689,"context_line":"        self.assertNotEqual(version_id, row.version_id)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":692,"context_line":"    @mock.patch.object(swift, \u0027store_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":693,"context_line":"    @mock.patch.object(swift, \u0027get_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":694,"context_line":"    def test_lldp_plugin(self, get_mock, store_mock, mock_log):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_b5409635","line":691,"updated":"2017-01-23 12:50:22.000000000","message":"please don\u0027t mock logging, we should only mock external services in functional tests","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        self.assertIsNone(row.error)"},{"line_number":689,"context_line":"        self.assertNotEqual(version_id, row.version_id)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":692,"context_line":"    @mock.patch.object(swift, \u0027store_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":693,"context_line":"    @mock.patch.object(swift, \u0027get_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":694,"context_line":"    def test_lldp_plugin(self, get_mock, store_mock, mock_log):"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_a9b58d7e","line":691,"in_reply_to":"5a3905b3_b5409635","updated":"2017-01-23 18:10:15.000000000","message":"Done","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":692,"context_line":"    @mock.patch.object(swift, \u0027store_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":693,"context_line":"    @mock.patch.object(swift, \u0027get_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":694,"context_line":"    def test_lldp_plugin(self, get_mock, store_mock, mock_log):"},{"line_number":695,"context_line":"        cfg.CONF.set_override(\u0027store_data\u0027, \u0027swift\u0027, \u0027processing\u0027)"},{"line_number":696,"context_line":"        self.data \u003d {"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_d549a261","line":693,"updated":"2017-01-23 12:50:22.000000000","message":"I don\u0027t quite understand why you need this mock, you don\u0027t seem to hit this call on this path..","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":692,"context_line":"    @mock.patch.object(swift, \u0027store_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":693,"context_line":"    @mock.patch.object(swift, \u0027get_introspection_data\u0027, autospec\u003dTrue)"},{"line_number":694,"context_line":"    def test_lldp_plugin(self, get_mock, store_mock, mock_log):"},{"line_number":695,"context_line":"        cfg.CONF.set_override(\u0027store_data\u0027, \u0027swift\u0027, \u0027processing\u0027)"},{"line_number":696,"context_line":"        self.data \u003d {"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_8969b1fb","line":693,"in_reply_to":"5a3905b3_d549a261","updated":"2017-01-23 18:10:15.000000000","message":"Changed test to use stored data so need these mock calls now.","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"4fac74e2bd1e5dcccdb435b9222733738cca8b9b","unresolved":false,"context_lines":[{"line_number":752,"context_line":"        self.check_status(status, finished\u003dTrue)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        # Verify warnings for 2 interfaces that do not have lldp data"},{"line_number":755,"context_line":"        self.assertEqual(mock_log.warning.call_count, 2)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_f5469e4d","line":755,"updated":"2017-01-23 12:50:22.000000000","message":"this is not quite needed, it\u0027s covered by unit tests. what I\u0027d prefer to see here is an actual check on parsed LLDP data for the first interface.","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"8709bddcc83459579dc40c3a435f47ec18654073","unresolved":false,"context_lines":[{"line_number":752,"context_line":"        self.check_status(status, finished\u003dTrue)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"        # Verify warnings for 2 interfaces that do not have lldp data"},{"line_number":755,"context_line":"        self.assertEqual(mock_log.warning.call_count, 2)"},{"line_number":756,"context_line":""},{"line_number":757,"context_line":""},{"line_number":758,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":25,"id":"5a3905b3_c946597a","line":755,"in_reply_to":"5a3905b3_f5469e4d","updated":"2017-01-23 18:10:15.000000000","message":"OK removed this log check and added in checks to verify data written to mocked swift has correct processed lldp data.","commit_id":"a222a4c2ffb41f6699cf75f74a5d60b07311a556"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"7e406503e96a96c818efbfe766bbb1d37515ddab","unresolved":false,"context_lines":[{"line_number":60,"context_line":"auth_strategy \u003d noauth"},{"line_number":61,"context_line":"[database]"},{"line_number":62,"context_line":"connection \u003d sqlite:///%(db_file)s"},{"line_number":63,"context_line":"[processing]"},{"line_number":64,"context_line":"processing_hooks\u003d$default_processing_hooks,lldp_basic"},{"line_number":65,"context_line":"\"\"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3a461143_6f49e2b6","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":53},"updated":"2017-01-31 10:56:42.000000000","message":"nit: there is processing section on line 56","commit_id":"46187ab5b02aa0622960e85b93b1871e9368261f"}],"ironic_inspector/test/unit/test_plugins_lldp_basic.py":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        self.hook.before_update(self.data, self.node_info)"},{"line_number":262,"context_line":"        self.assertEqual(self.expected, self.data[\u0027all_interfaces\u0027])"},{"line_number":263,"context_line":"        self.assertEqual(mock_log.warning.call_count, 2)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":266,"context_line":"    def test_truncated_int(self, mock_log):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_8b3a2235","line":263,"updated":"2017-01-26 08:55:50.000000000","message":"please switch params position (expected, actual)","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        # nothing should be written to lldp_processed"},{"line_number":276,"context_line":"        self.hook.before_update(self.data, self.node_info)"},{"line_number":277,"context_line":"        self.assertEqual(self.expected, self.data[\u0027all_interfaces\u0027])"},{"line_number":278,"context_line":"        self.assertEqual(mock_log.warning.call_count, 3)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":281,"context_line":"    def test_truncated_ip(self, mock_log):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_cb3c2a32","line":278,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        }]"},{"line_number":287,"context_line":"        self.hook.before_update(self.data, self.node_info)"},{"line_number":288,"context_line":"        self.assertEqual(self.expected, self.data[\u0027all_interfaces\u0027])"},{"line_number":289,"context_line":"        self.assertEqual(mock_log.warning.call_count, 1)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":292,"context_line":"    def test_truncated_mac(self, mock_log):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_eb49e6d1","line":289,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        self.hook.before_update(self.data, self.node_info)"},{"line_number":325,"context_line":"        self.assertEqual(self.expected, self.data[\u0027all_interfaces\u0027])"},{"line_number":326,"context_line":"        self.assertEqual(mock_log.warning.call_count, 3)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.lldp_basic.LOG\u0027)"},{"line_number":329,"context_line":"    def test_bad_value_linkagg(self, mock_log):"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_0b4712bc","line":326,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"60f3d4a96438b906d885896cbea9092afc249f23","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        self.hook.before_update(self.data, self.node_info)"},{"line_number":338,"context_line":"        self.assertEqual(self.expected, self.data[\u0027all_interfaces\u0027])"},{"line_number":339,"context_line":"        self.assertEqual(mock_log.warning.call_count, 2)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def test_iface_not_in_all_interfaces(self):"},{"line_number":342,"context_line":"        # interface name is not in all_interfaces"}],"source_content_type":"text/x-python","patch_set":27,"id":"3a461143_8b8862e9","line":339,"updated":"2017-01-26 08:55:50.000000000","message":"ditto","commit_id":"e73c6820b5d5fb4145bcd2a5331ee7c95795c273"}],"requirements.txt":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":"alembic\u003e\u003d0.8.4 # MIT"},{"line_number":5,"context_line":"Babel\u003e\u003d2.3.4 # BSD"},{"line_number":6,"context_line":"construct\u003e\u003d2.8.8 # MIT"},{"line_number":7,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":8,"context_line":"Flask!\u003d0.11,\u003c1.0,\u003e\u003d0.10 # BSD"},{"line_number":9,"context_line":"futurist!\u003d0.15.0,\u003e\u003d0.11.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":13,"id":"ba5201f7_ddc5da5b","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":9},"updated":"2016-12-30 13:04:09.000000000","message":"Please add depends-on on patch with adding new lib to global requirements","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"1bf6d8fb0b8abafa21a731a822dcb3b3130c4ea1","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":"alembic\u003e\u003d0.8.4 # MIT"},{"line_number":5,"context_line":"Babel\u003e\u003d2.3.4 # BSD"},{"line_number":6,"context_line":"construct\u003e\u003d2.8.8 # MIT"},{"line_number":7,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":8,"context_line":"Flask!\u003d0.11,\u003c1.0,\u003e\u003d0.10 # BSD"},{"line_number":9,"context_line":"futurist!\u003d0.15.0,\u003e\u003d0.11.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":13,"id":"ba5201f7_e7e2f602","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":9},"in_reply_to":"ba5201f7_ddc5da5b","updated":"2017-01-02 16:53:50.000000000","message":"Anton is correct, there should be a separate patch which adds the requirement for construct, and this patch should depend on that one.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":3,"context_line":"# process, which may cause wedges in the gate later."},{"line_number":4,"context_line":"alembic\u003e\u003d0.8.4 # MIT"},{"line_number":5,"context_line":"Babel\u003e\u003d2.3.4 # BSD"},{"line_number":6,"context_line":"construct\u003e\u003d2.8.8 # MIT"},{"line_number":7,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":8,"context_line":"Flask!\u003d0.11,\u003c1.0,\u003e\u003d0.10 # BSD"},{"line_number":9,"context_line":"futurist!\u003d0.15.0,\u003e\u003d0.11.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":13,"id":"ba5201f7_c09e9cb7","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":9},"in_reply_to":"ba5201f7_e7e2f602","updated":"2017-01-03 18:54:55.000000000","message":"Change to global requirements has been added and the commit message has been updated with a Depends-On to this change.","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"}],"setup.cfg":[{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"c34d5c01089fd31ee00420a74e4fe8f7d0190dfe","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    raid_device \u003d ironic_inspector.plugins.raid_device:RaidDeviceDetection"},{"line_number":34,"context_line":"    capabilities \u003d ironic_inspector.plugins.capabilities:CapabilitiesHook"},{"line_number":35,"context_line":"    local_link_connection \u003d ironic_inspector.plugins.local_link_connection:GenericLocalLinkConnectionHook"},{"line_number":36,"context_line":"    lldp_basic \u003d ironic_inspector.plugins.lldp_basic:LLDPBasicProcessingHook"},{"line_number":37,"context_line":"    pci_devices \u003d ironic_inspector.plugins.pci_devices:PciDevicesHook"},{"line_number":38,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":39,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"}],"source_content_type":"text/x-ttcn-cfg","patch_set":13,"id":"ba5201f7_78207c4a","line":36,"range":{"start_line":36,"start_character":3,"end_line":36,"end_character":76},"updated":"2016-12-30 13:04:09.000000000","message":"We already have local_link_connection \u003d GenericLocalLinkConnectionHook plugin, we need to think about better name here","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":21909,"name":"Bob Fournier","email":"bfournie@redhat.com","username":"bfournie"},"change_message_id":"1722abce0e4f0b55d2bb61b54c16e12c5a67a285","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    raid_device \u003d ironic_inspector.plugins.raid_device:RaidDeviceDetection"},{"line_number":34,"context_line":"    capabilities \u003d ironic_inspector.plugins.capabilities:CapabilitiesHook"},{"line_number":35,"context_line":"    local_link_connection \u003d ironic_inspector.plugins.local_link_connection:GenericLocalLinkConnectionHook"},{"line_number":36,"context_line":"    lldp_basic \u003d ironic_inspector.plugins.lldp_basic:LLDPBasicProcessingHook"},{"line_number":37,"context_line":"    pci_devices \u003d ironic_inspector.plugins.pci_devices:PciDevicesHook"},{"line_number":38,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":39,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"}],"source_content_type":"text/x-ttcn-cfg","patch_set":13,"id":"ba5201f7_e041e00c","line":36,"range":{"start_line":36,"start_character":3,"end_line":36,"end_character":76},"in_reply_to":"ba5201f7_64044417","updated":"2017-01-03 18:54:55.000000000","message":"I\u0027m open to suggestions for a name change.  Some thoughts:\nlldp_basic_mgmt\nswitch_basic_mgmt\n?","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"},{"author":{"_account_id":12398,"name":"Dan Sneddon","email":"dsneddon@redhat.com","username":"dsneddon"},"change_message_id":"1bf6d8fb0b8abafa21a731a822dcb3b3130c4ea1","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    raid_device \u003d ironic_inspector.plugins.raid_device:RaidDeviceDetection"},{"line_number":34,"context_line":"    capabilities \u003d ironic_inspector.plugins.capabilities:CapabilitiesHook"},{"line_number":35,"context_line":"    local_link_connection \u003d ironic_inspector.plugins.local_link_connection:GenericLocalLinkConnectionHook"},{"line_number":36,"context_line":"    lldp_basic \u003d ironic_inspector.plugins.lldp_basic:LLDPBasicProcessingHook"},{"line_number":37,"context_line":"    pci_devices \u003d ironic_inspector.plugins.pci_devices:PciDevicesHook"},{"line_number":38,"context_line":"ironic_inspector.hooks.node_not_found \u003d"},{"line_number":39,"context_line":"    example \u003d ironic_inspector.plugins.example:example_not_found_hook"}],"source_content_type":"text/x-ttcn-cfg","patch_set":13,"id":"ba5201f7_64044417","line":36,"range":{"start_line":36,"start_character":3,"end_line":36,"end_character":76},"in_reply_to":"ba5201f7_78207c4a","updated":"2017-01-02 16:53:50.000000000","message":"@Anton, do you have a suggestion for a better name that you would prefer?","commit_id":"742e9961a033f7b557a8cadafff28a22610fe35c"}]}
