)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We would want to modify the resource class if the mdev_class option"},{"line_number":10,"context_line":"is used."},{"line_number":11,"context_line":"So, we\u0027re provide two methods for getting the supported resource"},{"line_number":12,"context_line":"classes, one for knowing which RC is used for a specific PCI ID"},{"line_number":13,"context_line":"and the other for getting all the related RCs."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9b27754f_d6382a24","line":11,"range":{"start_line":11,"start_character":4,"end_line":11,"end_character":17},"updated":"2021-08-03 14:12:27.000000000","message":"nit: we provide or we are providing","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"38853f5318aa75c0d63ddf5445c1520ea3fd86da","unresolved":true,"context_lines":[{"line_number":25252,"context_line":"        self.assertEqual({}, drvr.mdev_class_mapping)"},{"line_number":25253,"context_line":"        # Remember, we only support the VGPU resource class if we only have"},{"line_number":25254,"context_line":"        # one needed vGPU type."},{"line_number":25255,"context_line":"        self.assertEqual(set([orc.VGPU]), drvr.mdev_classes)"},{"line_number":25256,"context_line":"        # Since the operator wanted to only support one type, it\u0027s fine to not"},{"line_number":25257,"context_line":"        # provide config groups"},{"line_number":25258,"context_line":"        mock_warning.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7af6940b_ba9dd780","line":25255,"range":{"start_line":25255,"start_character":25,"end_line":25255,"end_character":40},"updated":"2021-08-06 14:17:18.000000000","message":"style nit:\n\n  {orc.VGPU}\n\ni.e. use set literals. Ditto below","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64e25605e00f5fcbaab37cd41972258cc63959a7","unresolved":false,"context_lines":[{"line_number":25252,"context_line":"        self.assertEqual({}, drvr.mdev_class_mapping)"},{"line_number":25253,"context_line":"        # Remember, we only support the VGPU resource class if we only have"},{"line_number":25254,"context_line":"        # one needed vGPU type."},{"line_number":25255,"context_line":"        self.assertEqual(set([orc.VGPU]), drvr.mdev_classes)"},{"line_number":25256,"context_line":"        # Since the operator wanted to only support one type, it\u0027s fine to not"},{"line_number":25257,"context_line":"        # provide config groups"},{"line_number":25258,"context_line":"        mock_warning.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":9,"id":"84b98135_31dfe751","line":25255,"range":{"start_line":25255,"start_character":25,"end_line":25255,"end_character":40},"in_reply_to":"7af6940b_ba9dd780","updated":"2021-08-06 14:56:56.000000000","message":"Ack","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"be7dc4bdfc67e0a10e5819f9ed403f9e16be959d","unresolved":true,"context_lines":[{"line_number":7508,"context_line":"            return"},{"line_number":7509,"context_line":"        if mdev_class \u003d\u003d \u0027vgpu\u0027:"},{"line_number":7510,"context_line":"            return orc.VGPU"},{"line_number":7511,"context_line":"        return \u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7512,"context_line":""},{"line_number":7513,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7514,"context_line":"        custom_rcs \u003d set([\u0027CUSTOM_\u0027 + mdev_class.upper()"}],"source_content_type":"text/x-python","patch_set":2,"id":"06390192_97f6ca66","line":7511,"range":{"start_line":7511,"start_character":15,"end_line":7511,"end_character":45},"updated":"2021-07-29 17:49:04.000000000","message":"orc.normalize_name(mdev_class)","commit_id":"f9d143966882eb12220c19aa3ea27343921f0ab6"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6890f1aafa08bddf202718b8f453d8936553c3c0","unresolved":false,"context_lines":[{"line_number":7508,"context_line":"            return"},{"line_number":7509,"context_line":"        if mdev_class \u003d\u003d \u0027vgpu\u0027:"},{"line_number":7510,"context_line":"            return orc.VGPU"},{"line_number":7511,"context_line":"        return \u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7512,"context_line":""},{"line_number":7513,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7514,"context_line":"        custom_rcs \u003d set([\u0027CUSTOM_\u0027 + mdev_class.upper()"}],"source_content_type":"text/x-python","patch_set":2,"id":"295dbfad_e7388a70","line":7511,"range":{"start_line":7511,"start_character":15,"end_line":7511,"end_character":45},"in_reply_to":"06390192_97f6ca66","updated":"2021-08-02 13:36:31.000000000","message":"Ack","commit_id":"f9d143966882eb12220c19aa3ea27343921f0ab6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"be7dc4bdfc67e0a10e5819f9ed403f9e16be959d","unresolved":true,"context_lines":[{"line_number":7511,"context_line":"        return \u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7512,"context_line":""},{"line_number":7513,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7514,"context_line":"        custom_rcs \u003d set([\u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7515,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7516,"context_line":"        return custom_rcs.union(set([orc.VGPU]))"},{"line_number":7517,"context_line":""},{"line_number":7518,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"}],"source_content_type":"text/x-python","patch_set":2,"id":"6f01a8f6_1f4ebda5","line":7515,"range":{"start_line":7514,"start_character":25,"end_line":7515,"end_character":62},"updated":"2021-07-29 17:49:04.000000000","message":"you should be useing \n orc.normalize_name\n\nhttps://github.com/openstack/os-resource-classes/blob/145ed791d050725394dbd786a5d45600da656812/os_resource_classes/__init__.py#L94-L113\n\nas we do for pmem resouce classes here https://github.com/openstack/nova/blob/052cf963583ab7c6bbe4fcbf7bfe69f8f6733bdb/nova/scheduler/utils.py#L304\nso \n\n        custom_rcs \u003d set(orc.normalize_name(mdev_class)\n                         for mdev_class in self.mdev_classes])","commit_id":"f9d143966882eb12220c19aa3ea27343921f0ab6"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6890f1aafa08bddf202718b8f453d8936553c3c0","unresolved":false,"context_lines":[{"line_number":7511,"context_line":"        return \u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7512,"context_line":""},{"line_number":7513,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7514,"context_line":"        custom_rcs \u003d set([\u0027CUSTOM_\u0027 + mdev_class.upper()"},{"line_number":7515,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7516,"context_line":"        return custom_rcs.union(set([orc.VGPU]))"},{"line_number":7517,"context_line":""},{"line_number":7518,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"}],"source_content_type":"text/x-python","patch_set":2,"id":"c9e07738_cf570bfc","line":7515,"range":{"start_line":7514,"start_character":25,"end_line":7515,"end_character":62},"in_reply_to":"6f01a8f6_1f4ebda5","updated":"2021-08-02 13:36:31.000000000","message":"Ack","commit_id":"f9d143966882eb12220c19aa3ea27343921f0ab6"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":504,"context_line":"                vpmem_conf\u003dCONF.libvirt.pmem_namespaces)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3cc5e7e7_7fe9cf94","line":507,"updated":"2021-08-03 14:12:27.000000000","message":"this is mapping between pci addresses and vgpu type names from the config","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":504,"context_line":"                vpmem_conf\u003dCONF.libvirt.pmem_namespaces)"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"}],"source_content_type":"text/x-python","patch_set":6,"id":"8c9692e8_24b09010","line":507,"in_reply_to":"3cc5e7e7_7fe9cf94","updated":"2021-08-03 15:17:49.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"},{"line_number":511,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3acac26f_8bc3a6c7","line":508,"updated":"2021-08-03 14:12:27.000000000","message":"So this is a mapping between pci addresses and resource classes. A comment stating this would be helpful for the reader. \n\nWhy it is a defaultdict and why we are defaulting to empty string? I guess we does not support empty RC names. So this does not make much sense to me. Do you want to default the RC to to orc.VGPU instead?","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"},{"line_number":511,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"4376f634_eed3db7e","line":508,"in_reply_to":"3acac26f_8bc3a6c7","updated":"2021-08-03 15:17:49.000000000","message":"we initialize this dict at startup but you\u0027re right, we should default to orc.VGPU","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        # Handles ongoing device manipultion in libvirt where we wait for the"}],"source_content_type":"text/x-python","patch_set":6,"id":"7780aa04_88253f2b","line":509,"updated":"2021-08-03 14:12:27.000000000","message":"and this is the list of resource classes we support based on the configuration","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":506,"context_line":"        # We default to not support vGPUs unless the configuration is set."},{"line_number":507,"context_line":"        self.pgpu_type_mapping \u003d collections.defaultdict(str)"},{"line_number":508,"context_line":"        self.mdev_class_mapping \u003d collections.defaultdict(str)"},{"line_number":509,"context_line":"        self.mdev_classes \u003d set([])"},{"line_number":510,"context_line":"        self.supported_vgpu_types \u003d self._get_supported_vgpu_types()"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":"        # Handles ongoing device manipultion in libvirt where we wait for the"}],"source_content_type":"text/x-python","patch_set":6,"id":"02c7a1d5_26c7d635","line":509,"in_reply_to":"7780aa04_88253f2b","updated":"2021-08-03 15:17:49.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":7416,"context_line":"                self.mdev_class_mapping.clear()"},{"line_number":7417,"context_line":"                # Given we only have one type, we default to only support the"},{"line_number":7418,"context_line":"                # VGPU resource class."},{"line_number":7419,"context_line":"                self.mdev_classes \u003d set([orc.VGPU])"},{"line_number":7420,"context_line":"                return [first_type]"},{"line_number":7421,"context_line":"            # TODO(sbauza): Directly use the mdev_class option once we add the"},{"line_number":7422,"context_line":"            # new configuration option."}],"source_content_type":"text/x-python","patch_set":6,"id":"582a5d20_0980b5db","line":7419,"range":{"start_line":7419,"start_character":36,"end_line":7419,"end_character":41},"updated":"2021-08-03 14:12:27.000000000","message":"nit: {orc.VGPU} means the same","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":7416,"context_line":"                self.mdev_class_mapping.clear()"},{"line_number":7417,"context_line":"                # Given we only have one type, we default to only support the"},{"line_number":7418,"context_line":"                # VGPU resource class."},{"line_number":7419,"context_line":"                self.mdev_classes \u003d set([orc.VGPU])"},{"line_number":7420,"context_line":"                return [first_type]"},{"line_number":7421,"context_line":"            # TODO(sbauza): Directly use the mdev_class option once we add the"},{"line_number":7422,"context_line":"            # new configuration option."}],"source_content_type":"text/x-python","patch_set":6,"id":"ea6988bc_c9b96ec9","line":7419,"range":{"start_line":7419,"start_character":36,"end_line":7419,"end_character":41},"in_reply_to":"582a5d20_0980b5db","updated":"2021-08-03 15:17:49.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":7423,"context_line":"            mdev_class \u003d getattr(group, \u0027mdev_class\u0027, orc.VGPU)"},{"line_number":7424,"context_line":"            for device_address in group.device_addresses:"},{"line_number":7425,"context_line":"                if device_address in self.pgpu_type_mapping:"},{"line_number":7426,"context_line":"                    raise exception.InvalidLibvirtGPUConfig("},{"line_number":7427,"context_line":"                        reason\u003d\"duplicate types for PCI ID %s\" % device_address"},{"line_number":7428,"context_line":"                    )"},{"line_number":7429,"context_line":"                # Just checking whether the operator fat-fingered the address."}],"source_content_type":"text/x-python","patch_set":6,"id":"f37ce6d8_803c5268","line":7426,"range":{"start_line":7426,"start_character":36,"end_line":7426,"end_character":59},"updated":"2021-08-03 14:12:27.000000000","message":"this is now potentially confusing as this will emit a message \"Invalid configuration for GPU devices\" while the device might not be a GPU but a generic MDEV","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":7423,"context_line":"            mdev_class \u003d getattr(group, \u0027mdev_class\u0027, orc.VGPU)"},{"line_number":7424,"context_line":"            for device_address in group.device_addresses:"},{"line_number":7425,"context_line":"                if device_address in self.pgpu_type_mapping:"},{"line_number":7426,"context_line":"                    raise exception.InvalidLibvirtGPUConfig("},{"line_number":7427,"context_line":"                        reason\u003d\"duplicate types for PCI ID %s\" % device_address"},{"line_number":7428,"context_line":"                    )"},{"line_number":7429,"context_line":"                # Just checking whether the operator fat-fingered the address."}],"source_content_type":"text/x-python","patch_set":6,"id":"e7c1901f_fb6d94a2","line":7426,"range":{"start_line":7426,"start_character":36,"end_line":7426,"end_character":59},"in_reply_to":"f37ce6d8_803c5268","updated":"2021-08-03 15:17:49.000000000","message":"I fixed this","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":7431,"context_line":"                try:"},{"line_number":7432,"context_line":"                    pci_utils.parse_address(device_address)"},{"line_number":7433,"context_line":"                except exception.PciDeviceWrongAddressFormat:"},{"line_number":7434,"context_line":"                    raise exception.InvalidLibvirtGPUConfig("},{"line_number":7435,"context_line":"                        reason\u003d\"incorrect PCI address: %s\" % device_address"},{"line_number":7436,"context_line":"                    )"},{"line_number":7437,"context_line":"                self.pgpu_type_mapping[device_address] \u003d vgpu_type"}],"source_content_type":"text/x-python","patch_set":6,"id":"57aedf4e_92d3d431","line":7434,"range":{"start_line":7434,"start_character":36,"end_line":7434,"end_character":59},"updated":"2021-08-03 14:12:27.000000000","message":"ditto","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":7431,"context_line":"                try:"},{"line_number":7432,"context_line":"                    pci_utils.parse_address(device_address)"},{"line_number":7433,"context_line":"                except exception.PciDeviceWrongAddressFormat:"},{"line_number":7434,"context_line":"                    raise exception.InvalidLibvirtGPUConfig("},{"line_number":7435,"context_line":"                        reason\u003d\"incorrect PCI address: %s\" % device_address"},{"line_number":7436,"context_line":"                    )"},{"line_number":7437,"context_line":"                self.pgpu_type_mapping[device_address] \u003d vgpu_type"}],"source_content_type":"text/x-python","patch_set":6,"id":"08db6496_361c11b4","line":7434,"range":{"start_line":7434,"start_character":36,"end_line":7434,"end_character":59},"in_reply_to":"57aedf4e_92d3d431","updated":"2021-08-03 15:17:49.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":7440,"context_line":"        return CONF.devices.enabled_mdev_types"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    @staticmethod"},{"line_number":7443,"context_line":"    def _get_pci_id_from_libvirt_name(libvirt_address):"},{"line_number":7444,"context_line":"        \"\"\"Returns a PCI ID from a libvirt pci address name."},{"line_number":7445,"context_line":""},{"line_number":7446,"context_line":"        :param libvirt_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"c9eec1ff_9ba5fd5a","line":7443,"updated":"2021-08-03 14:12:27.000000000","message":"OK this is a just a refactor for reuse","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"239a60c446b72e1e475c86ea22f506cecb592c5e","unresolved":false,"context_lines":[{"line_number":7440,"context_line":"        return CONF.devices.enabled_mdev_types"},{"line_number":7441,"context_line":""},{"line_number":7442,"context_line":"    @staticmethod"},{"line_number":7443,"context_line":"    def _get_pci_id_from_libvirt_name(libvirt_address):"},{"line_number":7444,"context_line":"        \"\"\"Returns a PCI ID from a libvirt pci address name."},{"line_number":7445,"context_line":""},{"line_number":7446,"context_line":"        :param libvirt_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"8cce1d81_6cf29939","line":7443,"in_reply_to":"c9eec1ff_9ba5fd5a","updated":"2021-08-03 15:17:49.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e7533f8923b26f769e5f80d12b4db68452751ad8","unresolved":true,"context_lines":[{"line_number":7513,"context_line":"                         if mdev_class !\u003d orc.VGPU"},{"line_number":7514,"context_line":"                         else mdev_class"},{"line_number":7515,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7516,"context_line":"        return custom_rcs"},{"line_number":7517,"context_line":""},{"line_number":7518,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"},{"line_number":7519,"context_line":"        \"\"\"Counts the sysfs objects (handles) that represent a mediated device"}],"source_content_type":"text/x-python","patch_set":6,"id":"3aba477e_b219f6fc","line":7516,"updated":"2021-08-03 14:12:27.000000000","message":"Wondering if we should do the normalization and even adding the CUSTOM_ prefix right at the top when we parse the config and populate self.mdev_classes and self.mdev_class_mapping so we don\u0027t have to duplicate the logic.","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3d5a185ed7332538ff815bbb11744fffeed92cac","unresolved":true,"context_lines":[{"line_number":7513,"context_line":"                         if mdev_class !\u003d orc.VGPU"},{"line_number":7514,"context_line":"                         else mdev_class"},{"line_number":7515,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7516,"context_line":"        return custom_rcs"},{"line_number":7517,"context_line":""},{"line_number":7518,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"},{"line_number":7519,"context_line":"        \"\"\"Counts the sysfs objects (handles) that represent a mediated device"}],"source_content_type":"text/x-python","patch_set":6,"id":"a02ba43b_8a72dc8b","line":7516,"in_reply_to":"3aba477e_b219f6fc","updated":"2021-08-03 14:34:52.000000000","message":"Well, I wondered about it too and I think it would be better to have the mdev_classes names internally and just have a API method for getting the RC names as if no, we would wonder why to have a specific API just for getting the list of supported RCs (but I prefer to have a specific API method)","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"48a560f6e17aa59d91b899772693d6e7454b8a77","unresolved":false,"context_lines":[{"line_number":7513,"context_line":"                         if mdev_class !\u003d orc.VGPU"},{"line_number":7514,"context_line":"                         else mdev_class"},{"line_number":7515,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7516,"context_line":"        return custom_rcs"},{"line_number":7517,"context_line":""},{"line_number":7518,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"},{"line_number":7519,"context_line":"        \"\"\"Counts the sysfs objects (handles) that represent a mediated device"}],"source_content_type":"text/x-python","patch_set":6,"id":"f0a5f265_a7bc87e0","line":7516,"in_reply_to":"a02ba43b_8a72dc8b","updated":"2021-08-04 09:17:17.000000000","message":"Ack","commit_id":"851716cfcc59d306823f6652c25e6f8d11acb76a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"38853f5318aa75c0d63ddf5445c1520ea3fd86da","unresolved":true,"context_lines":[{"line_number":7445,"context_line":"        return CONF.devices.enabled_mdev_types"},{"line_number":7446,"context_line":""},{"line_number":7447,"context_line":"    @staticmethod"},{"line_number":7448,"context_line":"    def _get_pci_id_from_libvirt_name(libvirt_address):"},{"line_number":7449,"context_line":"        \"\"\"Returns a PCI ID from a libvirt pci address name."},{"line_number":7450,"context_line":""},{"line_number":7451,"context_line":"        :param libvirt_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"e73de444_a6175d9d","line":7448,"updated":"2021-08-06 14:17:18.000000000","message":"type annotations here would be A+","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64e25605e00f5fcbaab37cd41972258cc63959a7","unresolved":false,"context_lines":[{"line_number":7445,"context_line":"        return CONF.devices.enabled_mdev_types"},{"line_number":7446,"context_line":""},{"line_number":7447,"context_line":"    @staticmethod"},{"line_number":7448,"context_line":"    def _get_pci_id_from_libvirt_name(libvirt_address):"},{"line_number":7449,"context_line":"        \"\"\"Returns a PCI ID from a libvirt pci address name."},{"line_number":7450,"context_line":""},{"line_number":7451,"context_line":"        :param libvirt_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"df519cda_59c01327","line":7448,"in_reply_to":"e73de444_a6175d9d","updated":"2021-08-06 14:56:56.000000000","message":"Ack","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d40933ae9fd382ed67f51c730e07334e6bb0019c","unresolved":true,"context_lines":[{"line_number":7491,"context_line":"            # in case we can\u0027t find a specific pGPU"},{"line_number":7492,"context_line":"            return"},{"line_number":7493,"context_line":""},{"line_number":7494,"context_line":"    def _get_resource_class_per_device(self, device_address):"},{"line_number":7495,"context_line":"        \"\"\"Returns the resource class for the inventory of this device."},{"line_number":7496,"context_line":""},{"line_number":7497,"context_line":"        :param device_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5682c911_ab6e6e7d","line":7494,"updated":"2021-08-06 14:20:39.000000000","message":"Actually, I don\u0027t like the name of this. This suggests it\u0027s expecting a list of devices and will retrieve the resource class for each of them (\"per device\"). Can we do something better. \u0027_get_resource_class_for_device\u0027 would be much better","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64e25605e00f5fcbaab37cd41972258cc63959a7","unresolved":false,"context_lines":[{"line_number":7491,"context_line":"            # in case we can\u0027t find a specific pGPU"},{"line_number":7492,"context_line":"            return"},{"line_number":7493,"context_line":""},{"line_number":7494,"context_line":"    def _get_resource_class_per_device(self, device_address):"},{"line_number":7495,"context_line":"        \"\"\"Returns the resource class for the inventory of this device."},{"line_number":7496,"context_line":""},{"line_number":7497,"context_line":"        :param device_address: the libvirt PCI device name,"}],"source_content_type":"text/x-python","patch_set":9,"id":"c9435041_1b8850c5","line":7494,"in_reply_to":"5682c911_ab6e6e7d","updated":"2021-08-06 14:56:56.000000000","message":"Ack","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"38853f5318aa75c0d63ddf5445c1520ea3fd86da","unresolved":true,"context_lines":[{"line_number":7511,"context_line":"        custom_rcs \u003d set([orc.normalize_name(mdev_class)"},{"line_number":7512,"context_line":"                         if mdev_class !\u003d orc.VGPU"},{"line_number":7513,"context_line":"                         else mdev_class"},{"line_number":7514,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7515,"context_line":"        return custom_rcs"},{"line_number":7516,"context_line":""},{"line_number":7517,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"}],"source_content_type":"text/x-python","patch_set":9,"id":"52cf91c0_8295f2cb","line":7514,"updated":"2021-08-06 14:17:18.000000000","message":"nit: this could be a set comprehension:\n\n  return {\n      orc.normalize_name(mdev_class) if mdev_class !\u003d orc.VGPU\n      else mdev_class for mdev_class in self.mdev_classes\n  }\n\nThat said, this might be a common enough pattern to put into os-resource-classes in the future. A normalize is not already a standard trait helper","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64e25605e00f5fcbaab37cd41972258cc63959a7","unresolved":false,"context_lines":[{"line_number":7511,"context_line":"        custom_rcs \u003d set([orc.normalize_name(mdev_class)"},{"line_number":7512,"context_line":"                         if mdev_class !\u003d orc.VGPU"},{"line_number":7513,"context_line":"                         else mdev_class"},{"line_number":7514,"context_line":"                         for mdev_class in self.mdev_classes])"},{"line_number":7515,"context_line":"        return custom_rcs"},{"line_number":7516,"context_line":""},{"line_number":7517,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"}],"source_content_type":"text/x-python","patch_set":9,"id":"eb9a4583_32ee05ce","line":7514,"in_reply_to":"52cf91c0_8295f2cb","updated":"2021-08-06 14:56:56.000000000","message":"Ack","commit_id":"acf2a9012dda193d42a4dc06156e10357c9d5aa1"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8ec19b9a219cbe816c2210f719888f7a25945529","unresolved":true,"context_lines":[{"line_number":7509,"context_line":"        return mdev_class"},{"line_number":7510,"context_line":""},{"line_number":7511,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7512,"context_line":"        return self.mdev_classes"},{"line_number":7513,"context_line":""},{"line_number":7514,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"},{"line_number":7515,"context_line":"        \"\"\"Counts the sysfs objects (handles) that represent a mediated device"}],"source_content_type":"text/x-python","patch_set":11,"id":"968ba8b7_918ce69b","line":7512,"updated":"2021-08-06 16:01:05.000000000","message":"We can remove this now. A follow-up is fine though","commit_id":"aab6e4e636090fe724826e2fe363ffe7b9e6469b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e1628d73e9dec6f3f7b64f0a5bb056d0d84c332d","unresolved":true,"context_lines":[{"line_number":7509,"context_line":"        return mdev_class"},{"line_number":7510,"context_line":""},{"line_number":7511,"context_line":"    def _get_supported_mdev_resource_classes(self):"},{"line_number":7512,"context_line":"        return self.mdev_classes"},{"line_number":7513,"context_line":""},{"line_number":7514,"context_line":"    def _count_mediated_devices(self, enabled_mdev_types):"},{"line_number":7515,"context_line":"        \"\"\"Counts the sysfs objects (handles) that represent a mediated device"}],"source_content_type":"text/x-python","patch_set":11,"id":"07ebd0c0_91a80bf3","line":7512,"in_reply_to":"968ba8b7_918ce69b","updated":"2021-08-06 16:25:05.000000000","message":"yeah, lets inline it in a fup","commit_id":"aab6e4e636090fe724826e2fe363ffe7b9e6469b"}]}
