Skip to content

Commit d46f714

Browse files
docs: Update description on size_gb in disk field (#11615)
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ceffe41 commit d46f714

File tree

2 files changed

+32
-18
lines changed
  • packages/google-cloud-batch/google/cloud

2 files changed

+32
-18
lines changed

packages/google-cloud-batch/google/cloud/batch_v1/types/job.py

+16-9
Original file line numberDiff line numberDiff line change
@@ -505,15 +505,22 @@ class Disk(proto.Message):
505505
size_gb (int):
506506
Disk size in GB.
507507
508-
For persistent disk, this field is ignored if
509-
``data_source`` is ``image`` or ``snapshot``. For local SSD,
510-
size_gb should be a multiple of 375GB, otherwise, the final
511-
size will be the next greater multiple of 375 GB. For boot
512-
disk, Batch will calculate the boot disk size based on
513-
source image and task requirements if you do not speicify
514-
the size. If both this field and the boot_disk_mib field in
515-
task spec's compute_resource are defined, Batch will only
516-
honor this field.
508+
**Non-Boot Disk**: If the ``type`` specifies a persistent
509+
disk, this field is ignored if ``data_source`` is set as
510+
``image`` or ``snapshot``. If the ``type`` specifies a local
511+
SSD, this field should be a multiple of 375 GB, otherwise,
512+
the final size will be the next greater multiple of 375 GB.
513+
514+
**Boot Disk**: Batch will calculate the boot disk size based
515+
on source image and task requirements if you do not speicify
516+
the size. If both this field and the ``boot_disk_mib`` field
517+
in task spec's ``compute_resource`` are defined, Batch will
518+
only honor this field. Also, this field should be no smaller
519+
than the source disk's size when the ``data_source`` is set
520+
as ``snapshot`` or ``image``. For example, if you set an
521+
image as the ``data_source`` field and the image's default
522+
disk size 30 GB, you can only use this field to make the
523+
disk larger or equal to 30 GB.
517524
disk_interface (str):
518525
Local SSDs are available through both "SCSI"
519526
and "NVMe" interfaces. If not indicated, "NVMe"

packages/google-cloud-batch/google/cloud/batch_v1alpha/types/job.py

+16-9
Original file line numberDiff line numberDiff line change
@@ -624,15 +624,22 @@ class Disk(proto.Message):
624624
size_gb (int):
625625
Disk size in GB.
626626
627-
For persistent disk, this field is ignored if
628-
``data_source`` is ``image`` or ``snapshot``. For local SSD,
629-
size_gb should be a multiple of 375GB, otherwise, the final
630-
size will be the next greater multiple of 375 GB. For boot
631-
disk, Batch will calculate the boot disk size based on
632-
source image and task requirements if you do not speicify
633-
the size. If both this field and the boot_disk_mib field in
634-
task spec's compute_resource are defined, Batch will only
635-
honor this field.
627+
**Non-Boot Disk**: If the ``type`` specifies a persistent
628+
disk, this field is ignored if ``data_source`` is set as
629+
``image`` or ``snapshot``. If the ``type`` specifies a local
630+
SSD, this field should be a multiple of 375 GB, otherwise,
631+
the final size will be the next greater multiple of 375 GB.
632+
633+
**Boot Disk**: Batch will calculate the boot disk size based
634+
on source image and task requirements if you do not speicify
635+
the size. If both this field and the ``boot_disk_mib`` field
636+
in task spec's ``compute_resource`` are defined, Batch will
637+
only honor this field. Also, this field should be no smaller
638+
than the source disk's size when the ``data_source`` is set
639+
as ``snapshot`` or ``image``. For example, if you set an
640+
image as the ``data_source`` field and the image's default
641+
disk size 30 GB, you can only use this field to make the
642+
disk larger or equal to 30 GB.
636643
disk_interface (str):
637644
Local SSDs are available through both "SCSI"
638645
and "NVMe" interfaces. If not indicated, "NVMe"

0 commit comments

Comments
 (0)