Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #29254 - add display options to host creation on ovirt #507

Merged
merged 1 commit into from Mar 12, 2020

Conversation

yifatmakias
Copy link
Contributor

No description provided.

}
end
compute_attributes.delete('display_type')
compute_attributes.delete('keyboard_layout')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like I cannot use keyboard_layout without display_type being set. E.g. if I set keyboard_layout only, it will be ignored and not passed into params under ['host']['compute_attributes']. Is that expected behaviour?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, actually only if the display type is VNC there should not be an option to choose the key_board layout according to the web UI. I will fix it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After update I see that I can pass display_type or keyboard_layout independently 👍. But there is no mention that a user shouldn't pass keyboard_layout if he/she passes display_type = VNC. Honestly I don't know if it is a problem, my concern is based on your previous comment only.

If we want to address it as well, then I'd expand a bit the help: 'keyboard_layout', _('Possible values: %s. Not usable if display type is VNC.') %... or something similar.
OR
We could add display type check in the code and warn the user if he/she passes display_type = VNC and keyboard_layout = anything.

What do you think? Otherwise the PR is ready to merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think expanding the help is a good idea.
I also made a mistake with what I wrote. Actually it is possible to add keybaord_layout only when the display_type is VNC. When the display_type is SPICE (the other option) it should not be added.
I will add a short explanation to the help. :)
Thanks!

Copy link
Member

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @yifatmakias! Merging.

@ofedoren ofedoren merged commit 6ad05e8 into theforeman:master Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants