From 151915960acbb6ade7ad284e3bb002ed32b356f7 Mon Sep 17 00:00:00 2001 From: ericxiett Date: Fri, 5 Feb 2021 00:35:38 +0000 Subject: [PATCH] Fix some errors in the document If the recovery policy uses uppercase, an error will be reported. This patch modifies these to lowercase. Closes-Bug: #1914482 Co-Authored-By: zhangyangyang Change-Id: Ic4bf5a4b19df07364c09fd46f1a92a809c77b241 --- api-ref/source/failover-segments.inc | 16 ++++++++-------- api-ref/source/parameters.yaml | 2 +- doc/api_samples/segments/segment-create-req.json | 2 +- .../segments/segment-create-resp.json | 2 +- doc/api_samples/segments/segment-get-resp.json | 2 +- .../segments/segment-update-resp.json | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api-ref/source/failover-segments.inc b/api-ref/source/failover-segments.inc index 57f9ac6d..2f82968e 100644 --- a/api-ref/source/failover-segments.inc +++ b/api-ref/source/failover-segments.inc @@ -36,12 +36,12 @@ recovery action to be followed when any host in a segment goes down. `enabled` attribute indicates whether notifications which belong to this segment will be dealt with. The possible `recovery_method` values are: -- ``AUTO``. Auto recovery action. -- ``RESERVED_HOST``. Reserved host recovery action. -- ``AUTO_PRIORITY``. First executes auto and if auto fails then retried with - reserved host recover action. -- ``RH_PRIORITY``. First executes reserved host and if it fails then retried - with reserved host recover action. +- ``auto``. Auto recovery action. +- ``reserved_host``. Reserved host recovery action. +- ``auto_priority``. First executes auto and if auto fails then retried with + reserved host recovery action. +- ``rh_priority``. First executes reserved host and if it fails then retried + with auto recovery action. You can filter on the `service_type`, `recovery_method` and `enabled` when you complete a list segments request. @@ -98,8 +98,8 @@ Creates a segment. Creates a FailoverSegment with name, description, service_type, enabled and recovery_method. For `service_type` user can mention the name of service for which this segment is created. As of now user can mention `COMPUTE` as -`service_type`. For `recovery_method` user can mention either `AUTO`, -`RESERVED_HOST`, `AUTO_PRIORITY` or `RH_PRIORITY`. Segment name should be +`service_type`. For `recovery_method` user can mention either `auto`, +`reserved_host`, `auto_priority` or `rh_priority`. Segment name should be unique. For `enabled` user can mention `True` or `False` to enable/disable this segment. diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 785bc096..5cc480d5 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -349,7 +349,7 @@ segment_recovery_method: required: true description: | Type of recovery if any host in this segment goes down. User can mention - either 'AUTO', 'RESERVED_HOST', 'AUTO_PRIORITY' or 'RH_PRIORITY'. + either 'auto', 'reserved_host', 'auto_priority' or 'rh_priority'. segment_service_type: type: string in: body diff --git a/doc/api_samples/segments/segment-create-req.json b/doc/api_samples/segments/segment-create-req.json index a7968f8d..7954b77a 100644 --- a/doc/api_samples/segments/segment-create-req.json +++ b/doc/api_samples/segments/segment-create-req.json @@ -1,7 +1,7 @@ { "segment": { "service_type": "COMPUTE", - "recovery_method": "AUTO", + "recovery_method": "auto", "name": "new_segment", "enabled": True } diff --git a/doc/api_samples/segments/segment-create-resp.json b/doc/api_samples/segments/segment-create-resp.json index 0d2a28e9..4252acf9 100644 --- a/doc/api_samples/segments/segment-create-resp.json +++ b/doc/api_samples/segments/segment-create-resp.json @@ -4,7 +4,7 @@ "deleted": false, "created_at": "2017-04-21T08:59:53.991030", "description": null, - "recovery_method": "AUTO", + "recovery_method": "auto", "updated_at": null, "service_type": "COMPUTE", "deleted_at": null, diff --git a/doc/api_samples/segments/segment-get-resp.json b/doc/api_samples/segments/segment-get-resp.json index 0d2a28e9..4252acf9 100644 --- a/doc/api_samples/segments/segment-get-resp.json +++ b/doc/api_samples/segments/segment-get-resp.json @@ -4,7 +4,7 @@ "deleted": false, "created_at": "2017-04-21T08:59:53.991030", "description": null, - "recovery_method": "AUTO", + "recovery_method": "auto", "updated_at": null, "service_type": "COMPUTE", "deleted_at": null, diff --git a/doc/api_samples/segments/segment-update-resp.json b/doc/api_samples/segments/segment-update-resp.json index 00e2969f..5da46d6c 100644 --- a/doc/api_samples/segments/segment-update-resp.json +++ b/doc/api_samples/segments/segment-update-resp.json @@ -4,7 +4,7 @@ "deleted": false, "created_at": "2017-04-21T08:59:54.000000", "description": null, - "recovery_method": "AUTO", + "recovery_method": "auto", "updated_at": "2017-04-21T09:47:03.748028", "service_type": "COMPUTE", "deleted_at": null,