)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e51c3051a71b329182c45ee8156b505a1703baac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"45007393_f8fae288","updated":"2022-07-11 11:55:42.000000000","message":"in general this looks good form a functionality point of view but as we are lookign at more attributes of the pcidevice spec i more conviced that we shoudl be actully adding the traits and resouce class as properites or the object os -1 until you have time to digest that feedbac and respond.\n\ndid i overlook why you did not add them as properties?","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bdbce4aa58cc58d1b53d81a550eeeaa900926cef","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"14c99466_a798e0f9","updated":"2022-08-19 12:11:24.000000000","message":"(I realize Sean has some TODOs they\u0027d like to see here but they can be done in a follow-up IMO)","commit_id":"c846f08d8e9d1df99e7f9a5a6168a40f7a24c5c6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dcdb0eb174eca44b640b5709c68f90a94850ee8c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"8f03fd72_652d41ec","updated":"2022-08-19 12:10:55.000000000","message":"Nice work","commit_id":"c846f08d8e9d1df99e7f9a5a6168a40f7a24c5c6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8b2b777f197f746bc3413cc95aba4d327cd2b99b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"66121013_8bbb55e7","updated":"2022-08-25 19:08:26.000000000","message":"recheck parent landed","commit_id":"27220389467273a966d2991244dbc4473ea82b53"}],"nova/compute/pci_placement_translator.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e51c3051a71b329182c45ee8156b505a1703baac","unresolved":true,"context_lines":[{"line_number":78,"context_line":"    return set(_normalize_traits(traits))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def _get_rc_for_dev("},{"line_number":82,"context_line":"    dev: pci_device.PciDevice,"},{"line_number":83,"context_line":"    dev_spec_tags: ty.Dict[str, str],"},{"line_number":84,"context_line":") -\u003e str:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dbf52610_e94f7625","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":19},"updated":"2022-07-11 11:55:42.000000000","message":"as noted on the previous pathch this feelse like it should be a property\non the PciDevice object espcially now sincee it slooking at the device spec tags.","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ef35686947bad6aaf7fa10308d104bf785816de","unresolved":true,"context_lines":[{"line_number":78,"context_line":"    return set(_normalize_traits(traits))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def _get_rc_for_dev("},{"line_number":82,"context_line":"    dev: pci_device.PciDevice,"},{"line_number":83,"context_line":"    dev_spec_tags: ty.Dict[str, str],"},{"line_number":84,"context_line":") -\u003e str:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fd681f1a_6eb6b329","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":19},"in_reply_to":"10fe1c45_ca76081f","updated":"2022-07-20 10:11:34.000000000","message":"no it would not when the PciDevice are constucted by the virt driver they tags would be extracted from the PciDeviceSpec and passed in to the constuctor\n\nthere woudl not be a direct depency on the PciDeviceSpec object.\n---\nlater never mind we are still using dicts not pci object when the virt driver constuct the set of pci device dicts to provide to the pci tracker.\n\nwe shoudl fix that eventually but ok for now keep it this way but it feels liek the wrong place to put this. this cution woudl be better placed in the in one of the submodules of the pci module IMO.\n\ncan you add a TODO or NOTE that we shoudl look at cleanign this up later.","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"31e7b70d23c12cb2686fb498411c8c26cd2f4d40","unresolved":true,"context_lines":[{"line_number":78,"context_line":"    return set(_normalize_traits(traits))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def _get_rc_for_dev("},{"line_number":82,"context_line":"    dev: pci_device.PciDevice,"},{"line_number":83,"context_line":"    dev_spec_tags: ty.Dict[str, str],"},{"line_number":84,"context_line":") -\u003e str:"}],"source_content_type":"text/x-python","patch_set":9,"id":"10fe1c45_ca76081f","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":19},"in_reply_to":"dbf52610_e94f7625","updated":"2022-07-19 18:46:09.000000000","message":"If this is moved to the PciDevice class, then that class (or at least the new get_rc method of it) will depend on the PciDeviceSpec object. That is a new dependency that PciDevice does not have today.","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9a5196391025a23c0967490ff41b827caefb132c","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    return set(_normalize_traits(traits))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def _get_rc_for_dev("},{"line_number":82,"context_line":"    dev: pci_device.PciDevice,"},{"line_number":83,"context_line":"    dev_spec_tags: ty.Dict[str, str],"},{"line_number":84,"context_line":") -\u003e str:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ce8d9fb_6f1e7f40","line":81,"range":{"start_line":81,"start_character":4,"end_line":81,"end_character":19},"in_reply_to":"fd681f1a_6eb6b329","updated":"2022-08-23 17:46:18.000000000","message":"Ack","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e51c3051a71b329182c45ee8156b505a1703baac","unresolved":true,"context_lines":[{"line_number":97,"context_line":"        rc \u003d rc.upper()"},{"line_number":98,"context_line":"        if ("},{"line_number":99,"context_line":"            rc not in os_resource_classes.STANDARDS and"},{"line_number":100,"context_line":"            not os_resource_classes.is_custom(rc)"},{"line_number":101,"context_line":"        ):"},{"line_number":102,"context_line":"            rc \u003d os_resource_classes.normalize_name(rc)"},{"line_number":103,"context_line":"            # mypy: normalize_name will return non None for non None input"},{"line_number":104,"context_line":"            assert rc"}],"source_content_type":"text/x-python","patch_set":9,"id":"16dd9fad_bbde14d9","line":101,"range":{"start_line":100,"start_character":11,"end_line":101,"end_character":10},"updated":"2022-07-11 11:55:42.000000000","message":"if you drop this check it should fix your capitalisation issue that we saw downstream on irc\n\nit shoudl be valid to do \n\n rc_1 \u003d os_resource_classes.normalize_name(rc)\n rc_2 \u003d os_resource_classes.normalize_name(rc)\n assert rc_1 \u003d\u003d rc_2\n \nso even if it has a CUSTOM_ prefix normalise should handel that\nbut it does not which is a bug in normalize in os resouce_classes.\nlooking at the code\nhttps://github.com/openstack/os-resource-classes/blob/master/os_resource_classes/__init__.py#L119\u003d\nits uncodtionally appeding the CUSTOM_NAMESPACE\nthat should be gated behind is_custom.\n\nso we can fix that in os_resouceclasses and  os trait or for now we can \nstrip the CUSTOM_ prefix\n\nthey do not this limitation\nhttps://github.com/openstack/os-resource-classes/blob/master/os_resource_classes/__init__.py#L106-L107\u003d\nbut i still think that is a bug that should be adressed even if we opt into that behavior with a new kwarg that by defult keeps the old behavior.\n\nanyway \n\ni woudl suggest doing something like this\n\n        if (\n            rc not in os_resource_classes.STANDARDS\n        ):\n        rc \u003d rc.split(\u0027CUSTOM_\u0027)[0]\n        rc \u003d os_resource_classes.normalize_name(rc)","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"31e7b70d23c12cb2686fb498411c8c26cd2f4d40","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        rc \u003d rc.upper()"},{"line_number":98,"context_line":"        if ("},{"line_number":99,"context_line":"            rc not in os_resource_classes.STANDARDS and"},{"line_number":100,"context_line":"            not os_resource_classes.is_custom(rc)"},{"line_number":101,"context_line":"        ):"},{"line_number":102,"context_line":"            rc \u003d os_resource_classes.normalize_name(rc)"},{"line_number":103,"context_line":"            # mypy: normalize_name will return non None for non None input"},{"line_number":104,"context_line":"            assert rc"}],"source_content_type":"text/x-python","patch_set":9,"id":"7861248c_d2b49683","line":101,"range":{"start_line":100,"start_character":11,"end_line":101,"end_character":10},"in_reply_to":"16dd9fad_bbde14d9","updated":"2022-07-19 18:46:09.000000000","message":"I think the bug we see in the real env was about not capitalizing the RC if it is calculated from vendor_id product_id and those containing letters. That is a missing .upper() call at L107. \n\nThe current code already handles CUSTOM_ prefixes. See the test case https://review.opendev.org/c/openstack/nova/+/846218/9/nova/tests/unit/compute/test_pci_placement_translator.py#86","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e51c3051a71b329182c45ee8156b505a1703baac","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        except KeyError:"},{"line_number":175,"context_line":"            self.rps[rp_name] \u003d PciResourceProvider(rp_name)"},{"line_number":176,"context_line":"            return self._get_rp(rp_name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _add_child("},{"line_number":179,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":180,"context_line":"    ) -\u003e None:"},{"line_number":181,"context_line":"        if not dev.parent_addr:"},{"line_number":182,"context_line":"            msg \u003d _("},{"line_number":183,"context_line":"                \"Missing parent address for PCI device s(dev)% with \""},{"line_number":184,"context_line":"                \"type s(type)s\""},{"line_number":185,"context_line":"            ) % {"},{"line_number":186,"context_line":"                \"dev\": dev.address,"},{"line_number":187,"context_line":"                \"type\": dev.dev_type,"},{"line_number":188,"context_line":"            }"},{"line_number":189,"context_line":"            raise exception.PlacementPciException(error\u003dmsg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.parent_addr)"},{"line_number":192,"context_line":"        self._get_rp(rp_name).add_child(dev, dev_spec_tags)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _add_parent("},{"line_number":195,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":196,"context_line":"    ) -\u003e None:"},{"line_number":197,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.address)"},{"line_number":198,"context_line":"        self._get_rp(rp_name).add_parent(dev, dev_spec_tags)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def add_dev("},{"line_number":201,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":202,"context_line":"    ) -\u003e None:"},{"line_number":203,"context_line":"        if dev.dev_type in PARENT_TYPES:"},{"line_number":204,"context_line":"            self._add_parent(dev, dev_spec_tags)"},{"line_number":205,"context_line":"        elif dev.dev_type in CHILD_TYPES:"},{"line_number":206,"context_line":"            self._add_child(dev, dev_spec_tags)"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            msg \u003d _("},{"line_number":209,"context_line":"                \"Unhandled PCI device type %(type)s for %(dev)s. Please \""}],"source_content_type":"text/x-python","patch_set":9,"id":"27b87cd3_b113aef5","line":206,"range":{"start_line":177,"start_character":0,"end_line":206,"end_character":47},"updated":"2022-07-11 11:55:42.000000000","message":"as you have written the api this makes sense but really the dev_spec_tags and in this case the traits/resouce class shoudl be propperties on the PCIDevice object so you should not need to change this api","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ef35686947bad6aaf7fa10308d104bf785816de","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        except KeyError:"},{"line_number":175,"context_line":"            self.rps[rp_name] \u003d PciResourceProvider(rp_name)"},{"line_number":176,"context_line":"            return self._get_rp(rp_name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _add_child("},{"line_number":179,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":180,"context_line":"    ) -\u003e None:"},{"line_number":181,"context_line":"        if not dev.parent_addr:"},{"line_number":182,"context_line":"            msg \u003d _("},{"line_number":183,"context_line":"                \"Missing parent address for PCI device s(dev)% with \""},{"line_number":184,"context_line":"                \"type s(type)s\""},{"line_number":185,"context_line":"            ) % {"},{"line_number":186,"context_line":"                \"dev\": dev.address,"},{"line_number":187,"context_line":"                \"type\": dev.dev_type,"},{"line_number":188,"context_line":"            }"},{"line_number":189,"context_line":"            raise exception.PlacementPciException(error\u003dmsg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.parent_addr)"},{"line_number":192,"context_line":"        self._get_rp(rp_name).add_child(dev, dev_spec_tags)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _add_parent("},{"line_number":195,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":196,"context_line":"    ) -\u003e None:"},{"line_number":197,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.address)"},{"line_number":198,"context_line":"        self._get_rp(rp_name).add_parent(dev, dev_spec_tags)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def add_dev("},{"line_number":201,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":202,"context_line":"    ) -\u003e None:"},{"line_number":203,"context_line":"        if dev.dev_type in PARENT_TYPES:"},{"line_number":204,"context_line":"            self._add_parent(dev, dev_spec_tags)"},{"line_number":205,"context_line":"        elif dev.dev_type in CHILD_TYPES:"},{"line_number":206,"context_line":"            self._add_child(dev, dev_spec_tags)"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            msg \u003d _("},{"line_number":209,"context_line":"                \"Unhandled PCI device type %(type)s for %(dev)s. Please \""}],"source_content_type":"text/x-python","patch_set":9,"id":"acd1a9fa_46cf8e62","line":206,"range":{"start_line":177,"start_character":0,"end_line":206,"end_character":47},"in_reply_to":"16c64148_642538da","updated":"2022-07-20 10:11:34.000000000","message":"damb it i tought we had converted https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L7931-L7987\u003d\nto return PCIDevice object already.\n\nbut its still using a json dict an that dics does not currently contain the tags form the white list since the drver should not need to parse the whitelst.\n\nso really we would need the pci tracker to suport enrichign the dict object and either converting them to the pci object which woudl then be used here if we wanted to wrap this nicely into a proerty.\n\nthat is a much bigger change then i was expecting and i agree we can defer this till after the feature is compelte.","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"31e7b70d23c12cb2686fb498411c8c26cd2f4d40","unresolved":true,"context_lines":[{"line_number":174,"context_line":"        except KeyError:"},{"line_number":175,"context_line":"            self.rps[rp_name] \u003d PciResourceProvider(rp_name)"},{"line_number":176,"context_line":"            return self._get_rp(rp_name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _add_child("},{"line_number":179,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":180,"context_line":"    ) -\u003e None:"},{"line_number":181,"context_line":"        if not dev.parent_addr:"},{"line_number":182,"context_line":"            msg \u003d _("},{"line_number":183,"context_line":"                \"Missing parent address for PCI device s(dev)% with \""},{"line_number":184,"context_line":"                \"type s(type)s\""},{"line_number":185,"context_line":"            ) % {"},{"line_number":186,"context_line":"                \"dev\": dev.address,"},{"line_number":187,"context_line":"                \"type\": dev.dev_type,"},{"line_number":188,"context_line":"            }"},{"line_number":189,"context_line":"            raise exception.PlacementPciException(error\u003dmsg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.parent_addr)"},{"line_number":192,"context_line":"        self._get_rp(rp_name).add_child(dev, dev_spec_tags)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _add_parent("},{"line_number":195,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":196,"context_line":"    ) -\u003e None:"},{"line_number":197,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.address)"},{"line_number":198,"context_line":"        self._get_rp(rp_name).add_parent(dev, dev_spec_tags)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def add_dev("},{"line_number":201,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":202,"context_line":"    ) -\u003e None:"},{"line_number":203,"context_line":"        if dev.dev_type in PARENT_TYPES:"},{"line_number":204,"context_line":"            self._add_parent(dev, dev_spec_tags)"},{"line_number":205,"context_line":"        elif dev.dev_type in CHILD_TYPES:"},{"line_number":206,"context_line":"            self._add_child(dev, dev_spec_tags)"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            msg \u003d _("},{"line_number":209,"context_line":"                \"Unhandled PCI device type %(type)s for %(dev)s. Please \""}],"source_content_type":"text/x-python","patch_set":9,"id":"16c64148_642538da","line":206,"range":{"start_line":177,"start_character":0,"end_line":206,"end_character":47},"in_reply_to":"27b87cd3_b113aef5","updated":"2022-07-19 18:46:09.000000000","message":"But today the PciDevice does not depend on PciDeviceSpec. The relationship is inverted. The PciDeviceSpec knows about the PciDevice via the PciDeviceSpec.match_pci_obj(self, pci_obj: \u0027objects.PciDevice\u0027) call. Changing this relationship probably have a wide change surface touching the legacy codepath as well. e.g.: today the value of the tags can change in the config or on the hypervisor _after_ the PciDevice is created in the DB.\n\nSo I\u0027m reluctant to make the full move as part of this work as it might create unnecessary impact around the legacy behaviors.","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9a5196391025a23c0967490ff41b827caefb132c","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        except KeyError:"},{"line_number":175,"context_line":"            self.rps[rp_name] \u003d PciResourceProvider(rp_name)"},{"line_number":176,"context_line":"            return self._get_rp(rp_name)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"    def _add_child("},{"line_number":179,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":180,"context_line":"    ) -\u003e None:"},{"line_number":181,"context_line":"        if not dev.parent_addr:"},{"line_number":182,"context_line":"            msg \u003d _("},{"line_number":183,"context_line":"                \"Missing parent address for PCI device s(dev)% with \""},{"line_number":184,"context_line":"                \"type s(type)s\""},{"line_number":185,"context_line":"            ) % {"},{"line_number":186,"context_line":"                \"dev\": dev.address,"},{"line_number":187,"context_line":"                \"type\": dev.dev_type,"},{"line_number":188,"context_line":"            }"},{"line_number":189,"context_line":"            raise exception.PlacementPciException(error\u003dmsg)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.parent_addr)"},{"line_number":192,"context_line":"        self._get_rp(rp_name).add_child(dev, dev_spec_tags)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def _add_parent("},{"line_number":195,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":196,"context_line":"    ) -\u003e None:"},{"line_number":197,"context_line":"        rp_name \u003d self._get_rp_name_for_address(dev.address)"},{"line_number":198,"context_line":"        self._get_rp(rp_name).add_parent(dev, dev_spec_tags)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    def add_dev("},{"line_number":201,"context_line":"        self, dev: pci_device.PciDevice, dev_spec_tags: ty.Dict[str, str]"},{"line_number":202,"context_line":"    ) -\u003e None:"},{"line_number":203,"context_line":"        if dev.dev_type in PARENT_TYPES:"},{"line_number":204,"context_line":"            self._add_parent(dev, dev_spec_tags)"},{"line_number":205,"context_line":"        elif dev.dev_type in CHILD_TYPES:"},{"line_number":206,"context_line":"            self._add_child(dev, dev_spec_tags)"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            msg \u003d _("},{"line_number":209,"context_line":"                \"Unhandled PCI device type %(type)s for %(dev)s. Please \""}],"source_content_type":"text/x-python","patch_set":9,"id":"c2001f99_4685b871","line":206,"range":{"start_line":177,"start_character":0,"end_line":206,"end_character":47},"in_reply_to":"acd1a9fa_46cf8e62","updated":"2022-08-23 17:46:18.000000000","message":"Ack","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"}],"nova/conf/pci.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e51c3051a71b329182c45ee8156b505a1703baac","unresolved":true,"context_lines":[{"line_number":164,"context_line":"      outside of  ``[A-Z0-9_]`` with a single \u0027_\u0027, and  prefixing the name with"},{"line_number":165,"context_line":"      ``CUSTOM_`` if not yet prefixed. The maximum allowed length of a trait"},{"line_number":166,"context_line":"      name is 255 character including the prefix."},{"line_number":167,"context_line":"      Any trait from ``traits`` can be requested from a ``[pci]alias``."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"  Valid examples are::"}],"source_content_type":"text/x-python","patch_set":9,"id":"0e1d9925_f2bc6113","line":167,"updated":"2022-07-11 11:55:42.000000000","message":"+1","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"31e7b70d23c12cb2686fb498411c8c26cd2f4d40","unresolved":false,"context_lines":[{"line_number":164,"context_line":"      outside of  ``[A-Z0-9_]`` with a single \u0027_\u0027, and  prefixing the name with"},{"line_number":165,"context_line":"      ``CUSTOM_`` if not yet prefixed. The maximum allowed length of a trait"},{"line_number":166,"context_line":"      name is 255 character including the prefix."},{"line_number":167,"context_line":"      Any trait from ``traits`` can be requested from a ``[pci]alias``."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"  Valid examples are::"}],"source_content_type":"text/x-python","patch_set":9,"id":"2941bb9c_907a174b","line":167,"in_reply_to":"0e1d9925_f2bc6113","updated":"2022-07-19 18:46:09.000000000","message":"Ack","commit_id":"784116940e1dfc3caa5cfb5f6a325bb7e9bf7ac0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9a5196391025a23c0967490ff41b827caefb132c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"      ``CUSTOM_`` if not yet prefixed. The maximum allowed length of a trait"},{"line_number":166,"context_line":"      name is 255 character including the prefix."},{"line_number":167,"context_line":"      Any trait from ``traits`` can be requested from a ``[pci]alias``."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"  Valid examples are::"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"aef0d59d_84eb3b84","line":168,"updated":"2022-08-23 17:46:18.000000000","message":"+1","commit_id":"9f2a1d0e24809580942a4a7c34a9859193a57386"}],"nova/tests/unit/compute/test_pci_placement_translator.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"9a5196391025a23c0967490ff41b827caefb132c","unresolved":true,"context_lines":[{"line_number":71,"context_line":"        (\"HW_GPU_API_VULKAN\", {\"HW_GPU_API_VULKAN\"}),"},{"line_number":72,"context_line":"        (\"CUSTOM_FOO\", {\"CUSTOM_FOO\"}),"},{"line_number":73,"context_line":"        (\"custom_bar\", {\"CUSTOM_BAR\"}),"},{"line_number":74,"context_line":"        (\"custom-bar\", {\"CUSTOM_CUSTOM_BAR\"}),"},{"line_number":75,"context_line":"        (\"CUSTOM_a\", {\"CUSTOM_A\"}),"},{"line_number":76,"context_line":"        (\"a@!#$b123X\", {\"CUSTOM_A_B123X\"}),"},{"line_number":77,"context_line":"        # Note that both trait names are normalized to the same trait"}],"source_content_type":"text/x-python","patch_set":19,"id":"a5bd7d08_6c839828","line":74,"updated":"2022-08-23 17:46:18.000000000","message":"i understand why you have done this im not sure i would have normalised it this way\n\nthis is proably the only semi serpising case.\n\nit might be nice to call this out in a doc somehwere later","commit_id":"9f2a1d0e24809580942a4a7c34a9859193a57386"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"af82de95791227b07869b3dba8916afa4f04bdba","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        (\"HW_GPU_API_VULKAN\", {\"HW_GPU_API_VULKAN\"}),"},{"line_number":72,"context_line":"        (\"CUSTOM_FOO\", {\"CUSTOM_FOO\"}),"},{"line_number":73,"context_line":"        (\"custom_bar\", {\"CUSTOM_BAR\"}),"},{"line_number":74,"context_line":"        (\"custom-bar\", {\"CUSTOM_CUSTOM_BAR\"}),"},{"line_number":75,"context_line":"        (\"CUSTOM_a\", {\"CUSTOM_A\"}),"},{"line_number":76,"context_line":"        (\"a@!#$b123X\", {\"CUSTOM_A_B123X\"}),"},{"line_number":77,"context_line":"        # Note that both trait names are normalized to the same trait"}],"source_content_type":"text/x-python","patch_set":19,"id":"f7966e7a_0534bb0c","line":74,"in_reply_to":"a5bd7d08_6c839828","updated":"2022-08-30 11:20:13.000000000","message":"This is the current config doc:\n\n    If it is\n    not a standard trait then Nova will normalize the trait name by making it\n    upper case, replacing any consecutive character outside of  ``[A-Z0-9_]``\n    with a single \u0027_\u0027, and  prefixing the name with ``CUSTOM_`` if not yet\n    prefixed.\n    \nSo it covers the case when the name is prefixed with custom- instead for custom_.","commit_id":"9f2a1d0e24809580942a4a7c34a9859193a57386"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e5369c96291ed008c1b099a8d232dc999e7c4526","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        (\"HW_GPU_API_VULKAN\", {\"HW_GPU_API_VULKAN\"}),"},{"line_number":72,"context_line":"        (\"CUSTOM_FOO\", {\"CUSTOM_FOO\"}),"},{"line_number":73,"context_line":"        (\"custom_bar\", {\"CUSTOM_BAR\"}),"},{"line_number":74,"context_line":"        (\"custom-bar\", {\"CUSTOM_CUSTOM_BAR\"}),"},{"line_number":75,"context_line":"        (\"CUSTOM_a\", {\"CUSTOM_A\"}),"},{"line_number":76,"context_line":"        (\"a@!#$b123X\", {\"CUSTOM_A_B123X\"}),"},{"line_number":77,"context_line":"        # Note that both trait names are normalized to the same trait"}],"source_content_type":"text/x-python","patch_set":19,"id":"a1af9976_23f3df4c","line":74,"in_reply_to":"f7966e7a_0534bb0c","updated":"2022-08-30 11:58:11.000000000","message":"yep that is what i understood it was covering form\n\ni just think that if you end up with CUSTOM_CUSTOM_BAR you proably did something wrong.\n\nits allowed by placment but proably not waht was intended.\n\nthe other way to do the normalisation is to upppercase everything and do replacement of chaters and then check if it starts with CUSTOM_ and append it if its not a standard trait.\n\nthat is what i would have done to aovid the CUSTOM_CUSTOM_BAR trait but that would technically be stricter then we need to be.\n\nhence why i said i understand why you did it this way t o be more relaxed and allow the CUSTOM_CUSTOM_* tratis but i would have personbly done it the otherway.\n\nas long as we document it we can do either.","commit_id":"9f2a1d0e24809580942a4a7c34a9859193a57386"}]}
