From d5935fdae65d34198c33cf77899ea696312accf4 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Tue, 22 Oct 2019 14:56:59 -0500 Subject: [PATCH] Fix python-openstackclient plugin doc build Some plugin command option help strings contained invalid-to-sphinx bullet lists, causing building autoprogram-cliff from python-openstackclient to break with errors like: :1:Unexpected indentation. This commit reformats the help strings to use the right newlines and indents so they build properly. Change-Id: Ia3fd6d5ec76e0e6d6aee87d8a8790a1ed2d38a26 --- rsdclient/osc/v2/node.py | 190 ++++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 94 deletions(-) diff --git a/rsdclient/osc/v2/node.py b/rsdclient/osc/v2/node.py index 6eeab59..0ea8015 100644 --- a/rsdclient/osc/v2/node.py +++ b/rsdclient/osc/v2/node.py @@ -52,26 +52,27 @@ class ComposeNode(command.Command): metavar='', help=('Array of requirements for processor for composed node. Each' ' processor requirement may contain one or more optional ' - 'attributes:\n' - ' - Model: Type String, Processor model that should be used' - ' for composed node (exact model name)\n\n' - ' - TotalCores: Type Int, Minimum number of processor cores' - ' - AchievableSpeedMHz: Type Int, Minimum achievable ' - 'processor operating frequency.\n\n' - ' - InstructionSet: Type String, Processor supported ' + 'attributes:\n\n' + '- Model: Type String, Processor model that should be used ' + 'for composed node (exact model name)\n' + '- TotalCores: Type Int, Minimum number of processor ' + 'cores\n' + '- AchievableSpeedMHz: Type Int, Minimum achievable ' + 'processor operating frequency.\n' + '- InstructionSet: Type String, Processor supported ' 'instruction set, such as "x86", "x86-64", "IA-64", ' - '"ARM-A32", "ARM-A64", "MIPS32", "MIPS64", "OEM"\n\n' - ' - Resource: Object Reference to a particular processor ' - 'that should be used in composed node\n\n' - ' - Chassis: Object Link to chassis object within this ' - 'processor should be contained.\n\n' - ' - Brand: Type String, Brand of CPU that should be used to' - ' allocate node.' - ' - Capabilities: Array of strings describing processor ' + '"ARM-A32", "ARM-A64", "MIPS32", "MIPS64", "OEM"\n' + '- Resource: Object Reference to a particular processor ' + 'that should be used in composed node\n' + '- Chassis: Object Link to chassis object within this ' + 'processor should be contained.\n' + '- Brand: Type String, Brand of CPU that should be used to ' + 'allocate node.\n' + '- Capabilities: Array of strings describing processor ' 'capabilities (like reported in /proc/cpuinfo flags), such ' 'as "sse", "avx", etc.\n\n' - 'For example:\n' - '[{\n' + 'For example::\n\n' + ' [{\n' ' "Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx ' 'Series",\n' ' "TotalCores": 2,\n' @@ -85,7 +86,7 @@ class ComposeNode(command.Command): ' "@odata.id": "/redfish/v1/Systems/System1/Processors' '/CPU1"\n' ' }\n' - '}]')) + ' }]')) parser.add_argument( '--memory', dest='memory', @@ -93,22 +94,22 @@ class ComposeNode(command.Command): metavar='', help=('Array of requirements for memory for composed node. Each ' 'memory requirement may contain one or more optional ' - 'attributes:\n' - ' - CapacityMiB: Type Int, Minimum memory capacity ' - 'requested for composed node\n\n' - ' - MemoryDeviceType: Type String, Type details of DIMM, ' - 'such as "DDR3", "DDR4"\n\n' - ' - SpeedMHz: Type Int, Minimum supported memory speed\n\n' - ' - Manufacturer: Type String, Requested memory ' - 'manufacturer\n\n' - ' - DataWidthBits: Type Int, Requested memory data width in' - ' bits\n\n' - ' - Resource: Object Reference to a particular memory ' - 'module that should be used in composed node\n\n' - ' - Chassis: Object Link to chassis object within this ' + 'attributes:\n\n' + '- CapacityMiB: Type Int, Minimum memory capacity ' + 'requested for composed node\n' + '- MemoryDeviceType: Type String, Type details of DIMM, ' + 'such as "DDR3", "DDR4"\n' + '- SpeedMHz: Type Int, Minimum supported memory speed\n' + '- Manufacturer: Type String, Requested memory ' + 'manufacturer\n' + '- DataWidthBits: Type Int, Requested memory data width in ' + 'bits\n' + '- Resource: Object Reference to a particular memory ' + 'module that should be used in composed node\n' + '- Chassis: Object Link to chassis object within this ' 'memory DIMM should be contained\n\n' - 'For example:\n' - '[{\n' + 'For example::\n\n' + ' [{\n' ' "CapacityMiB": 16000,\n' ' "MemoryDeviceType": "DDR3",\n' ' "SpeedMHz": 1600,\n' @@ -121,7 +122,7 @@ class ComposeNode(command.Command): ' "Chassis": {\n' ' "@odata.id": "/redfish/v1/Chassis/Rack1"\n' ' }\n' - '}]')) + ' }]')) parser.add_argument( '--remote-drives', dest='remote_drives', @@ -129,30 +130,31 @@ class ComposeNode(command.Command): metavar='', help=('Array of requirements for remote drives that should be ' 'created/connected to composed node. Each remote drives ' - 'requirement may contain one or more optional attributes:\n' - ' - CapacityGiB: Positive value expected, required if ' + 'requirement may contain one or more optional ' + 'attributes:\n\n' + '- CapacityGiB: Positive value expected, required if ' 'Master Drive supplied. Should be at least the size of ' - 'Logical Drive used as Master Drive\n\n' - ' - Protocol: Defines protocol used to communicate with ' + 'Logical Drive used as Master Drive\n' + '- Protocol: Defines protocol used to communicate with ' 'attached drive. Currently supported: "iSCSI" ' - '"NVMeOverFabrics"\n\n' - ' - Master -> Type: One of allowed enumerated values (' - '"Snapshot" "Clone"). Required if Master Drive supplied\n\n' - ' - Master -> Resource: URI of Master volume that should be' - ' used for clone or snapshot operation\n\n' - ' - Resource: Object Reference to particular local drive ' + '"NVMeOverFabrics"\n' + '- Master -> Type: One of allowed enumerated values (' + '"Snapshot" "Clone"). Required if Master Drive supplied\n' + '- Master -> Resource: URI of Master volume that should be ' + 'used for clone or snapshot operation\n' + '- Resource: Object Reference to particular local drive ' 'that should be used in composed node\n\n' - 'For example:\n\n' - '# Using existing NVMe over Fabrics Remote Drive\n' - '[{\n' + 'For example::\n\n' + ' # Using existing NVMe over Fabrics Remote Drive\n' + ' [{\n' ' "Protocol": "NVMeOverFabrics",\n' ' "Resource": {\n' ' "@odata.id": "/redfish/v1/StorageServices/NVMeoE1/' 'Volumes/1"\n' ' }\n' - '}]\n\n' - '# Using a Master Drive for fresh Remote Drive Creation\n' - '[{\n' + ' }]\n\n' + ' # Using a Master Drive for fresh Remote Drive Creation\n' + ' [{\n' ' "CapacityGiB": 80,\n' ' "Protocol": "NVMeOverFabrics",\n' ' "Master": {\n' @@ -162,7 +164,7 @@ class ComposeNode(command.Command): 'Volumes/102"\n' ' }\n' ' }\n' - '}]')) + ' }]')) parser.add_argument( '--local-drives', dest='local_drives', @@ -170,25 +172,25 @@ class ComposeNode(command.Command): metavar='', help=('Array of requirements for local drives for composed node. ' 'Each local drives requirement may contain one or more ' - 'optional attributes:\n' - ' - CapacityGiB: Type Int, Minimum drive capacity requested' - ' for composed node\n\n' - ' - Type: Type String, Drive type: "HDD", "SSD"\n\n' - ' - MinRPM: Type Int, Minimum rotation speed of requested ' - 'drive\n\n' - ' - SerialNumber: Type String, Serial number of requested ' - 'drive\n\n' - ' - Interface: Type String, Interface of requested drive: ' - '"SAS", "SATA", "NVMe"\n\n' - ' - Resource: Object Reference to particular local drive ' - 'that should be used in composed node\n\n' - ' - Chassis: Object Link to chassis object within this ' - 'drive should be contained\n\n' - ' - FabricSwitch: Type Boolean, Determine if local drive ' + 'optional attributes:\n\n' + '- CapacityGiB: Type Int, Minimum drive capacity requested ' + 'for composed node\n' + '- Type: Type String, Drive type: "HDD", "SSD"\n' + '- MinRPM: Type Int, Minimum rotation speed of requested ' + 'drive\n' + '- SerialNumber: Type String, Serial number of requested ' + 'drive\n' + '- Interface: Type String, Interface of requested drive: ' + '"SAS", "SATA", "NVMe"\n' + '- Resource: Object Reference to particular local drive ' + 'that should be used in composed node\n' + '- Chassis: Object Link to chassis object within this ' + 'drive should be contained\n' + '- FabricSwitch: Type Boolean, Determine if local drive ' 'should be connected using fabric switch or local ' 'connected\n\n' - 'For example:\n' - '[{\n' + 'For example::\n\n' + ' [{\n' ' "CapacityGiB": 500,\n' ' "Type": "HDD",\n' ' "MinRPM": 5400,\n' @@ -198,7 +200,7 @@ class ComposeNode(command.Command): ' "@odata.id": "redfish/v1/Chassis/Blade1/Drives/Disk1"\n' ' },\n' ' "FabricSwitch": false\n' - '}]')) + ' }]')) parser.add_argument( '--ethernet', dest='ethernet', @@ -206,22 +208,22 @@ class ComposeNode(command.Command): metavar='', help=('Array of requirements for Ethernet interfaces of composed ' 'node. Each Ethernet interface requirement may contain one ' - 'or more optional attributes:\n' - ' - SpeedMbps: Type Int, Minimum speed of Ethernet ' - 'interface requested for composed node\n\n' - ' - VLANs: Type Array, Array of VLANs that should be ' + 'or more optional attributes:\n\n' + '- SpeedMbps: Type Int, Minimum speed of Ethernet ' + 'interface requested for composed node\n' + '- VLANs: Type Array, Array of VLANs that should be ' 'configured on connected switch port for composed node for ' 'given Ethernet interface in the following format: VLANId - ' 'number indicating VLAN Id, Tagged - Boolean value ' - 'describing if given VLAN is tagged\n\n' - ' - PrimaryVLAN: Type Int, Primary VLAN ID that should be ' - 'set for a given Ethernet Interface\n\n' - ' - Resource: Object Reference to a particular Ethernet ' - 'interface that should be used in composed node\n\n' - ' - Chassis: Object Link to chassis object within this ' + 'describing if given VLAN is tagged\n' + '- PrimaryVLAN: Type Int, Primary VLAN ID that should be ' + 'set for a given Ethernet Interface\n' + '- Resource: Object Reference to a particular Ethernet ' + 'interface that should be used in composed node\n' + '- Chassis: Object Link to chassis object within this ' 'network interface should be contained\n\n' - 'For example:\n' - '[{\n' + 'For example::\n\n' + ' [{\n' ' "SpeedMbps": 1000,\n' ' "PrimaryVLAN": 100,\n' ' "VLANs": [{\n' @@ -232,30 +234,30 @@ class ComposeNode(command.Command): ' "@odata.id": "/redfish/v1/Systems/System1/' 'EthernetInterfaces/LAN1"\n' ' }\n' - '}]')) + ' }]')) parser.add_argument( '--security', dest='security', type=json.loads, metavar='', help=('The security requirements of composed node. It may contain ' - 'one or more optional attributes:\n' - ' - TpmPresent: determine if Composed Node should be ' - 'equipped with TPM module\n\n' - ' - TpmInterfaceType: overrides TpmPresent parameter (if ' + 'one or more optional attributes:\n\n' + '- TpmPresent: determine if Composed Node should be ' + 'equipped with TPM module\n' + '- TpmInterfaceType: overrides TpmPresent parameter (if ' 'specified TPM module expected). System must be equipped ' - 'with only defined TPM interface type.\n\n' - ' - TxtEnabled: determine if Composed Node should have ' - 'Trusted Execution Technology (TXT) mode enabled.\n\n' - ' - ClearTPMOnDelete: used to specify if TPM module should' - ' be cleared on composed node DELETE request.\n\n' - 'For example:\n' - '{\n' + 'with only defined TPM interface type.\n' + '- TxtEnabled: determine if Composed Node should have ' + 'Trusted Execution Technology (TXT) mode enabled.\n' + '- ClearTPMOnDelete: used to specify if TPM module should ' + 'be cleared on composed node DELETE request.\n\n' + 'For example::\n\n' + ' {\n' ' "TpmPresent": True,\n' ' "TpmInterfaceType": "TPM2_0",\n' ' "TxtEnabled": True,\n' ' "ClearTPMOnDelete": True\n' - '}')) + ' }')) return parser def take_action(self, parsed_args):