diff --git a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue index 69807ed7..e48acfd2 100644 --- a/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue +++ b/pkg/harvester/edit/kubevirt.io.virtualmachine/VirtualMachinePciDevices/index.vue @@ -52,31 +52,21 @@ export default { } const selectedDevices = []; - const oldFormatDevices = []; const vmDevices = this.value?.domain?.devices?.hostDevices || []; - const otherDevices = this.otherDevices(vmDevices).map(({ name }) => name); const vmDeviceNames = vmDevices.map(({ name }) => name); this.pciDevices.forEach((row) => { row.allowDisable = !vmDeviceNames.includes(row.metadata.name); }); - vmDevices.forEach(({ name, deviceName }) => { - const checkName = (deviceName || '').split('/')?.[1]; - - if (checkName && name.includes(checkName) && !otherDevices.includes(name)) { - oldFormatDevices.push(name); - } else if (this.enabledDevices.find((device) => device?.metadata?.name === name)) { + vmDevices.forEach(({ name }) => { + if (this.enabledDevices.find((device) => device?.metadata?.name === name)) { selectedDevices.push(name); } }); - if (oldFormatDevices.length > 0) { - this.oldFormatDevices = oldFormatDevices; - } else { - this.selectedDevices = selectedDevices; - } + this.selectedDevices = selectedDevices; }, data() { @@ -87,7 +77,6 @@ export default { selectedDevices: [], pciDeviceSchema: this.$store.getters['harvester/schemaFor'](HCI.PCI_DEVICE), showMatrix: false, - oldFormatDevices: [], }; }, @@ -199,11 +188,6 @@ export default { }); }, - oldFormatDevicesHTML() { - return this.oldFormatDevices.map((device) => { - return `
- The following PCI devices are using the old naming convention and need to be updated in the YAML file: -
-- Please use the following instructions to update the virtual machine: -
-hostDevices section, and save virtual machine the changes to the YAML file.