Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 7e275de

Browse files
chore(docs): update environment field deprecated comment (#81)
* feat: add InstancePolicy.boot_disk fix: ServiceAccount.scopes is no longer deprecated fix: removed unused endpoints for IAM methods PiperOrigin-RevId: 495370831 Source-Link: googleapis/googleapis@8f55774 Source-Link: https://github.com/googleapis/googleapis-gen/commit/44ea51b0580dd8cfa2a28c8c44093c1b73db3099 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDRlYTUxYjA1ODBkZDhjZmEyYTI4YzhjNDQwOTNjMWI3M2RiMzA5OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore(docs): update environment field deprecated comment fix: remove unsupported HTTP bindings for IAMPolicy RPCs PiperOrigin-RevId: 495371163 Source-Link: googleapis/googleapis@88f1497 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0f1443aeac4081fb5d8ef2d1c0d58a08fc3dec69 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGYxNDQzYWVhYzQwODFmYjVkOGVmMmQxYzBkNThhMDhmYzNkZWM2OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 84166ae commit 7e275de

File tree

6 files changed

+29
-74
lines changed

6 files changed

+29
-74
lines changed

google/cloud/batch_v1/services/batch_service/transports/rest.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,14 +1322,6 @@ def __call__(
13221322
"method": "get",
13231323
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:getIamPolicy",
13241324
},
1325-
{
1326-
"method": "get",
1327-
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:getIamPolicy",
1328-
},
1329-
{
1330-
"method": "get",
1331-
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:getIamPolicy",
1332-
},
13331325
]
13341326

13351327
request, metadata = self._interceptor.pre_get_iam_policy(request, metadata)
@@ -1398,16 +1390,6 @@ def __call__(
13981390
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:setIamPolicy",
13991391
"body": "*",
14001392
},
1401-
{
1402-
"method": "post",
1403-
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:setIamPolicy",
1404-
"body": "*",
1405-
},
1406-
{
1407-
"method": "post",
1408-
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:setIamPolicy",
1409-
"body": "*",
1410-
},
14111393
]
14121394

14131395
request, metadata = self._interceptor.pre_set_iam_policy(request, metadata)
@@ -1478,16 +1460,6 @@ def __call__(
14781460
"uri": "/v1/{resource=projects/*/locations/*/jobs/*}:testIamPermissions",
14791461
"body": "*",
14801462
},
1481-
{
1482-
"method": "post",
1483-
"uri": "/v1/{resource=projects/*/locations/*/tasks/*}:testIamPermissions",
1484-
"body": "*",
1485-
},
1486-
{
1487-
"method": "post",
1488-
"uri": "/v1/{resource=projects/*/locations/*/nodes/*}:testIamPermissions",
1489-
"body": "*",
1490-
},
14911463
]
14921464

14931465
request, metadata = self._interceptor.pre_test_iam_permissions(

google/cloud/batch_v1/types/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ class TaskSpec(proto.Message):
397397
means if the exit code is 0, exit task. If task ends with
398398
non-zero exit code, retry the task with max_retry_count.
399399
environments (MutableMapping[str, str]):
400-
Environment variables to set before running
401-
the Task. You can set up to 100 environments.
400+
Deprecated: please use
401+
environment(non-plural) instead.
402402
volumes (MutableSequence[google.cloud.batch_v1.types.Volume]):
403403
Volumes to mount before running Tasks using
404404
this TaskSpec.

google/cloud/batch_v1alpha/services/batch_service/transports/rest.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,14 +1322,6 @@ def __call__(
13221322
"method": "get",
13231323
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:getIamPolicy",
13241324
},
1325-
{
1326-
"method": "get",
1327-
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:getIamPolicy",
1328-
},
1329-
{
1330-
"method": "get",
1331-
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:getIamPolicy",
1332-
},
13331325
]
13341326

13351327
request, metadata = self._interceptor.pre_get_iam_policy(request, metadata)
@@ -1398,16 +1390,6 @@ def __call__(
13981390
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:setIamPolicy",
13991391
"body": "*",
14001392
},
1401-
{
1402-
"method": "post",
1403-
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:setIamPolicy",
1404-
"body": "*",
1405-
},
1406-
{
1407-
"method": "post",
1408-
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:setIamPolicy",
1409-
"body": "*",
1410-
},
14111393
]
14121394

14131395
request, metadata = self._interceptor.pre_set_iam_policy(request, metadata)
@@ -1478,16 +1460,6 @@ def __call__(
14781460
"uri": "/v1alpha/{resource=projects/*/locations/*/jobs/*}:testIamPermissions",
14791461
"body": "*",
14801462
},
1481-
{
1482-
"method": "post",
1483-
"uri": "/v1alpha/{resource=projects/*/locations/*/tasks/*}:testIamPermissions",
1484-
"body": "*",
1485-
},
1486-
{
1487-
"method": "post",
1488-
"uri": "/v1alpha/{resource=projects/*/locations/*/nodes/*}:testIamPermissions",
1489-
"body": "*",
1490-
},
14911463
]
14921464

14931465
request, metadata = self._interceptor.pre_test_iam_permissions(

google/cloud/batch_v1alpha/types/job.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,10 @@ class InstancePolicy(proto.Message):
612612
accelerators (MutableSequence[google.cloud.batch_v1alpha.types.AllocationPolicy.Accelerator]):
613613
The accelerators attached to each VM
614614
instance.
615+
boot_disk (google.cloud.batch_v1alpha.types.AllocationPolicy.Disk):
616+
Book disk to be created and attached to each
617+
VM by this InstancePolicy. Boot disk will be
618+
deleted when the VM is deleted.
615619
disks (MutableSequence[google.cloud.batch_v1alpha.types.AllocationPolicy.AttachedDisk]):
616620
Non-boot disks to be attached for each VM
617621
created by this InstancePolicy. New disks will
@@ -645,6 +649,11 @@ class InstancePolicy(proto.Message):
645649
number=5,
646650
message="AllocationPolicy.Accelerator",
647651
)
652+
boot_disk: "AllocationPolicy.Disk" = proto.Field(
653+
proto.MESSAGE,
654+
number=8,
655+
message="AllocationPolicy.Disk",
656+
)
648657
disks: MutableSequence["AllocationPolicy.AttachedDisk"] = proto.RepeatedField(
649658
proto.MESSAGE,
650659
number=6,

google/cloud/batch_v1alpha/types/task.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ class TaskSpec(proto.Message):
411411
means if the exit code is 0, exit task. If task ends with
412412
non-zero exit code, retry the task with max_retry_count.
413413
environments (MutableMapping[str, str]):
414-
Environment variables to set before running
415-
the Task. You can set up to 100 environments.
414+
Deprecated: please use
415+
environment(non-plural) instead.
416416
volumes (MutableSequence[google.cloud.batch_v1alpha.types.Volume]):
417417
Volumes to mount before running Tasks using
418418
this TaskSpec.

tests/unit/gapic/batch_v1alpha/test_batch_service.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2630,15 +2630,16 @@ def test_create_job_rest(request_type):
26302630
"install_gpu_drivers": True,
26312631
}
26322632
],
2633+
"boot_disk": {
2634+
"image": "image_value",
2635+
"snapshot": "snapshot_value",
2636+
"type_": "type__value",
2637+
"size_gb": 739,
2638+
"disk_interface": "disk_interface_value",
2639+
},
26332640
"disks": [
26342641
{
2635-
"new_disk": {
2636-
"image": "image_value",
2637-
"snapshot": "snapshot_value",
2638-
"type_": "type__value",
2639-
"size_gb": 739,
2640-
"disk_interface": "disk_interface_value",
2641-
},
2642+
"new_disk": {},
26422643
"existing_disk": "existing_disk_value",
26432644
"device_name": "device_name_value",
26442645
}
@@ -3006,15 +3007,16 @@ def test_create_job_rest_bad_request(
30063007
"install_gpu_drivers": True,
30073008
}
30083009
],
3010+
"boot_disk": {
3011+
"image": "image_value",
3012+
"snapshot": "snapshot_value",
3013+
"type_": "type__value",
3014+
"size_gb": 739,
3015+
"disk_interface": "disk_interface_value",
3016+
},
30093017
"disks": [
30103018
{
3011-
"new_disk": {
3012-
"image": "image_value",
3013-
"snapshot": "snapshot_value",
3014-
"type_": "type__value",
3015-
"size_gb": 739,
3016-
"disk_interface": "disk_interface_value",
3017-
},
3019+
"new_disk": {},
30183020
"existing_disk": "existing_disk_value",
30193021
"device_name": "device_name_value",
30203022
}

0 commit comments

Comments
 (0)