From 4011210261534fee323b47cb84aa918932d6a487 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Wed, 11 Dec 2019 17:00:03 -0600 Subject: [PATCH] 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 --- README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e55a3eb1..42f3d8bb 100644 --- a/README.md +++ b/README.md @@ -122,29 +122,37 @@ the following format: occurrences, and '|' mutually exclusive options. Note that any missing fields are automatically wildcarded. Valid examples are: -``` +```yaml pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet"} +``` +```yaml pci-passthrough-whitelist: {"address":"*:0a:00.*"} +``` +```yaml pci-passthrough-whitelist: {"address":":0a:00.", "physical_network":"physnet1"} +``` +```yaml 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"} ``` The following is invalid, as it specifies mutually exclusive options: -``` +```yaml pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet", "address":"*:0a:00.*"} ``` A JSON list of JSON dictionaries corresponding to the above format. For example: -``` -pci-passthrough-whitelist: [{"product_id":"0001", "vendor_id":"8086"}, {"product_id":"0002", "vendor_id":"8086"}]` +```yaml +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)