From 11dc8956f07d799b9a04e88d55eb8c011d7a29ec Mon Sep 17 00:00:00 2001 From: Thoughtseize1 Date: Fri, 20 Dec 2024 19:01:51 +0100 Subject: [PATCH] Add comments --- .../ingredients/disks/attach_regional_disk_force.py | 4 +++- .../snippets/disks/attach_regional_disk_force.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compute/client_library/ingredients/disks/attach_regional_disk_force.py b/compute/client_library/ingredients/disks/attach_regional_disk_force.py index c302ab015825..8e58af642d50 100644 --- a/compute/client_library/ingredients/disks/attach_regional_disk_force.py +++ b/compute/client_library/ingredients/disks/attach_regional_disk_force.py @@ -26,7 +26,9 @@ def attach_disk_force( project_id: str, vm_name: str, vm_zone: str, disk_name: str, disk_region: str ) -> None: """ - Attaches a regional disk to a compute instance with force attachment. + Force-attaches a regional disk to a compute instance, even if it is + still attached to another instance. Useful when the original instance + cannot be reached or disconnected. Args: project_id (str): The ID of the Google Cloud project. vm_name (str): The name of the compute instance you want to attach a disk to. diff --git a/compute/client_library/snippets/disks/attach_regional_disk_force.py b/compute/client_library/snippets/disks/attach_regional_disk_force.py index 8e70ebb47f1b..1133f39e6831 100644 --- a/compute/client_library/snippets/disks/attach_regional_disk_force.py +++ b/compute/client_library/snippets/disks/attach_regional_disk_force.py @@ -82,7 +82,9 @@ def attach_disk_force( project_id: str, vm_name: str, vm_zone: str, disk_name: str, disk_region: str ) -> None: """ - Attaches a regional disk to a compute instance with force attachment. + Force-attaches a regional disk to a compute instance, even if it is + still attached to another instance. Useful when the original instance + cannot be reached or disconnected. Args: project_id (str): The ID of the Google Cloud project. vm_name (str): The name of the compute instance you want to attach a disk to.