improve JSON examples for PCI Passthrough config

Breaks up an example section of the README.md dealing with
pci-passthrough-whitelist in such a way that syntax-highlighting of
example yaml blocks are easily copiable.  Also, resolves an issue
with the example for multiple whitelisted devices by removing a
trailing tick (`).

Change-Id: I3ecd01957efa10e240bebb16dde33b0bd6347ef9
This commit is contained in:
Adam Dyess 2019-12-11 17:00:03 -06:00
parent 83b2201285
commit 4011210261

View File

@ -122,29 +122,37 @@ the following format:
occurrences, and '|' mutually exclusive options. Note that any missing occurrences, and '|' mutually exclusive options. Note that any missing
fields are automatically wildcarded. Valid examples are: fields are automatically wildcarded. Valid examples are:
``` ```yaml
pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet"} pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet"}
```
```yaml
pci-passthrough-whitelist: {"address":"*:0a:00.*"} pci-passthrough-whitelist: {"address":"*:0a:00.*"}
```
```yaml
pci-passthrough-whitelist: {"address":":0a:00.", "physical_network":"physnet1"} pci-passthrough-whitelist: {"address":":0a:00.", "physical_network":"physnet1"}
```
```yaml
pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071"} pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071"}
```
```yaml
pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071", "address": "0000:0a:00.1", "physical_network":"physnet1"} pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071", "address": "0000:0a:00.1", "physical_network":"physnet1"}
``` ```
The following is invalid, as it specifies mutually exclusive options: The following is invalid, as it specifies mutually exclusive options:
``` ```yaml
pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet", "address":"*:0a:00.*"} pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet", "address":"*:0a:00.*"}
``` ```
A JSON list of JSON dictionaries corresponding to the above format. For A JSON list of JSON dictionaries corresponding to the above format. For
example: example:
``` ```yaml
pci-passthrough-whitelist: [{"product_id":"0001", "vendor_id":"8086"}, {"product_id":"0002", "vendor_id":"8086"}]` pci-passthrough-whitelist: [{"product_id":"0001", "vendor_id":"8086"}, {"product_id":"0002", "vendor_id":"8086"}]
``` ```
The [OpenStack advanced networking documentation](http://docs.openstack.org/mitaka/networking-guide/adv-config-sriov.html) The [OpenStack advanced networking documentation](http://docs.openstack.org/mitaka/networking-guide/adv-config-sriov.html)