From 21742ff1c589cf550b52d1c2ee9bcec16ee8398e Mon Sep 17 00:00:00 2001 From: Eric Bischoff Date: Mon, 18 Nov 2024 20:19:50 +0100 Subject: [PATCH] Add missing parameters to volume functions Signed-off-by: Eric Bischoff --- doc/source/parameters.yaml | 19 +++++++++++++++++++ doc/source/restapi.rst | 8 ++++++-- .../fvt/api_templates/test_volume_attach.tpl | 18 ++++++++++++++++++ ...tach_detach.tpl => test_volume_detach.tpl} | 1 + 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 zvmsdk/tests/fvt/api_templates/test_volume_attach.tpl rename zvmsdk/tests/fvt/api_templates/{test_volume_attach_detach.tpl => test_volume_detach.tpl} (89%) diff --git a/doc/source/parameters.yaml b/doc/source/parameters.yaml index dcef7b282..aef8a2004 100644 --- a/doc/source/parameters.yaml +++ b/doc/source/parameters.yaml @@ -1251,6 +1251,19 @@ root_volume: in: body required: false type: boolean +update_connections_only: + description: | + Update connections in database only, do not undedicate in CP. + in: body + required: false + type: boolean +do_rollback: + description: | + Roll back will be done if any phase fails. + Default is True. + in: body + required: false + type: boolean disk_list_output: description: | A list of created disks information for the guest. @@ -1342,6 +1355,12 @@ fcp_list: in: body required: true type: list +fcp_template_id: + description: | + Unique identifier of the FCP template. + in: body + required: true + type: string wwpn_list: description: | World Wide Port Name identifiers. diff --git a/doc/source/restapi.rst b/doc/source/restapi.rst index 68d4198d8..7e433ff8d 100644 --- a/doc/source/restapi.rst +++ b/doc/source/restapi.rst @@ -381,16 +381,18 @@ Attach a volume to a VM in z/VM. - connection: volume_conn - assigner_id: assigner_id - zvm_fcp: fcp_list + - fcp_template_id: fcp_template_id - target_wwpn: volume_wwpn - target_lun: volume_lun - os_version: guest_os_version - multipath: guest_multipath - mount_point: mount_point - is_root_volume: root_volume + - do_rollback: do_rollback * Request sample: -.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_volume_attach_detach.tpl +.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_volume_attach.tpl :language: javascript * Response code: @@ -422,10 +424,12 @@ Detach a volume from a VM in z/VM. - multipath: guest_multipath - mount_point: mount_point - is_root_volume: root_volume + - update_connections_only: update_connections_only + - do_rollback: do_rollback * Request sample: -.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_volume_attach_detach.tpl +.. literalinclude:: ../../zvmsdk/tests/fvt/api_templates/test_volume_detach.tpl :language: javascript * Response code: diff --git a/zvmsdk/tests/fvt/api_templates/test_volume_attach.tpl b/zvmsdk/tests/fvt/api_templates/test_volume_attach.tpl new file mode 100644 index 000000000..468d51f82 --- /dev/null +++ b/zvmsdk/tests/fvt/api_templates/test_volume_attach.tpl @@ -0,0 +1,18 @@ +{ + "info": + { + "connection": + { + "assigner_id": "username", + "zvm_fcp": "1fc5", + "fcp_template_id": "307c88c6-a5e0-11ef-b1eb-5b75c5890e27", + "target_wwpn": "0x50050763050b073d", + "target_lun": "0x4020400100000000", + "os_version": "redhat7", + "multipath": True, + "mount_point": "/dev/sdz", + "is_root_volume": False, + "do_rollback": True + } + } +} diff --git a/zvmsdk/tests/fvt/api_templates/test_volume_attach_detach.tpl b/zvmsdk/tests/fvt/api_templates/test_volume_detach.tpl similarity index 89% rename from zvmsdk/tests/fvt/api_templates/test_volume_attach_detach.tpl rename to zvmsdk/tests/fvt/api_templates/test_volume_detach.tpl index e54dca7c8..f59c852f5 100644 --- a/zvmsdk/tests/fvt/api_templates/test_volume_attach_detach.tpl +++ b/zvmsdk/tests/fvt/api_templates/test_volume_detach.tpl @@ -11,6 +11,7 @@ "multipath": True, "mount_point": "/dev/sdz", "is_root_volume": False, + "update_connections_only": False, "do_rollback": True } }