refactor: update feature flag

Signed-off-by: Yi-Ya Chen <yiya.chen@suse.com>
This commit is contained in:
Yi-Ya Chen
2025-02-10 18:38:50 +08:00
parent 43b30ec3c3
commit 1651e201e8
8 changed files with 20 additions and 20 deletions
+7 -7
View File
@@ -164,7 +164,7 @@ export default {
accessCredentials: [],
efiEnabled: false,
tpmEnabled: false,
persistentStateEnabled: false,
tpmPersistentStateEnabled: false,
secureBoot: false,
userDataTemplateId: '',
saveUserDataAsClearText: false,
@@ -368,7 +368,7 @@ export default {
const installAgent = this.hasInstallAgent(userData, osType, true);
const efiEnabled = this.isEfiEnabled(spec);
const tpmEnabled = this.isTpmEnabled(spec);
const persistentStateEnabled = this.isPersistentStateEnabled(spec);
const tpmPersistentStateEnabled = this.isTPMPersistentStateEnabled(spec);
const secureBoot = this.isSecureBoot(spec);
const cpuPinning = this.isCpuPinning(spec);
@@ -401,7 +401,7 @@ export default {
this['installUSBTablet'] = installUSBTablet;
this['efiEnabled'] = efiEnabled;
this['tpmEnabled'] = tpmEnabled;
this['persistentStateEnabled'] = persistentStateEnabled;
this['tpmPersistentStateEnabled'] = tpmPersistentStateEnabled;
this['secureBoot'] = secureBoot;
this['cpuPinning'] = cpuPinning;
@@ -1424,8 +1424,8 @@ export default {
}
},
setPersistentStateEnabled(persistentStateEnabled) {
if (persistentStateEnabled) {
setTPMPersistentStateEnabled(tpmPersistentStateEnabled) {
if (tpmPersistentStateEnabled) {
set(this.spec.template.spec.domain.devices, 'tpm', { persistent: true });
} else {
set(this.spec.template.spec.domain.devices, 'tpm', {});
@@ -1555,8 +1555,8 @@ export default {
this.setTPM(val);
},
persistentStateEnabled(val) {
this.setPersistentStateEnabled(val);
tpmPersistentStateEnabled(val) {
this.setTPMPersistentStateEnabled(val);
},
installAgent: {