HyperV: Remove extra specs of HyperV driver
There are a few extra spec which are only applicable for HyperV driver, therefore those are removed. Change-Id: I9bd959fdf9938b2752c4927c5ff7daf89b5f0d38
This commit is contained in:
parent
0c1e1ccf03
commit
3b4db6408e
@ -10,7 +10,7 @@ OpenStack Nova
|
||||
|
||||
OpenStack Nova provides a cloud computing fabric controller, supporting a wide
|
||||
variety of compute technologies, including: libvirt (KVM, Xen, LXC and more),
|
||||
Hyper-V, VMware and OpenStack Ironic.
|
||||
VMware and OpenStack Ironic.
|
||||
|
||||
Use the following resources to learn more.
|
||||
|
||||
|
@ -176,10 +176,9 @@ They are only supported by the libvirt virt driver.
|
||||
``os``
|
||||
~~~~~~
|
||||
|
||||
The following extra specs are used to configure various attributes of
|
||||
instances when using the HyperV virt driver.
|
||||
The following extra specs are used to configure secure_boot.
|
||||
|
||||
They are only supported by the HyperV virt driver.
|
||||
They are only supported by the libvirt virt driver.
|
||||
|
||||
.. extra-specs:: os
|
||||
|
||||
|
@ -17,14 +17,14 @@
|
||||
from nova.api.validation.extra_specs import base
|
||||
|
||||
|
||||
# TODO(stephenfin): Most of these belong in the 'hw:' or 'hyperv:' namespace
|
||||
# TODO(stephenfin): Most of these belong in the 'hw:' namespace
|
||||
# and should be moved.
|
||||
EXTRA_SPEC_VALIDATORS = [
|
||||
base.ExtraSpecValidator(
|
||||
name='os:secure_boot',
|
||||
description=(
|
||||
'Determine whether secure boot is enabled or not. Only supported '
|
||||
'by the libvirt and HyperV virt drivers.'
|
||||
'by the libvirt virt drivers.'
|
||||
),
|
||||
value={
|
||||
'type': str,
|
||||
@ -35,59 +35,6 @@ EXTRA_SPEC_VALIDATORS = [
|
||||
],
|
||||
},
|
||||
),
|
||||
base.ExtraSpecValidator(
|
||||
name='os:resolution',
|
||||
description=(
|
||||
'Guest VM screen resolution size. Only supported by the HyperV '
|
||||
'driver.'
|
||||
),
|
||||
value={
|
||||
'type': str,
|
||||
'description': 'The chosen resolution',
|
||||
'enum': [
|
||||
'1024x768',
|
||||
'1280x1024',
|
||||
'1600x1200',
|
||||
'1920x1200',
|
||||
'2560x1600',
|
||||
'3840x2160',
|
||||
],
|
||||
},
|
||||
),
|
||||
base.ExtraSpecValidator(
|
||||
name='os:monitors',
|
||||
description=(
|
||||
'Guest VM number of monitors. Only supported by the HyperV driver.'
|
||||
),
|
||||
value={
|
||||
'type': int,
|
||||
'description': 'The number of monitors enabled',
|
||||
'min': 1,
|
||||
'max': 8,
|
||||
},
|
||||
),
|
||||
# TODO(stephenfin): Consider merging this with the 'hw_video_ram' image
|
||||
# metadata property or adding a 'hw:video_ram' extra spec that works for
|
||||
# both Hyper-V and libvirt.
|
||||
base.ExtraSpecValidator(
|
||||
name='os:vram',
|
||||
description=(
|
||||
'Guest VM VRAM amount. Only supported by the HyperV driver.'
|
||||
),
|
||||
# NOTE(stephenfin): This is really an int, but because there's a
|
||||
# limited range of options we treat it as a string
|
||||
value={
|
||||
'type': str,
|
||||
'description': 'Amount of VRAM to allocate to instance',
|
||||
'enum': [
|
||||
'64',
|
||||
'128',
|
||||
'256',
|
||||
'512',
|
||||
'1024',
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
@ -146,14 +146,12 @@ EXTRA_SPEC_VALIDATORS.extend(
|
||||
)
|
||||
|
||||
|
||||
# Disk quotas (libvirt, HyperV)
|
||||
# Disk quotas (libvirt)
|
||||
for stat in ('read', 'write', 'total'):
|
||||
for metric in ('bytes', 'iops'):
|
||||
EXTRA_SPEC_VALIDATORS.append(
|
||||
base.ExtraSpecValidator(
|
||||
name=f'quota:disk_{stat}_{metric}_sec',
|
||||
# NOTE(stephenfin): HyperV supports disk_total_{metric}_sec
|
||||
# too; update
|
||||
description=(
|
||||
f'The quota {stat} {metric} for disk. '
|
||||
f'Only supported by the libvirt virt driver.'
|
||||
|
@ -105,8 +105,6 @@ class TestValidators(test.NoDBTestCase):
|
||||
def test_value__int(self):
|
||||
valid_specs = (
|
||||
('hw:numa_nodes', '1'),
|
||||
('os:monitors', '1'),
|
||||
('os:monitors', '8'),
|
||||
)
|
||||
for key, value in valid_specs:
|
||||
validators.validate(key, value)
|
||||
@ -115,8 +113,6 @@ class TestValidators(test.NoDBTestCase):
|
||||
('hw:serial_port_count', 'five'), # NaN
|
||||
('hw:serial_port_count', '!'), # NaN
|
||||
('hw:numa_nodes', '0'), # has min
|
||||
('os:monitors', '0'), # has min
|
||||
('os:monitors', '9'), # has max
|
||||
)
|
||||
for key, value in invalid_specs:
|
||||
with testtools.ExpectedException(exception.ValidationError):
|
||||
|
@ -45,3 +45,10 @@ upgrade:
|
||||
* ``[hyperv] iscsi_initiator_list``
|
||||
* ``[rdp] enabled``
|
||||
* ``[rdp] html5_proxy_base_url``
|
||||
|
||||
The following extra specs which only apply for the ``HyperV`` virt
|
||||
driver have been removed.
|
||||
|
||||
* ``os:resolution``
|
||||
* ``os:monitors``
|
||||
* ``os:vram``
|
||||
|
Loading…
Reference in New Issue
Block a user