Skip to content

Commit

Permalink
restapi: Pass display type from VmPool.vm to AddVmPoolParameters (#544)
Browse files Browse the repository at this point in the history
Display type passed in VmPool.vm should be converted to a list of
graphic types and passed in parameters to AddVmPoolCommand.

Change-Id: I44303911c4228b66b3b8a081be774dd51188321e
Bug-Url: https://bugzilla.redhat.com/2106349
Signed-off-by: Shmuel Melamud <smelamud@redhat.com>
  • Loading branch information
smelamud committed Jul 25, 2022
1 parent f595625 commit ecd6cb1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ public Response add(VmPool pool) {
AddVmPoolParameters params = new AddVmPoolParameters(entity, vm, size);
params.setConsoleEnabled(pool.isSetVm() && pool.getVm().isSetConsole() && pool.getVm().getConsole().isSetEnabled() ?
pool.getVm().getConsole().isEnabled() : !getConsoleDevicesForEntity(template.getId()).isEmpty());
if (pool.isSetVm()) {
DisplayHelper.setGraphicsToParams(pool.getVm().getDisplay(), params);
}
params.setVirtioScsiEnabled(!VmHelper.getVirtioScsiControllersForEntity(this, template.getId()).isEmpty());
params.setSoundDeviceEnabled(pool.isSetSoundcardEnabled() ? pool.isSoundcardEnabled() : !VmHelper.getSoundDevicesForEntity(this, template.getId()).isEmpty());
params.setRngDevice(pool.isSetVm() && pool.getVm().isSetRngDevice() ?
Expand Down

0 comments on commit ecd6cb1

Please sign in to comment.