Add an example to add more pci devices in nova.conf

The help for the [pci]aliases config option was confusing in that it
wasn't clear how to specify multiple aliases. The default value being []
made it seem like you ought to be able to specify a list as:

 alias = [{...}, {...}, ...]

This won't actually work; you instead have to say:

 alias = {...}
 alias = {...}
 ...

So this patch adds a multi-alias example to the help string and
explicitly calls out the fact that you can't use list values.

See the referenced bug for more details.
Change-Id: I71d4c440340db31d22a73a8b3e3abc51771aa7bc
Closes-Bug: #1786870
This commit is contained in:
fpxie 2018-08-16 10:05:23 +08:00 committed by Eric Fried
parent a77f11c9c1
commit d086389366
1 changed files with 19 additions and 1 deletions

View File

@ -33,7 +33,7 @@ needing to repeat all the PCI property requirements.
Possible Values:
* A list of JSON values which describe the aliases. For example::
* A dictionary of JSON values which describe the aliases. For example::
alias = {
"name": "QuickAssist",
@ -62,6 +62,24 @@ Possible Values:
``numa_policy``
Required NUMA affinity of device. Valid values are: ``legacy``,
``preferred`` and ``required``.
* Supports multiple aliases by repeating the option (not by specifying
a list value)::
alias = {
"name": "QuickAssist-1",
"product_id": "0443",
"vendor_id": "8086",
"device_type": "type-PCI",
"numa_policy": "required"
}
alias = {
"name": "QuickAssist-2",
"product_id": "0444",
"vendor_id": "8086",
"device_type": "type-PCI",
"numa_policy": "required"
}
"""),
cfg.MultiStrOpt('passthrough_whitelist',
default=[],