Files
os-traits/os_traits/compute/graphics.py
Kashyap Chamarthy 0f404b4b48 Add a trait for the "bochs" display device
The 'bochs' display device is a recommended[1] safe option for UEFI
guests.

This lets an admin set the trait either via the flavor extra-specs or
image metadata properties:

    trait:COMPUTE_GRAPHICS_MODEL_BOCHS=required

This also allows The libvirt virt dirver report a standard trait
for bochs graphics model support and enables the image_metadata_prefilter
to automatically request the trait. This will enable vm that request
the bochs graphics model to be automaticaly scheduled to hosts that
can support it.

Implements: blueprint add-bochs-display-device
[1]: https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/#tldr
Change-Id: Iba867f4632853f99373976e39c3494ea1c8b91a2
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2021-08-19 12:49:08 +01:00

29 lines
933 B
Python

# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
TRAITS = [
# traits corresponding to the allowed values of "hw_video_model"
# image metadata property
# https://github.com/openstack/nova/blob/1f74441/nova/objects/fields.py#L501-L509
'MODEL_BOCHS',
'MODEL_CIRRUS',
'MODEL_GOP',
'MODEL_NONE',
'MODEL_QXL',
'MODEL_VGA',
'MODEL_VIRTIO',
'MODEL_VMVGA',
'MODEL_XEN',
]