Skip to content

Commit bcd061f

Browse files
feat: [google-cloud-batch] add a install_ops_agent field to InstancePolicyOrTemplate for Ops Agent support (googleapis#12839)
- [ ] Regenerate this pull request now. BEGIN_COMMIT_OVERRIDE --- feat: add a install_ops_agent field to InstancePolicyOrTemplate for Ops Agent support --- docs:Add instructions on how to configure cross-project pubsub publisher --- docs: document default disk type: pd-standard for non boot disk, pd-balanced for boot disk --- docs: Update list of volume.mount_options field --- docs: Update GCS description of volume.mount_options field --- docs: Update links in the description of volume.mount_options field END_COMMIT_OVERRIDE PiperOrigin-RevId: 646638165 Source-Link: googleapis/googleapis@0333730 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1521ef6209bcd62e9924f2ceaee5c36411510a3b Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiIxNTIxZWY2MjA5YmNkNjJlOTkyNGYyY2VhZWU1YzM2NDExNTEwYTNiIn0= BEGIN_NESTED_COMMIT docs: [google-cloud-batch]Add instructions on how to configure cross-project pubsub publisher --- docs: document default disk type: pd-standard for non boot disk, pd-balanced for boot disk --- docs: Update list of volume.mount_options field --- docs: Update GCS description of volume.mount_options field --- docs: Update links in the description of volume.mount_options field PiperOrigin-RevId: 646637874 Source-Link: googleapis/googleapis@a0eb8ce Source-Link: https://github.com/googleapis/googleapis-gen/commit/ecfc6d583e7cad1290c435ec80d381b5e3169288 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJlY2ZjNmQ1ODNlN2NhZDEyOTBjNDM1ZWM4MGQzODFiNWUzMTY5Mjg4In0= END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
1 parent 7ce3bf4 commit bcd061f

14 files changed

Lines changed: 141 additions & 55 deletions

File tree

packages/google-cloud-batch/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Python Client for Cloud Batch
1515
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-batch.svg
1616
:target: https://pypi.org/project/google-cloud-batch/
1717
.. _Cloud Batch: https://cloud.google.com/batch/docs
18-
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/batch/latest
18+
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/batch/latest/summary_overview
1919
.. _Product Documentation: https://cloud.google.com/batch/docs
2020

2121
Quick Start

packages/google-cloud-batch/docs/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@ For a list of all ``google-cloud-batch`` releases:
3232
:maxdepth: 2
3333

3434
CHANGELOG
35+
36+
.. toctree::
37+
:hidden:
38+
39+
summary_overview.md
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[
2+
This is a templated file. Adding content to this file may result in it being
3+
reverted. Instead, if you want to place additional content, create an
4+
"overview_content.md" file in `docs/` directory. The Sphinx tool will
5+
pick up on the content and merge the content.
6+
]: #
7+
8+
# Cloud Batch API
9+
10+
Overview of the APIs available for Cloud Batch API.
11+
12+
## All entries
13+
14+
Classes, methods and properties & attributes for
15+
Cloud Batch API.
16+
17+
[classes](https://cloud.google.com/python/docs/reference/batch/latest/summary_class.html)
18+
19+
[methods](https://cloud.google.com/python/docs/reference/batch/latest/summary_method.html)
20+
21+
[properties and
22+
attributes](https://cloud.google.com/python/docs/reference/batch/latest/summary_property.html)

packages/google-cloud-batch/google/cloud/batch/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.21" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-batch/google/cloud/batch_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.21" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,11 +342,19 @@ class JobNotification(proto.Message):
342342
343343
Attributes:
344344
pubsub_topic (str):
345-
The Pub/Sub topic where notifications like the job state
346-
changes will be published. The topic must exist in the same
347-
project as the job and billings will be charged to this
348-
project. If not specified, no Pub/Sub messages will be sent.
349-
Topic format: ``projects/{project}/topics/{topic}``.
345+
The Pub/Sub topic where notifications for the job, like
346+
state changes, will be published. If undefined, no Pub/Sub
347+
notifications are sent for this job.
348+
349+
Specify the topic using the following format:
350+
``projects/{project}/topics/{topic}``. Notably, if you want
351+
to specify a Pub/Sub topic that is in a different project
352+
than the job, your administrator must grant your project's
353+
Batch service agent permission to publish to that topic.
354+
355+
For more information about configuring Pub/Sub notifications
356+
for a job, see
357+
https://cloud.google.com/batch/docs/enable-notifications.
350358
message (google.cloud.batch_v1.types.JobNotification.Message):
351359
The attribute requirements of messages to be
352360
sent to this Pub/Sub topic. Without this field,
@@ -556,7 +564,10 @@ class Disk(proto.Message):
556564
Disk type as shown in ``gcloud compute disk-types list``.
557565
For example, local SSD uses type "local-ssd". Persistent
558566
disks and boot disks use "pd-balanced", "pd-extreme",
559-
"pd-ssd" or "pd-standard".
567+
"pd-ssd" or "pd-standard". If not specified, "pd-standard"
568+
will be used as the default type for non-boot disks,
569+
"pd-balanced" will be used as the default type for boot
570+
disks.
560571
size_gb (int):
561572
Disk size in GB.
562573
@@ -797,6 +808,10 @@ class InstancePolicyOrTemplate(proto.Message):
797808
https://cloud.google.com/container-optimized-os/docs/release-notes.
798809
For non Container-Optimized Image cases, following
799810
https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
811+
install_ops_agent (bool):
812+
Optional. Set this field true if you want
813+
Batch to install Ops Agent on your behalf.
814+
Default is false.
800815
"""
801816

802817
policy: "AllocationPolicy.InstancePolicy" = proto.Field(
@@ -814,6 +829,10 @@ class InstancePolicyOrTemplate(proto.Message):
814829
proto.BOOL,
815830
number=3,
816831
)
832+
install_ops_agent: bool = proto.Field(
833+
proto.BOOL,
834+
number=4,
835+
)
817836

818837
class NetworkInterface(proto.Message):
819838
r"""A network interface.

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

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,21 @@ class Volume(proto.Message):
6262
The mount path for the volume, e.g.
6363
/mnt/disks/share.
6464
mount_options (MutableSequence[str]):
65-
For Google Cloud Storage (GCS), mount options
66-
are the options supported by the gcsfuse tool
67-
(https://github.com/GoogleCloudPlatform/gcsfuse).
68-
For existing persistent disks, mount options
69-
provided by the mount command
70-
(https://man7.org/linux/man-pages/man8/mount.8.html)
71-
except writing are supported. This is due to
72-
restrictions of multi-writer mode
73-
(https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
74-
For other attached disks and Network File System
75-
(NFS), mount options are these supported by the
76-
mount command
77-
(https://man7.org/linux/man-pages/man8/mount.8.html).
65+
Mount options vary based on the type of storage volume:
66+
67+
- For a Cloud Storage bucket, all the mount options
68+
provided by the ```gcsfuse``
69+
tool <https://cloud.google.com/storage/docs/gcsfuse-cli>`__
70+
are supported.
71+
- For an existing persistent disk, all mount options
72+
provided by the ```mount``
73+
command <https://man7.org/linux/man-pages/man8/mount.8.html>`__
74+
except writing are supported. This is due to restrictions
75+
of `multi-writer
76+
mode <https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms>`__.
77+
- For any other disk or a Network File System (NFS), all
78+
the mount options provided by the ``mount`` command are
79+
supported.
7880
"""
7981

8082
nfs: "NFS" = proto.Field(

packages/google-cloud-batch/google/cloud/batch_v1alpha/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.21" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,19 @@ class JobNotification(proto.Message):
445445
446446
Attributes:
447447
pubsub_topic (str):
448-
The Pub/Sub topic where notifications like the job state
449-
changes will be published. The topic must exist in the same
450-
project as the job and billings will be charged to this
451-
project. If not specified, no Pub/Sub messages will be sent.
452-
Topic format: ``projects/{project}/topics/{topic}``.
448+
The Pub/Sub topic where notifications for the job, like
449+
state changes, will be published. If undefined, no Pub/Sub
450+
notifications are sent for this job.
451+
452+
Specify the topic using the following format:
453+
``projects/{project}/topics/{topic}``. Notably, if you want
454+
to specify a Pub/Sub topic that is in a different project
455+
than the job, your administrator must grant your project's
456+
Batch service agent permission to publish to that topic.
457+
458+
For more information about configuring Pub/Sub notifications
459+
for a job, see
460+
https://cloud.google.com/batch/docs/enable-notifications.
453461
message (google.cloud.batch_v1alpha.types.JobNotification.Message):
454462
The attribute requirements of messages to be
455463
sent to this Pub/Sub topic. Without this field,
@@ -676,7 +684,10 @@ class Disk(proto.Message):
676684
Disk type as shown in ``gcloud compute disk-types list``.
677685
For example, local SSD uses type "local-ssd". Persistent
678686
disks and boot disks use "pd-balanced", "pd-extreme",
679-
"pd-ssd" or "pd-standard".
687+
"pd-ssd" or "pd-standard". If not specified, "pd-standard"
688+
will be used as the default type for non-boot disks,
689+
"pd-balanced" will be used as the default type for boot
690+
disks.
680691
size_gb (int):
681692
Disk size in GB.
682693

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

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,21 @@ class Volume(proto.Message):
6767
The mount path for the volume, e.g.
6868
/mnt/disks/share.
6969
mount_options (MutableSequence[str]):
70-
For Google Cloud Storage (GCS), mount options
71-
are the options supported by the gcsfuse tool
72-
(https://github.com/GoogleCloudPlatform/gcsfuse).
73-
For existing persistent disks, mount options
74-
provided by the mount command
75-
(https://man7.org/linux/man-pages/man8/mount.8.html)
76-
except writing are supported. This is due to
77-
restrictions of multi-writer mode
78-
(https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
79-
For other attached disks and Network File System
80-
(NFS), mount options are these supported by the
81-
mount command
82-
(https://man7.org/linux/man-pages/man8/mount.8.html).
70+
Mount options vary based on the type of storage volume:
71+
72+
- For a Cloud Storage bucket, all the mount options
73+
provided by the ```gcsfuse``
74+
tool <https://cloud.google.com/storage/docs/gcsfuse-cli>`__
75+
are supported.
76+
- For an existing persistent disk, all mount options
77+
provided by the ```mount``
78+
command <https://man7.org/linux/man-pages/man8/mount.8.html>`__
79+
except writing are supported. This is due to restrictions
80+
of `multi-writer
81+
mode <https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms>`__.
82+
- For any other disk or a Network File System (NFS), all
83+
the mount options provided by the ``mount`` command are
84+
supported.
8385
"""
8486

8587
nfs: "NFS" = proto.Field(

0 commit comments

Comments
 (0)