From 381a63fc2f009fb7611e1352970b03b31dbdaffd Mon Sep 17 00:00:00 2001 From: Eric Bischoff Date: Sun, 17 Nov 2024 15:27:51 +0100 Subject: [PATCH] Add FCP templates API calls Signed-off-by: Eric Bischoff --- doc/source/parameters.yaml | 49 ++++++++++++++++++++++++++ doc/source/restapi.rst | 72 +++++++++++++++++++++++++++++++++++++- 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/doc/source/parameters.yaml b/doc/source/parameters.yaml index aef8a2004..82b9b92d7 100644 --- a/doc/source/parameters.yaml +++ b/doc/source/parameters.yaml @@ -1361,6 +1361,55 @@ fcp_template_id: in: body required: true type: string +fcp_template_id_path: + description: | + Unique identifier of the FCP template. + in: path + required: true + type: string +fcp_template: + description: | + Various attibutes of the FCP template. + in: body + required: true + type: dict +fcp_template_name: + description: | + Name of FCP template. + in: body + required: true + type: string +fcp_template_description: + description: | + Description of FCP template, e.g. "Two paths template". + in: body + required: false + type: string +fcp_template_fcp_devices: + description: | + FCP devices list. '-' indicates a range, and ';' is a separator. + Example\: "0011-0013;0015;0017-0018". + in: body + required: false + type: string +fcp_template_host_default: + description: | + This template is the default template for the host or not. + in: body + required: false + type: boolean +fcp_template_storage_providers: + description: | + List of storage providers. + in: body + required: false + type: list +fcp_template_min_fcp_paths_count: + description: | + Minimum number of multipath paths. + in: body + required: false + type: integer wwpn_list: description: | World Wide Port Name identifiers. diff --git a/doc/source/restapi.rst b/doc/source/restapi.rst index 7e433ff8d..51dd53f38 100644 --- a/doc/source/restapi.rst +++ b/doc/source/restapi.rst @@ -2039,7 +2039,77 @@ Get volume connector for z/VM. .. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_get_volume_connector.tpl :language: javascript -Get FCP usage +Create FCP Template +------------------- + +**POST /volumes/fcptemplates** + +Create a FCP multipath template. + +* Request: + +.. restapi_parameters:: parameters.yaml + + - name: fcp_template_name + - description: fcp_template_description + - fcp_devices: fcp_template_fcp_devices + - host_default: fcp_template_host_default + - storage_providers: fcp_template_storage_providers + - min_fcp_paths_count: fcp_template_min_fcp_paths_count + +* Response code: + + HTTP status code 200 on success. + +* Response contents: + +.. restapi_parameters:: parameters.yaml + + - fcp_template: fcp_template + - id: fcp_template_id + - name: fcp_template_name + - description: fcp_template_description + - host_default: fcp_template_host_default + - storage_providers: fcp_template_storage_providers + - min_fcp_paths_count: fcp_template_min_fcp_paths_count + +Delete FCP Template +------------------- + +**DELETE /volumes/fcptemplates/{template_id}** + +Delete a FCP multipath template. + +* Request: + +.. restapi_parameters:: parameters.yaml + + - template_id: fcp_template_id_path + +* Response code: + + HTTP status code 200 on success. + +* Response contents: + + No response. + +Get FCP Templates +----------------- + +**GET /volumes/fcptemplates** + +Edit FCP Template +----------------- + +**PUT /volumes/fcptemplates/{template_id}** + +Get FCP Templates Details +------------------------- + +**GET /volumes/fcptemplates/detail** + +Get FCP Usage ------------- **GET /volumes/fcp/{fcp_id}**