feat: support skip MIG mode configuration in srivogpu (#1009)

Signed-off-by: Jack Yu <jack.yu@suse.com>
This commit is contained in:
Jack Yu
2026-07-20 11:22:40 +08:00
committed by GitHub
parent b813bc578e
commit f6dffe9816
5 changed files with 156 additions and 10 deletions
@@ -69,16 +69,15 @@ export default class SRIOVDevice extends SteveModel {
return this.spec.enabled && this.status?.vfAddresses?.length > 0 && this.status?.vGPUDevices?.length > 0;
}
async enableDevice() {
try {
this.spec.enabled = true;
await this.save();
} catch (err) {
this.$dispatch('growl/fromError', {
title: this.t('generic.notification.title.error', { name: escapeHtml(this.metadata.name) }),
err,
}, { root: true });
}
get isTimesliced() {
return this.metadata?.annotations?.[HCI_ANNOTATIONS.SKIP_MIG_CONFIGURATION] === 'true';
}
enableDevice() {
this.$dispatch('promptModal', {
resources: [this],
component: 'EnableSriovGpuDevice'
});
}
async disableDevice() {