Add traits for sound and USB devices on instances.

This will be used by I2faeda0fd0fb9c8894d69558a1ccaab8da9f6a1b to
support sound and USB contoller devices for the SPICE VDI protocol.

Change-Id: Ifda3475cfa08cab392c5afb4fd6f43a0556503f8
This commit is contained in:
Michael Still
2025-01-31 06:45:40 +11:00
parent 1b608ff60a
commit 06435824dc
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# -*- 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_sound_model"
# image metadata property. These are used by the nova libvirt driver and
# are listed at https://libvirt.org/formatdomain.html#sound-devices
'MODEL_SB16',
'MODEL_ES1370',
'MODEL_PCSPK',
'MODEL_AC97',
'MODEL_ICH6',
'MODEL_ICH9',
'MODEL_USB',
'MODEL_VIRTIO'
]

23
os_traits/compute/usb.py Normal file
View File

@@ -0,0 +1,23 @@
# -*- 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_usb_model"
# image metadata property. These are used by the nova libvirt driver
# however we have decided for now to not support the other older options
# for performance and support reasons. Options are documented at
# https://libvirt.org/formatdomain.html#controllers
'MODEL_QEMU_XHCI',
'MODEL_NEC_XHCI'
]