Add missing settings to Qemu VM templates. Fixes #1456

This commit is contained in:
grossmj 2023-08-01 20:13:11 +10:00
parent 997b8df598
commit bfc72c219c
4 changed files with 18 additions and 2 deletions

View File

@ -191,8 +191,10 @@
</mat-form-field> </mat-form-field>
<button mat-button class="configButton" (click)="setCustomAdaptersConfiguratorState(true)"> <button mat-button class="configButton" (click)="setCustomAdaptersConfiguratorState(true)">
Configure custom adapters</button Configure custom adapters</button
><br /> >
<mat-checkbox [(ngModel)]="qemuTemplate.legacy_networking"> Use the legacy networking mode </mat-checkbox> <br /><mat-checkbox [(ngModel)]="qemuTemplate.legacy_networking"> Use the legacy networking mode </mat-checkbox>
<br /><mat-checkbox [(ngModel)]="qemuTemplate.replicate_network_connection_state"> Replicate network connection state </mat-checkbox>
</mat-expansion-panel> </mat-expansion-panel>
<mat-expansion-panel> <mat-expansion-panel>
<mat-expansion-panel-header> <mat-expansion-panel-header>
@ -271,6 +273,8 @@
<input matInput type="text" [(ngModel)]="qemuTemplate.options" placeholder="Options" /> <input matInput type="text" [(ngModel)]="qemuTemplate.options" placeholder="Options" />
</mat-form-field> </mat-form-field>
<mat-checkbox [(ngModel)]="qemuTemplate.linked_clone"> Use as a linked base VM </mat-checkbox> <mat-checkbox [(ngModel)]="qemuTemplate.linked_clone"> Use as a linked base VM </mat-checkbox>
<br /><mat-checkbox [(ngModel)]="qemuTemplate.tpm"> Enable the Trusted Platform Module (TPM)</mat-checkbox>
<br /><mat-checkbox [(ngModel)]="qemuTemplate.uefi"> Enable the UEFI boot mode </mat-checkbox>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</mat-expansion-panel> </mat-expansion-panel>

View File

@ -43,4 +43,7 @@ export class QemuTemplate {
template_id: string; template_id: string;
template_type: string; template_type: string;
usage: string; usage: string;
replicate_network_connection_state: boolean;
tpm: boolean;
uefi: boolean;
} }

View File

@ -78,6 +78,9 @@ describe('QemuService', () => {
template_id: '1', template_id: '1',
template_type: 'qemu', template_type: 'qemu',
usage: '', usage: '',
replicate_network_connection_state: true,
tpm: false,
uefi: false,
}; };
service.saveTemplate(server, template).subscribe(); service.saveTemplate(server, template).subscribe();
@ -131,6 +134,9 @@ describe('QemuService', () => {
template_id: '', template_id: '',
template_type: 'qemu', template_type: 'qemu',
usage: '', usage: '',
replicate_network_connection_state: true,
tpm: false,
uefi: false,
}; };
service.addTemplate(server, template).subscribe(); service.addTemplate(server, template).subscribe();

View File

@ -75,6 +75,9 @@ export class TemplateMocksService {
template_id: '', template_id: '',
template_type: 'qemu', template_type: 'qemu',
usage: '', usage: '',
replicate_network_connection_state: true,
tpm: false,
uefi: false,
}; };
return of(template); return of(template);