)]}'
{"devstack/plugin.sh":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"IRONIC_INSPECTOR_BUILD_RAMDISK\u003d$(trueorfalse False IRONIC_INSPECTOR_BUILD_RAMDISK)"},{"line_number":19,"context_line":"IRONIC_AGENT_KERNEL_URL\u003d${IRONIC_AGENT_KERNEL_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz}"},{"line_number":20,"context_line":"IRONIC_AGENT_RAMDISK_URL\u003d${IRONIC_AGENT_RAMDISK_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz}"},{"line_number":21,"context_line":"IRONIC_INSPECTOR_COLLECTORS\u003d${IRONIC_INSPECTOR_COLLECTORS:-default,logs,pci-devices}"},{"line_number":22,"context_line":"IRONIC_INSPECTOR_RAMDISK_LOGDIR\u003d${IRONIC_INSPECTOR_RAMDISK_LOGDIR:-$IRONIC_INSPECTOR_DATA_DIR/ramdisk-logs}"},{"line_number":23,"context_line":"IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS\u003d${IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS:-True}"},{"line_number":24,"context_line":"IRONIC_INSPECTOR_TIMEOUT\u003d${IRONIC_INSPECTOR_TIMEOUT:-600}"}],"source_content_type":"text/x-sh","patch_set":2,"id":"9ad45d7e_a6f7e889","line":21,"range":{"start_line":21,"start_character":71,"end_line":21,"end_character":82},"updated":"2016-08-10 11:30:19.000000000","message":"this is not needed as you\u0027re adding it to the default list","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"IRONIC_INSPECTOR_BUILD_RAMDISK\u003d$(trueorfalse False IRONIC_INSPECTOR_BUILD_RAMDISK)"},{"line_number":19,"context_line":"IRONIC_AGENT_KERNEL_URL\u003d${IRONIC_AGENT_KERNEL_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz}"},{"line_number":20,"context_line":"IRONIC_AGENT_RAMDISK_URL\u003d${IRONIC_AGENT_RAMDISK_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz}"},{"line_number":21,"context_line":"IRONIC_INSPECTOR_COLLECTORS\u003d${IRONIC_INSPECTOR_COLLECTORS:-default,logs,pci-devices}"},{"line_number":22,"context_line":"IRONIC_INSPECTOR_RAMDISK_LOGDIR\u003d${IRONIC_INSPECTOR_RAMDISK_LOGDIR:-$IRONIC_INSPECTOR_DATA_DIR/ramdisk-logs}"},{"line_number":23,"context_line":"IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS\u003d${IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS:-True}"},{"line_number":24,"context_line":"IRONIC_INSPECTOR_TIMEOUT\u003d${IRONIC_INSPECTOR_TIMEOUT:-600}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"1ac06dbe_925fa6e4","line":21,"range":{"start_line":21,"start_character":72,"end_line":21,"end_character":83},"updated":"2016-08-22 11:23:00.000000000","message":"It\u0027s in default collector, so you don\u0027t need this","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"IRONIC_INSPECTOR_BUILD_RAMDISK\u003d$(trueorfalse False IRONIC_INSPECTOR_BUILD_RAMDISK)"},{"line_number":19,"context_line":"IRONIC_AGENT_KERNEL_URL\u003d${IRONIC_AGENT_KERNEL_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz}"},{"line_number":20,"context_line":"IRONIC_AGENT_RAMDISK_URL\u003d${IRONIC_AGENT_RAMDISK_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz}"},{"line_number":21,"context_line":"IRONIC_INSPECTOR_COLLECTORS\u003d${IRONIC_INSPECTOR_COLLECTORS:-default,logs,pci-devices}"},{"line_number":22,"context_line":"IRONIC_INSPECTOR_RAMDISK_LOGDIR\u003d${IRONIC_INSPECTOR_RAMDISK_LOGDIR:-$IRONIC_INSPECTOR_DATA_DIR/ramdisk-logs}"},{"line_number":23,"context_line":"IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS\u003d${IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS:-True}"},{"line_number":24,"context_line":"IRONIC_INSPECTOR_TIMEOUT\u003d${IRONIC_INSPECTOR_TIMEOUT:-600}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"1ac06dbe_474d656b","line":21,"range":{"start_line":21,"start_character":72,"end_line":21,"end_character":83},"in_reply_to":"1ac06dbe_925fa6e4","updated":"2016-08-22 13:33:13.000000000","message":"Anton, you\u0027re making the same mistake I did on one of patchsets :) This is a list of collectors, not processing hooks.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"76b720181808cfab1b4ceb5ac5bdf454e6123723","unresolved":false,"context_lines":[{"line_number":18,"context_line":"IRONIC_INSPECTOR_BUILD_RAMDISK\u003d$(trueorfalse False IRONIC_INSPECTOR_BUILD_RAMDISK)"},{"line_number":19,"context_line":"IRONIC_AGENT_KERNEL_URL\u003d${IRONIC_AGENT_KERNEL_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz}"},{"line_number":20,"context_line":"IRONIC_AGENT_RAMDISK_URL\u003d${IRONIC_AGENT_RAMDISK_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz}"},{"line_number":21,"context_line":"IRONIC_INSPECTOR_COLLECTORS\u003d${IRONIC_INSPECTOR_COLLECTORS:-default,logs,pci-devices}"},{"line_number":22,"context_line":"IRONIC_INSPECTOR_RAMDISK_LOGDIR\u003d${IRONIC_INSPECTOR_RAMDISK_LOGDIR:-$IRONIC_INSPECTOR_DATA_DIR/ramdisk-logs}"},{"line_number":23,"context_line":"IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS\u003d${IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS:-True}"},{"line_number":24,"context_line":"IRONIC_INSPECTOR_TIMEOUT\u003d${IRONIC_INSPECTOR_TIMEOUT:-600}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"1ac06dbe_be5c29ee","line":21,"range":{"start_line":21,"start_character":72,"end_line":21,"end_character":83},"in_reply_to":"1ac06dbe_925fa6e4","updated":"2016-08-22 13:56:43.000000000","message":"I have spoken with Dmitry Tantsur about that earlier, he thinks it is necessary.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"6523b4d0828aad267e45a9b44918770e8ecaab27","unresolved":false,"context_lines":[{"line_number":18,"context_line":"IRONIC_INSPECTOR_BUILD_RAMDISK\u003d$(trueorfalse False IRONIC_INSPECTOR_BUILD_RAMDISK)"},{"line_number":19,"context_line":"IRONIC_AGENT_KERNEL_URL\u003d${IRONIC_AGENT_KERNEL_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz}"},{"line_number":20,"context_line":"IRONIC_AGENT_RAMDISK_URL\u003d${IRONIC_AGENT_RAMDISK_URL:-http://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz}"},{"line_number":21,"context_line":"IRONIC_INSPECTOR_COLLECTORS\u003d${IRONIC_INSPECTOR_COLLECTORS:-default,logs,pci-devices}"},{"line_number":22,"context_line":"IRONIC_INSPECTOR_RAMDISK_LOGDIR\u003d${IRONIC_INSPECTOR_RAMDISK_LOGDIR:-$IRONIC_INSPECTOR_DATA_DIR/ramdisk-logs}"},{"line_number":23,"context_line":"IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS\u003d${IRONIC_INSPECTOR_ALWAYS_STORE_RAMDISK_LOGS:-True}"},{"line_number":24,"context_line":"IRONIC_INSPECTOR_TIMEOUT\u003d${IRONIC_INSPECTOR_TIMEOUT:-600}"}],"source_content_type":"text/x-sh","patch_set":4,"id":"1ac06dbe_da4bb585","line":21,"range":{"start_line":21,"start_character":72,"end_line":21,"end_character":83},"in_reply_to":"1ac06dbe_be5c29ee","updated":"2016-08-23 09:10:58.000000000","message":"Yep, sorry, was wrong","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"}],"doc/source/usage.rst":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"f904656346cf86e4fa49ab34e6c91bcb5834d6f3","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    gathers the list of all PCI devices returned by the ramdisk and compares to"},{"line_number":204,"context_line":"    those defined in ``alias`` field(s) from ``pci_devices`` section of"},{"line_number":205,"context_line":"    configuration file. The recognized PCI devices and their count are then"},{"line_number":206,"context_line":"    stored in node properties. This information can be later used in nova"},{"line_number":207,"context_line":"    flavors for node scheduling."},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"Here are some plugins that can be additionally enabled:"}],"source_content_type":"text/x-rst","patch_set":9,"id":"fa7ab95a_0435e8d8","line":206,"updated":"2016-09-01 12:46:10.000000000","message":"nit: s/properties/capabilities/","commit_id":"e6868927391674867b50e904422d953fa192cfb1"}],"ironic_inspector/conf.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":215,"context_line":"               default\u003d\"/etc/ironic-inspector/rootwrap.conf\","},{"line_number":216,"context_line":"               help\u003d\u0027Path to the rootwrap configuration file to use for \u0027"},{"line_number":217,"context_line":"                    \u0027running commands as root\u0027),"},{"line_number":218,"context_line":"    cfg.MultiStrOpt(\u0027pci_alias\u0027,"},{"line_number":219,"context_line":"                    default\u003d[],"},{"line_number":220,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":221,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":222,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":223,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"},{"line_number":224,"context_line":"]"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_26ce582e","line":223,"range":{"start_line":218,"start_character":0,"end_line":223,"end_character":40},"updated":"2016-08-10 11:30:19.000000000","message":"this should go to a separation section, see e.g. https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/plugins/discovery.py#L24-L38, https://github.com/openstack/ironic-inspector/blob/master/config-generator.conf#L7 and https://github.com/openstack/ironic-inspector/blob/master/setup.cfg#L60","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"}],"ironic_inspector/plugins/pci_devices.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            try:"},{"line_number":40,"context_line":"                parsed_pci_devices.append(json.loads(pci_alias_entry))"},{"line_number":41,"context_line":"            except ValueError as ex:"},{"line_number":42,"context_line":"                LOG.warning(_LW(\u0027There was en error when parsing \\\u0027pci_alias\\\u0027\u0027"},{"line_number":43,"context_line":"                                \u0027 option: %s\u0027), str(ex))"},{"line_number":44,"context_line":"        return parsed_pci_devices"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_261938d8","line":42,"range":{"start_line":42,"start_character":33,"end_line":42,"end_character":46},"updated":"2016-08-10 11:30:19.000000000","message":"s/There was en error/Error/","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                parsed_pci_devices.append(json.loads(pci_alias_entry))"},{"line_number":41,"context_line":"            except ValueError as ex:"},{"line_number":42,"context_line":"                LOG.warning(_LW(\u0027There was en error when parsing \\\u0027pci_alias\\\u0027\u0027"},{"line_number":43,"context_line":"                                \u0027 option: %s\u0027), str(ex))"},{"line_number":44,"context_line":"        return parsed_pci_devices"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_462d4cfd","line":43,"range":{"start_line":43,"start_character":48,"end_line":43,"end_character":51},"updated":"2016-08-10 11:30:19.000000000","message":"str is not needed here","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"},{"line_number":47,"context_line":"        if \u0027pci_devices\u0027 not in introspection_data:"},{"line_number":48,"context_line":"            LOG.info(_LI(\u0027No PCI devices information was received from \u0027"},{"line_number":49,"context_line":"                         \u0027the ramdisk.\u0027))"},{"line_number":50,"context_line":"            return"},{"line_number":51,"context_line":"        known_pci_devices \u003d self._parse_pci_alias_entry()"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_667050dd","line":48,"range":{"start_line":48,"start_character":16,"end_line":48,"end_character":20},"updated":"2016-08-10 11:30:19.000000000","message":"I think it deserves a warning similar to https://github.com/openstack/ironic-inspector/blob/master/ironic_inspector/plugins/capabilities.py#L70","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":50,"context_line":"            return"},{"line_number":51,"context_line":"        known_pci_devices \u003d self._parse_pci_alias_entry()"},{"line_number":52,"context_line":"        found_pci_devices \u003d introspection_data[\u0027pci_devices\u0027]"},{"line_number":53,"context_line":"        pci_devices_count \u003d {}"},{"line_number":54,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":55,"context_line":"            for known_dev in known_pci_devices:"},{"line_number":56,"context_line":"                if (known_dev[\u0027vendor_id\u0027] !\u003d found_dev[\u0027vendor_id\u0027] or"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_f1b4f835","line":53,"range":{"start_line":53,"start_character":28,"end_line":53,"end_character":30},"updated":"2016-08-10 11:30:19.000000000","message":"please use https://docs.python.org/2.7/library/collections.html#collections.Counter","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        found_pci_devices \u003d introspection_data[\u0027pci_devices\u0027]"},{"line_number":53,"context_line":"        pci_devices_count \u003d {}"},{"line_number":54,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":55,"context_line":"            for known_dev in known_pci_devices:"},{"line_number":56,"context_line":"                if (known_dev[\u0027vendor_id\u0027] !\u003d found_dev[\u0027vendor_id\u0027] or"},{"line_number":57,"context_line":"                        known_dev[\u0027product_id\u0027] !\u003d found_dev[\u0027product_id\u0027]):"},{"line_number":58,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_f146b84d","line":55,"range":{"start_line":55,"start_character":12,"end_line":55,"end_character":47},"updated":"2016-08-10 11:30:19.000000000","message":"This loop can be avoided by pre-caching known devices in a set:\n\n known_pci_devices \u003d {(d[\u0027vendor_id\u0027], d[\u0027product_id\u0027) for d in known_pci_devices}\n\nthen your check simply becomes:\n\n if (found_dev[\u0027vendor_id\u0027], found_dev[\u0027product_id\u0027]) not in known_pci_devices:\n     continue","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                                           else pci_devices_count[name] + 1)"},{"line_number":62,"context_line":"        node_info.update_properties(**pci_devices_count)"},{"line_number":63,"context_line":"        for device_key, device_value in six.iteritems(pci_devices_count):"},{"line_number":64,"context_line":"            LOG.info(_LI(\u0027Found %(dev_value)d %(dev_key)s PCI devices \u0027"},{"line_number":65,"context_line":"                         \u0027on the node.\u0027) % {\u0027dev_value\u0027: device_value,"},{"line_number":66,"context_line":"                                            \u0027dev_key\u0027: device_key})"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_869d840c","line":64,"range":{"start_line":64,"start_character":16,"end_line":64,"end_character":20},"updated":"2016-08-10 11:30:19.000000000","message":"Let\u0027s not dump all devices separately, it can get bulky. Please squash them in one message.","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        node_info.update_properties(**pci_devices_count)"},{"line_number":63,"context_line":"        for device_key, device_value in six.iteritems(pci_devices_count):"},{"line_number":64,"context_line":"            LOG.info(_LI(\u0027Found %(dev_value)d %(dev_key)s PCI devices \u0027"},{"line_number":65,"context_line":"                         \u0027on the node.\u0027) % {\u0027dev_value\u0027: device_value,"},{"line_number":66,"context_line":"                                            \u0027dev_key\u0027: device_key})"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_66a2104d","line":65,"range":{"start_line":65,"start_character":41,"end_line":65,"end_character":42},"updated":"2016-08-10 11:30:19.000000000","message":"% -\u003e ,","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"Gather and distinguish PCI devices from inventory.\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from collections import Counter"},{"line_number":17,"context_line":"import json"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_12229652","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":31},"updated":"2016-08-22 11:23:00.000000000","message":"please don\u0027t import objects, only modules","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from ironic_inspector import utils"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"PCI_DEVICES_OPTS \u003d ["},{"line_number":26,"context_line":"    cfg.MultiStrOpt(\u0027pci_alias\u0027,"},{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_47e9e513","line":26,"range":{"start_line":26,"start_character":21,"end_line":26,"end_character":25},"updated":"2016-08-22 13:33:13.000000000","message":"let\u0027s call it just aliases, we already have \"pci\" in the section name.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"PCI_DEVICES_OPTS \u003d ["},{"line_number":26,"context_line":"    cfg.MultiStrOpt(\u0027pci_alias\u0027,"},{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":30,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":31,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_f2089a2f","line":28,"range":{"start_line":28,"start_character":64,"end_line":28,"end_character":77},"updated":"2016-08-22 11:23:00.000000000","message":"we could wrap help with double quotes to avoid using escape characters","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"76b720181808cfab1b4ceb5ac5bdf454e6123723","unresolved":false,"context_lines":[{"line_number":25,"context_line":"PCI_DEVICES_OPTS \u003d ["},{"line_number":26,"context_line":"    cfg.MultiStrOpt(\u0027pci_alias\u0027,"},{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":30,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":31,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_29748566","line":28,"range":{"start_line":28,"start_character":64,"end_line":28,"end_character":77},"in_reply_to":"1ac06dbe_f2089a2f","updated":"2016-08-22 13:56:43.000000000","message":"If we wrap help with double quotes, we will still need to use escape characters in example dict, because double quotes are required in this dict.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":30,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":31,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_f5c6c447","line":31,"range":{"start_line":30,"start_character":25,"end_line":31,"end_character":38},"updated":"2016-08-22 11:23:00.000000000","message":"should it be the list of dict?","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"76b720181808cfab1b4ceb5ac5bdf454e6123723","unresolved":false,"context_lines":[{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":30,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":31,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"},{"line_number":32,"context_line":"]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_de0da591","line":31,"range":{"start_line":30,"start_character":25,"end_line":31,"end_character":38},"in_reply_to":"1ac06dbe_f5c6c447","updated":"2016-08-22 13:56:43.000000000","message":"According to http://specs.openstack.org/openstack/ironic-inspector-specs/specs/generic-pci-resource.html it is correct, as we are following the nova PCI alias configuration.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                parsed_pci_devices.append(json.loads(pci_alias_entry))"},{"line_number":57,"context_line":"            except ValueError as ex:"},{"line_number":58,"context_line":"                LOG.warning(_LW(\u0027s/There was an error/Error/ when parsing \u0027"},{"line_number":59,"context_line":"                                \u0027\\\u0027pci_alias\\\u0027 option: %s\u0027), ex)"},{"line_number":60,"context_line":"        return parsed_pci_devices"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_9575d099","line":59,"range":{"start_line":58,"start_character":16,"end_line":59,"end_character":64},"updated":"2016-08-22 11:23:00.000000000","message":"Why does this warning? Looks like error should be here. Also ditto about double quotes.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                parsed_pci_devices.append(json.loads(pci_alias_entry))"},{"line_number":57,"context_line":"            except ValueError as ex:"},{"line_number":58,"context_line":"                LOG.warning(_LW(\u0027s/There was an error/Error/ when parsing \u0027"},{"line_number":59,"context_line":"                                \u0027\\\u0027pci_alias\\\u0027 option: %s\u0027), ex)"},{"line_number":60,"context_line":"        return parsed_pci_devices"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_e76451e6","line":59,"range":{"start_line":58,"start_character":16,"end_line":59,"end_character":64},"in_reply_to":"1ac06dbe_9575d099","updated":"2016-08-22 13:33:13.000000000","message":"+1 for error","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"},{"line_number":70,"context_line":"        if \u0027pci_devices\u0027 not in introspection_data:"},{"line_number":71,"context_line":"            LOG.warning(_LW(\u0027No PCI devices information was received from \u0027"},{"line_number":72,"context_line":"                            \u0027the ramdisk.\u0027))"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":"        pci_devices_count \u003d dict()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_87eabd0d","line":71,"range":{"start_line":71,"start_character":16,"end_line":71,"end_character":23},"updated":"2016-08-22 13:33:13.000000000","message":"As pci-devices is not in the default *collectors* list, but this hook is enabled by default. Let us only issue this warning if CONF.pci_devices.aliases is not empty.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                            \u0027the ramdisk.\u0027))"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":"        pci_devices_count \u003d dict()"},{"line_number":75,"context_line":"        known_pci_devices \u003d {(d[\u0027vendor_id\u0027], d[\u0027product_id\u0027]): d"},{"line_number":76,"context_line":"                             for d in self._parse_pci_alias_entry()}"},{"line_number":77,"context_line":"        found_pci_devices \u003d self._found_pci_devices_for_comparison("},{"line_number":78,"context_line":"            introspection_data[\u0027pci_devices\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_78cbe91e","line":75,"range":{"start_line":75,"start_character":30,"end_line":75,"end_character":65},"updated":"2016-08-22 11:23:00.000000000","message":"We need to verify that vendor_id and product_id are provided and fail with appropriate error instead of KeyError","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        found_pci_devices \u003d self._found_pci_devices_for_comparison("},{"line_number":78,"context_line":"            introspection_data[\u0027pci_devices\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for found_dev in found_pci_devices.keys():"},{"line_number":81,"context_line":"            if found_dev not in known_pci_devices.keys():"},{"line_number":82,"context_line":"                continue"},{"line_number":83,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_b880c147","line":80,"range":{"start_line":80,"start_character":43,"end_line":80,"end_character":50},"updated":"2016-08-22 11:23:00.000000000","message":"nit: you don\u0027t need keys here, for will iterate over keys by default","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            introspection_data[\u0027pci_devices\u0027])"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for found_dev in found_pci_devices.keys():"},{"line_number":81,"context_line":"            if found_dev not in known_pci_devices.keys():"},{"line_number":82,"context_line":"                continue"},{"line_number":83,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"},{"line_number":84,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_67d4e146","line":81,"range":{"start_line":81,"start_character":49,"end_line":81,"end_character":56},"updated":"2016-08-22 13:33:13.000000000","message":"ditto about keys","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for found_dev in found_pci_devices.keys():"},{"line_number":81,"context_line":"            if found_dev not in known_pci_devices.keys():"},{"line_number":82,"context_line":"                continue"},{"line_number":83,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"},{"line_number":84,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_d542a80f","line":82,"range":{"start_line":82,"start_character":16,"end_line":82,"end_character":24},"updated":"2016-08-22 11:23:00.000000000","message":"Maybe log with not known devices?","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"76b720181808cfab1b4ceb5ac5bdf454e6123723","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        for found_dev in found_pci_devices.keys():"},{"line_number":81,"context_line":"            if found_dev not in known_pci_devices.keys():"},{"line_number":82,"context_line":"                continue"},{"line_number":83,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"},{"line_number":84,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_a919958a","line":82,"range":{"start_line":82,"start_character":16,"end_line":82,"end_character":24},"in_reply_to":"1ac06dbe_d542a80f","updated":"2016-08-22 13:56:43.000000000","message":"The IPA will expose all found PCI devices located in /sys/bus/pci/devices , so this can cause a ton of logs, which is IMO not needed for the user.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1bef5b4b42820dbcc7609c5761ea989848db895a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                parsed_entry \u003d json.loads(pci_alias_entry)"},{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_68b3f7e9","line":58,"updated":"2016-08-22 20:21:44.000000000","message":"viewkeys() is not compatible with Python 3. this should be:\n\n if set(parsed_entry) !\u003d ...","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"29ba5a6efdec10ce443a222e5fc35c21a58bf58a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                parsed_entry \u003d json.loads(pci_alias_entry)"},{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_ba37d9fd","line":58,"in_reply_to":"1ac06dbe_68b3f7e9","updated":"2016-08-23 09:18:20.000000000","message":"+1","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1bef5b4b42820dbcc7609c5761ea989848db895a","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                parsed_entry \u003d json.loads(pci_alias_entry)"},{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_c8ccab6c","line":59,"updated":"2016-08-22 20:21:44.000000000","message":"it\u0027s not called just alias, not pci_alias","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1bef5b4b42820dbcc7609c5761ea989848db895a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"s/There was an error/Error/ when parsing\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_a8c96f5b","line":60,"updated":"2016-08-22 20:21:44.000000000","message":"please wrap error string in _() for i18n to be possible for it","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"301b0913dc49341a3d6085272e2688fb9e70b69f","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"s/There was an error/Error/ when parsing\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_bad6b94c","line":60,"in_reply_to":"1ac06dbe_a8c96f5b","updated":"2016-08-23 08:03:32.000000000","message":"This error message will be appended to the other one in the except clause, which is already wrapped in _LE()","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"423451127c34ad914503eef2190dd3ed2a52c8dd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"s/There was an error/Error/ when parsing\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_e0d1a458","line":60,"in_reply_to":"1ac06dbe_bad6b94c","updated":"2016-08-23 08:41:13.000000000","message":"Yes, but it does not change anything: this string has to be localized as well, so it must be wrapped in _LE or _ itself.","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"29ba5a6efdec10ce443a222e5fc35c21a58bf58a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                if parsed_entry.viewkeys() !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027,"},{"line_number":58,"context_line":"                                               \u0027name\u0027}:"},{"line_number":59,"context_line":"                    raise KeyError(\"The \u0027pci_alias\u0027 entry should only contain \""},{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"s/There was an error/Error/ when parsing\""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_6b28f5e2","line":60,"in_reply_to":"1ac06dbe_e0d1a458","updated":"2016-08-23 09:18:20.000000000","message":"Agree with Dmitry, Babel will extract only marked messages","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"1bef5b4b42820dbcc7609c5761ea989848db895a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                   \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 keys\")"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"s/There was an error/Error/ when parsing\""},{"line_number":64,"context_line":"                              \" \u0027pci_alias\u0027 option: %s\"), ex)"},{"line_number":65,"context_line":"        return parsed_pci_devices"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1ac06dbe_08c36339","line":63,"updated":"2016-08-22 20:21:44.000000000","message":"I think you understood some comment a bit too literally :) the correct text should start with \"Error parsing\" (when is not needed too)","commit_id":"7fbdf639d1b50731daa6a7c3e4f657583edc1813"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        That information can be later used by nova for node scheduling."},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _parse_pci_alias_entry(self):"},{"line_number":53,"context_line":"        parsed_pci_devices \u003d []"},{"line_number":54,"context_line":"        for pci_alias_entry in CONF.pci_devices.alias:"},{"line_number":55,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_0cc9e979","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":30},"updated":"2016-08-25 13:40:28.000000000","message":"This feels like it should be performed only once ( load-time) and possibly saved in a class-level attribute rather than recomputing it for every introspection.\n\nMoreover, it should return an id_pair -\u003e alias mapping instead of list of dicts as it is used this way only\n\nLet\u0027s bump it out of the class and set a class-level `aliases` attribute load-time.","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            try:"},{"line_number":56,"context_line":"                parsed_entry \u003d json.loads(pci_alias_entry)"},{"line_number":57,"context_line":"                if set(parsed_entry) !\u003d {\u0027vendor_id\u0027, \u0027product_id\u0027, \u0027name\u0027}:"},{"line_number":58,"context_line":"                    raise KeyError(_LE(\"The \u0027alias\u0027 entry should only contain \""},{"line_number":59,"context_line":"                                       \"\u0027vendor_id\u0027, \u0027product_id\u0027 and \u0027name\u0027 \""},{"line_number":60,"context_line":"                                       \"keys\"))"},{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_a039bea5","line":58,"range":{"start_line":58,"start_character":65,"end_line":58,"end_character":69},"updated":"2016-08-25 13:40:28.000000000","message":"Nit: s/only contain/contain exactly","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":61,"context_line":"                parsed_pci_devices.append(parsed_entry)"},{"line_number":62,"context_line":"            except (ValueError, KeyError) as ex:"},{"line_number":63,"context_line":"                LOG.error(_LE(\"Error parsing \u0027alias\u0027 option: %s\"), ex)"},{"line_number":64,"context_line":"        return parsed_pci_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"},{"line_number":67,"context_line":"        found_pci_devices_count \u003d collections.Counter()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_e60469c7","line":64,"range":{"start_line":64,"start_character":15,"end_line":64,"end_character":33},"updated":"2016-08-25 13:40:28.000000000","message":"return {(dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027]): dev[\u0027name\u0027] \\\n            for dev in parsed_pci_devices}","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                LOG.error(_LE(\"Error parsing \u0027alias\u0027 option: %s\"), ex)"},{"line_number":64,"context_line":"        return parsed_pci_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"},{"line_number":67,"context_line":"        found_pci_devices_count \u003d collections.Counter()"},{"line_number":68,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":69,"context_line":"            found_pci_devices_count["}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_d2f5a8ed","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":41},"updated":"2016-08-25 13:40:28.000000000","message":"this method should return the count already filtered:\n\n    def _found_pci_devices_count(self, found_pci_devices):\n        return collections.Counter([\n            (dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027]) for dev in \\\n                found_pci_devices if (dev[\u0027vendor_id\u0027],\n                                      dev[\u0027product_id\u0027] in \\\n                                    self.aliases])])","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"ce0a292e22d11743eebf94b97cb19e33e67abfdd","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                LOG.error(_LE(\"Error parsing \u0027alias\u0027 option: %s\"), ex)"},{"line_number":64,"context_line":"        return parsed_pci_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"},{"line_number":67,"context_line":"        found_pci_devices_count \u003d collections.Counter()"},{"line_number":68,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":69,"context_line":"            found_pci_devices_count["}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_27bc4aba","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":41},"in_reply_to":"1ac06dbe_d2f5a8ed","updated":"2016-08-30 12:24:08.000000000","message":"I see here a little typo at the end of code in if statement. It should be: if (dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027]) in self.aliases","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"190f00330023778c25f89d36c947a75e7f7c63e1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                LOG.error(_LE(\"Error parsing \u0027alias\u0027 option: %s\"), ex)"},{"line_number":64,"context_line":"        return parsed_pci_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def _found_pci_devices_for_comparison(self, found_pci_devices):"},{"line_number":67,"context_line":"        found_pci_devices_count \u003d collections.Counter()"},{"line_number":68,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":69,"context_line":"            found_pci_devices_count["}],"source_content_type":"text/x-python","patch_set":6,"id":"fa7ab95a_ad703b73","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":41},"in_reply_to":"fa7ab95a_27bc4aba","updated":"2016-08-30 12:37:50.000000000","message":"True, I\u0027ve written it from the top of my head, sorry :)","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":69,"context_line":"            found_pci_devices_count["},{"line_number":70,"context_line":"                (found_dev[\u0027vendor_id\u0027], found_dev[\u0027product_id\u0027])] +\u003d 1"},{"line_number":71,"context_line":"        return dict(found_pci_devices_count)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def before_update(self, introspection_data, node_info, **kwargs):"},{"line_number":74,"context_line":"        if \u0027pci_devices\u0027 not in introspection_data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_f2c9c4ad","line":71,"range":{"start_line":71,"start_character":15,"end_line":71,"end_character":19},"updated":"2016-08-25 13:40:28.000000000","message":"why is this needed? Counter is a dict-like object","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                            \u0027the ramdisk.\u0027))"},{"line_number":78,"context_line":"            return"},{"line_number":79,"context_line":"        pci_devices_count \u003d dict()"},{"line_number":80,"context_line":"        known_pci_devices \u003d {(d[\u0027vendor_id\u0027], d[\u0027product_id\u0027]): d"},{"line_number":81,"context_line":"                             for d in self._parse_pci_alias_entry()}"},{"line_number":82,"context_line":"        found_pci_devices \u003d self._found_pci_devices_for_comparison("},{"line_number":83,"context_line":"            introspection_data[\u0027pci_devices\u0027])"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_892f8687","line":81,"range":{"start_line":80,"start_character":8,"end_line":81,"end_character":68},"updated":"2016-08-25 13:40:28.000000000","message":"this should be replaced by self.aliases, a mapping from parsed id_pairs to alias names.","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        pci_devices_count \u003d dict()"},{"line_number":80,"context_line":"        known_pci_devices \u003d {(d[\u0027vendor_id\u0027], d[\u0027product_id\u0027]): d"},{"line_number":81,"context_line":"                             for d in self._parse_pci_alias_entry()}"},{"line_number":82,"context_line":"        found_pci_devices \u003d self._found_pci_devices_for_comparison("},{"line_number":83,"context_line":"            introspection_data[\u0027pci_devices\u0027])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        for found_dev in found_pci_devices:"},{"line_number":86,"context_line":"            if found_dev not in known_pci_devices:"},{"line_number":87,"context_line":"                continue"},{"line_number":88,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"},{"line_number":89,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if pci_devices_count:"},{"line_number":92,"context_line":"            node_info.update_properties(**pci_devices_count)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_a9bec2fc","line":89,"range":{"start_line":82,"start_character":1,"end_line":89,"end_character":71},"updated":"2016-08-25 13:40:28.000000000","message":"How about making this a comprehension:\n\n   alias_count \u003d {self.alias[id_pair]: count \\\n                    for id_pair, count in \\\n                    self._found_pci_devices_count().items()}","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            pci_alias \u003d known_pci_devices[found_dev][\u0027name\u0027]"},{"line_number":89,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if pci_devices_count:"},{"line_number":92,"context_line":"            node_info.update_properties(**pci_devices_count)"},{"line_number":93,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":94,"context_line":"                     str(pci_devices_count))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_89eca6f4","line":91,"range":{"start_line":91,"start_character":11,"end_line":91,"end_character":28},"updated":"2016-08-25 13:40:28.000000000","message":"s/pci_devices_count/alias_count/","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            pci_devices_count[pci_alias] \u003d found_pci_devices[found_dev]"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        if pci_devices_count:"},{"line_number":92,"context_line":"            node_info.update_properties(**pci_devices_count)"},{"line_number":93,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":94,"context_line":"                     str(pci_devices_count))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_49e2ae02","line":92,"range":{"start_line":92,"start_character":42,"end_line":92,"end_character":59},"updated":"2016-08-25 13:40:28.000000000","message":"s/pci_devices_count/alias_count/","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"2a436328911fa3191a753785bf84b86b9d47e427","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        if pci_devices_count:"},{"line_number":92,"context_line":"            node_info.update_properties(**pci_devices_count)"},{"line_number":93,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":94,"context_line":"                     str(pci_devices_count))"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ac06dbe_a99fe25d","line":94,"range":{"start_line":94,"start_character":25,"end_line":94,"end_character":42},"updated":"2016-08-25 13:40:28.000000000","message":"s/pci_devices_count/alias_count/","commit_id":"ba90048a84b596df07c36199a28bdbb85f434d38"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"67b7f964084f7ed34d4d804248649920287f0ba8","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        That information can be later used by nova for node scheduling."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self):"},{"line_number":69,"context_line":"        self.aliases \u003d _parse_pci_alias_entry()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _found_pci_devices_count(self, found_pci_devices):"},{"line_number":72,"context_line":"        return collections.Counter([(dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_24619da9","line":69,"range":{"start_line":68,"start_character":1,"end_line":69,"end_character":47},"updated":"2016-08-30 16:45:49.000000000","message":"please, correct me if I\u0027m wrong, but to avoid having to parse the config file for each introspection this has to be replaced with (a class-level attribute):\n\n    aliases \u003d _parse_pci_alias_entry()","commit_id":"3b175f9b8ee398b84b183c968c67c42c9ae5f82b"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"21f1f43c1748ef1a4ef52295a589ebc87dec3499","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        That information can be later used by nova for node scheduling."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def __init__(self):"},{"line_number":69,"context_line":"        self.aliases \u003d _parse_pci_alias_entry()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def _found_pci_devices_count(self, found_pci_devices):"},{"line_number":72,"context_line":"        return collections.Counter([(dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa7ab95a_d316c8f0","line":69,"range":{"start_line":68,"start_character":1,"end_line":69,"end_character":47},"in_reply_to":"fa7ab95a_24619da9","updated":"2016-08-31 08:09:47.000000000","message":"good point","commit_id":"3b175f9b8ee398b84b183c968c67c42c9ae5f82b"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"f190a206a7abb91c6af2229103418ed26db48fff","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        That information can be later used by nova for node scheduling."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    aliases \u003d _parse_pci_alias_entry()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _found_pci_devices_count(self, found_pci_devices):"},{"line_number":70,"context_line":"        return collections.Counter([(dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_f95e4d78","line":67,"range":{"start_line":67,"start_character":4,"end_line":67,"end_character":38},"updated":"2016-08-31 12:05:01.000000000","message":"My two cents, I think we must keep in mind that in future we may support SIGHUP handling, and this will cause issue, non blocking for now","commit_id":"ec2afda61469afd167650956de308797d847c063"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"8d6c2ebc710ac2128461d9c3d85149d0f1818f49","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        That information can be later used by nova for node scheduling."},{"line_number":66,"context_line":"    \"\"\""},{"line_number":67,"context_line":"    aliases \u003d _parse_pci_alias_entry()"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _found_pci_devices_count(self, found_pci_devices):"},{"line_number":70,"context_line":"        return collections.Counter([(dev[\u0027vendor_id\u0027], dev[\u0027product_id\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_24e23aa0","line":67,"range":{"start_line":67,"start_character":4,"end_line":67,"end_character":38},"in_reply_to":"fa7ab95a_f95e4d78","updated":"2016-08-31 12:10:35.000000000","message":"yeah, valid point. We will have to have some sort of a module or a class-level callback that will reload the config in that case:\n\n    @classmethod\n    def HUP_handler(cls):\n        PciDevicesHook.aliases \u003d _parse_pci_alias_entry()","commit_id":"ec2afda61469afd167650956de308797d847c063"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9d882cb134c771fad7790d021505c42bb8324cb4","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       self._found_pci_devices_count("},{"line_number":83,"context_line":"                           introspection_data[\u0027pci_devices\u0027]).items()}"},{"line_number":84,"context_line":"        if alias_count:"},{"line_number":85,"context_line":"            node_info.update_properties(**alias_count)"},{"line_number":86,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":87,"context_line":"                     str(alias_count))"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_75030010","line":85,"updated":"2016-08-31 15:44:40.000000000","message":"this should be update_capabilities, otherwise you won\u0027t get the scheduling effect you expect","commit_id":"ec2afda61469afd167650956de308797d847c063"},{"author":{"_account_id":18653,"name":"Milan Kováčik","email":"mkovacik@redhat.com","username":"dparalen"},"change_message_id":"e2eef363151f4e754831d66504deb9b1e140aceb","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                       self._found_pci_devices_count("},{"line_number":83,"context_line":"                           introspection_data[\u0027pci_devices\u0027]).items()}"},{"line_number":84,"context_line":"        if alias_count:"},{"line_number":85,"context_line":"            node_info.update_properties(**alias_count)"},{"line_number":86,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":87,"context_line":"                     str(alias_count))"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_668d147b","line":85,"in_reply_to":"fa7ab95a_75030010","updated":"2016-08-31 16:18:39.000000000","message":"hmmm, didn\u0027t realize this","commit_id":"ec2afda61469afd167650956de308797d847c063"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9d882cb134c771fad7790d021505c42bb8324cb4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        if alias_count:"},{"line_number":85,"context_line":"            node_info.update_properties(**alias_count)"},{"line_number":86,"context_line":"            LOG.info(_LI(\u0027Found the following PCI devices: %s\u0027),"},{"line_number":87,"context_line":"                     str(alias_count))"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa7ab95a_80fe8003","line":87,"updated":"2016-08-31 15:44:40.000000000","message":"str is not needed here","commit_id":"ec2afda61469afd167650956de308797d847c063"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"44e20d38cb3e44afbc317f493b4401fe8d11dd44","unresolved":false,"context_lines":[{"line_number":25,"context_line":"PCI_DEVICES_OPTS \u003d ["},{"line_number":26,"context_line":"    cfg.MultiStrOpt(\u0027alias\u0027,"},{"line_number":27,"context_line":"                    default\u003d[],"},{"line_number":28,"context_line":"                    help\u003d\u0027An alias for PCI device identified by \\\u0027vendor_id\\\u0027 \u0027"},{"line_number":29,"context_line":"                         \u0027and \\\u0027product_id\\\u0027 fields. Format: \u0027"},{"line_number":30,"context_line":"                         \u0027{\"vendor_id\": \"1234\", \"product_id\": \"5678\", \"name\": \u0027"},{"line_number":31,"context_line":"                         \u0027\"pci_dev1\"}\u0027),"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a89bdaa_8f277811","line":28,"updated":"2016-09-06 11:11:19.000000000","message":"help should be wrapped by translation marker.","commit_id":"e6868927391674867b50e904422d953fa192cfb1"}],"ironic_inspector/test/unit/test_plugins_pci_devices.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"75f342d70bf2b6936966f889fd76ba494e46fc9d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"class TestPciDevicesHook(test_base.NodeTest):"},{"line_number":22,"context_line":"    hook \u003d pci_devices.PciDevicesHook()"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    @mock.patch(\u0027ironic_inspector.plugins.pci_devices.CONF\u0027)"},{"line_number":25,"context_line":"    def test_parse_pci_alias_entry(self, mock_oslo_conf):"},{"line_number":26,"context_line":"        mock_oslo_conf.pci_alias \u003d [\u0027{\"foo1\": \"bar1\", \"foo2\": \"bar2\"}\u0027,"},{"line_number":27,"context_line":"                                    \u0027{\"foo1\": \"bar3\", \"foo2\": \"bar4\"}\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ad45d7e_717f6866","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":60},"updated":"2016-08-10 11:30:19.000000000","message":"there is no need to patch CONF, please use CONF.set_override instead (see other unit tests)","commit_id":"863497031b21588f86b1b62222e3850d297c37f2"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        pci_alias \u003d [\u0027{\"foo1\": \"bar1\", \"foo2\": \"bar2\"}\u0027,"},{"line_number":27,"context_line":"                     \u0027{\"foo1\": \"bar3\", \"foo2\": \"bar4\"}\u0027]"},{"line_number":28,"context_line":"        base.CONF.set_override(\u0027pci_alias\u0027, pci_alias, \u0027pci_devices\u0027)"},{"line_number":29,"context_line":"        valid_pci_alias \u003d [{\"foo1\": \"bar1\", \"foo2\": \"bar2\"},"},{"line_number":30,"context_line":"                           {\"foo1\": \"bar3\", \"foo2\": \"bar4\"}]"},{"line_number":31,"context_line":"        parsed_pci_alias \u003d self.hook._parse_pci_alias_entry()"},{"line_number":32,"context_line":"        self.assertListEqual(valid_pci_alias, parsed_pci_alias)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_38e211a0","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":60},"updated":"2016-08-22 11:23:00.000000000","message":"nit: use pci_alias","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":19213,"name":"Szymon Borkowski","email":"szymon.borkowski@intel.com","username":"sborkows"},"change_message_id":"76b720181808cfab1b4ceb5ac5bdf454e6123723","unresolved":false,"context_lines":[{"line_number":26,"context_line":"        pci_alias \u003d [\u0027{\"foo1\": \"bar1\", \"foo2\": \"bar2\"}\u0027,"},{"line_number":27,"context_line":"                     \u0027{\"foo1\": \"bar3\", \"foo2\": \"bar4\"}\u0027]"},{"line_number":28,"context_line":"        base.CONF.set_override(\u0027pci_alias\u0027, pci_alias, \u0027pci_devices\u0027)"},{"line_number":29,"context_line":"        valid_pci_alias \u003d [{\"foo1\": \"bar1\", \"foo2\": \"bar2\"},"},{"line_number":30,"context_line":"                           {\"foo1\": \"bar3\", \"foo2\": \"bar4\"}]"},{"line_number":31,"context_line":"        parsed_pci_alias \u003d self.hook._parse_pci_alias_entry()"},{"line_number":32,"context_line":"        self.assertListEqual(valid_pci_alias, parsed_pci_alias)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_e2c6ff47","line":30,"range":{"start_line":29,"start_character":0,"end_line":30,"end_character":60},"in_reply_to":"1ac06dbe_38e211a0","updated":"2016-08-22 13:56:43.000000000","message":"\u0027pci_alias\u0027 refers to configuration entry in config file and it is a list of strings, when \u0027valid_pci_alias\u0027 is a list of dicts already parsed. However, the second name may be not precise, I will refactor it.","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"}],"releasenotes/notes/pci_devices-plugin-5b93196e0e973155.yaml":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds new PCI devices plugin named \"pci_devices\"."},{"line_number":4,"context_line":"    This plugin is able to recognize and distinguish PCI "},{"line_number":5,"context_line":"    devices returned by Ironic Python Agent. These devices"},{"line_number":6,"context_line":"    are matched to those defined in \"pci_alias\" option in "}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1ac06dbe_a713790c","line":3,"range":{"start_line":3,"start_character":4,"end_line":3,"end_character":31},"updated":"2016-08-22 13:33:13.000000000","message":"\"Add new processing hook pci_devices for setting node capabilities based on PCI devices present on a node and rules in the [pci_devices]aliases configuration option. Requires \"pci-devices\" collector to be enabled in IPA.\"","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Adds new PCI devices plugin named \"pci_devices\"."},{"line_number":4,"context_line":"    This plugin is able to recognize and distinguish PCI "},{"line_number":5,"context_line":"    devices returned by Ironic Python Agent. These devices"},{"line_number":6,"context_line":"    are matched to those defined in \"pci_alias\" option in "},{"line_number":7,"context_line":"    \"pci_devices\" group of configuration file. Matched "}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1ac06dbe_38f9714e","line":4,"range":{"start_line":4,"start_character":56,"end_line":4,"end_character":57},"updated":"2016-08-22 11:23:00.000000000","message":"please remove trailing spaces","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"b0b13fa7bfed0dee4e25c10d2c847e4d66a154e4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    \"pci_devices\" group of configuration file. Matched "},{"line_number":8,"context_line":"    PCI devices are then registered in node properties and"},{"line_number":9,"context_line":"    later can be used by nova flavors for scheduling."},{"line_number":10,"context_line":"fixes:"},{"line_number":11,"context_line":"  - https://bugs.launchpad.net/ironic-inspector/+bug/1580893"},{"line_number":12,"context_line":"    Generic PCI Resource"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1ac06dbe_f87359e5","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":6},"updated":"2016-08-22 11:23:00.000000000","message":"We can down fixes tag here, imo features is enough","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"784cf56cd2bcf30b69d2a7ef6473ee9ac413486c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    \"pci_devices\" group of configuration file. Matched "},{"line_number":8,"context_line":"    PCI devices are then registered in node properties and"},{"line_number":9,"context_line":"    later can be used by nova flavors for scheduling."},{"line_number":10,"context_line":"fixes:"},{"line_number":11,"context_line":"  - https://bugs.launchpad.net/ironic-inspector/+bug/1580893"},{"line_number":12,"context_line":"    Generic PCI Resource"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"1ac06dbe_c742f50f","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":6},"in_reply_to":"1ac06dbe_f87359e5","updated":"2016-08-22 13:33:13.000000000","message":"+1","commit_id":"a17d2bccde502c76288fb0b5e25dfa493761a71a"}]}
