Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions google/cloud/batch_v1/services/batch_service/transports/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1322,14 +1322,6 @@ def __call__(
"method": "get",
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:getIamPolicy",
},
{
"method": "get",
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:getIamPolicy",
},
{
"method": "get",
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:getIamPolicy",
},
]

request, metadata = self._interceptor.pre_get_iam_policy(request, metadata)
Expand Down Expand Up @@ -1398,16 +1390,6 @@ def __call__(
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:setIamPolicy",
"body": "*",
},
{
"method": "post",
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:setIamPolicy",
"body": "*",
},
{
"method": "post",
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:setIamPolicy",
"body": "*",
},
]

request, metadata = self._interceptor.pre_set_iam_policy(request, metadata)
Expand Down Expand Up @@ -1478,16 +1460,6 @@ def __call__(
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:testIamPermissions",
"body": "*",
},
{
"method": "post",
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:testIamPermissions",
"body": "*",
},
{
"method": "post",
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:testIamPermissions",
"body": "*",
},
]

request, metadata = self._interceptor.pre_test_iam_permissions(
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/batch_v1/types/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ class TaskSpec(proto.Message):
means if the exit code is 0, exit task. If task ends with
non-zero exit code, retry the task with max_retry_count.
environments (MutableMapping[str, str]):
Environment variables to set before running
the Task. You can set up to 100 environments.
Deprecated: please use
environment(non-plural) instead.
volumes (MutableSequence[google.cloud.batch_v1.types.Volume]):
Volumes to mount before running Tasks using
this TaskSpec.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1322,14 +1322,6 @@ def __call__(
"method": "get",
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:getIamPolicy",
},
{
"method": "get",
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:getIamPolicy",
},
{
"method": "get",
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:getIamPolicy",
},
]

request, metadata = self._interceptor.pre_get_iam_policy(request, metadata)
Expand Down Expand Up @@ -1398,16 +1390,6 @@ def __call__(
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:setIamPolicy",
"body": "*",
},
{
"method": "post",
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:setIamPolicy",
"body": "*",
},
{
"method": "post",
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:setIamPolicy",
"body": "*",
},
]

request, metadata = self._interceptor.pre_set_iam_policy(request, metadata)
Expand Down Expand Up @@ -1478,16 +1460,6 @@ def __call__(
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:testIamPermissions",
"body": "*",
},
{
"method": "post",
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:testIamPermissions",
"body": "*",
},
{
"method": "post",
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:testIamPermissions",
"body": "*",
},
]

request, metadata = self._interceptor.pre_test_iam_permissions(
Expand Down
9 changes: 9 additions & 0 deletions google/cloud/batch_v1alpha/types/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ class InstancePolicy(proto.Message):
accelerators (MutableSequence[google.cloud.batch_v1alpha.types.AllocationPolicy.Accelerator]):
The accelerators attached to each VM
instance.
boot_disk (google.cloud.batch_v1alpha.types.AllocationPolicy.Disk):
Book disk to be created and attached to each
VM by this InstancePolicy. Boot disk will be
deleted when the VM is deleted.
disks (MutableSequence[google.cloud.batch_v1alpha.types.AllocationPolicy.AttachedDisk]):
Non-boot disks to be attached for each VM
created by this InstancePolicy. New disks will
Expand Down Expand Up @@ -645,6 +649,11 @@ class InstancePolicy(proto.Message):
number=5,
message="AllocationPolicy.Accelerator",
)
boot_disk: "AllocationPolicy.Disk" = proto.Field(
proto.MESSAGE,
number=8,
message="AllocationPolicy.Disk",
)
disks: MutableSequence["AllocationPolicy.AttachedDisk"] = proto.RepeatedField(
proto.MESSAGE,
number=6,
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/batch_v1alpha/types/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ class TaskSpec(proto.Message):
means if the exit code is 0, exit task. If task ends with
non-zero exit code, retry the task with max_retry_count.
environments (MutableMapping[str, str]):
Environment variables to set before running
the Task. You can set up to 100 environments.
Deprecated: please use
environment(non-plural) instead.
volumes (MutableSequence[google.cloud.batch_v1alpha.types.Volume]):
Volumes to mount before running Tasks using
this TaskSpec.
Expand Down
30 changes: 16 additions & 14 deletions tests/unit/gapic/batch_v1alpha/test_batch_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2630,15 +2630,16 @@ def test_create_job_rest(request_type):
"install_gpu_drivers": True,
}
],
"boot_disk": {
"image": "image_value",
"snapshot": "snapshot_value",
"type_": "type__value",
"size_gb": 739,
"disk_interface": "disk_interface_value",
},
"disks": [
{
"new_disk": {
"image": "image_value",
"snapshot": "snapshot_value",
"type_": "type__value",
"size_gb": 739,
"disk_interface": "disk_interface_value",
},
"new_disk": {},
"existing_disk": "existing_disk_value",
"device_name": "device_name_value",
}
Expand Down Expand Up @@ -3006,15 +3007,16 @@ def test_create_job_rest_bad_request(
"install_gpu_drivers": True,
}
],
"boot_disk": {
"image": "image_value",
"snapshot": "snapshot_value",
"type_": "type__value",
"size_gb": 739,
"disk_interface": "disk_interface_value",
},
"disks": [
{
"new_disk": {
"image": "image_value",
"snapshot": "snapshot_value",
"type_": "type__value",
"size_gb": 739,
"disk_interface": "disk_interface_value",
},
"new_disk": {},
"existing_disk": "existing_disk_value",
"device_name": "device_name_value",
}
Expand Down