Skip to content

Commit

Permalink
feat: add InstancePolicy.boot_disk (#3752)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

fix: remove unsupported HTTP bindings for IAMPolicy RPCs

PiperOrigin-RevId: 495371163

Source-Link: https://togithub.com/googleapis/googleapis/commit/88f1497c767747816652323799380fdd802aa79d

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/0f1443aeac4081fb5d8ef2d1c0d58a08fc3dec69
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiIwZjE0NDNhZWFjNDA4MWZiNWQ4ZWYyZDFjMGQ1OGEwOGZjM2RlYzY5In0=

BEGIN_NESTED_COMMIT
feat: add InstancePolicy.boot_disk
fix: ServiceAccount.scopes is no longer deprecated
fix: removed unused endpoints for IAM methods

PiperOrigin-RevId: 495370831

Source-Link: https://togithub.com/googleapis/googleapis/commit/8f5577498f77061130d24425c3fb076a099c112b

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/44ea51b0580dd8cfa2a28c8c44093c1b73db3099
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI0NGVhNTFiMDU4MGRkOGNmYTJhMjhjOGM0NDA5M2MxYjczZGIzMDk5In0=
END_NESTED_COMMIT
  • Loading branch information
gcf-owl-bot[bot] authored Dec 15, 2022
1 parent f9fc947 commit 61d2740
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ message TaskSpec {
// If task ends with non-zero exit code, retry the task with max_retry_count.
repeated LifecyclePolicy lifecycle_policies = 9;

// Environment variables to set before running the Task.
// You can set up to 100 environments.
// Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];

// Volumes to mount before running Tasks using this TaskSpec.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ message AllocationPolicy {
// The accelerators attached to each VM instance.
repeated Accelerator accelerators = 5;

// Book disk to be created and attached to each VM by this InstancePolicy.
// Boot disk will be deleted when the VM is deleted.
Disk boot_disk = 8;

// Non-boot disks to be attached for each VM created by this InstancePolicy.
// New disks will be deleted when the VM is deleted.
repeated AttachedDisk disks = 6;
Expand Down Expand Up @@ -562,5 +566,5 @@ message ServiceAccount {

// List of scopes to be enabled for this service account on the VM, in
// addition to the cloud-platform API scope that will be added by default.
repeated string scopes = 2 [deprecated = true];
repeated string scopes = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ message TaskSpec {
// If task ends with non-zero exit code, retry the task with max_retry_count.
repeated LifecyclePolicy lifecycle_policies = 9;

// Environment variables to set before running the Task.
// You can set up to 100 environments.
// Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];

// Volumes to mount before running Tasks using this TaskSpec.
Expand Down
6 changes: 6 additions & 0 deletions packages/google-cloud-batch/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions packages/google-cloud-batch/protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions packages/google-cloud-batch/protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 3 additions & 24 deletions packages/google-cloud-batch/src/v1/batch_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ export class BatchServiceClient {
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
opts = Object.assign({servicePath, port, clientConfig, fallback}, opts);

// Request numeric enum values if REST transport is used.
opts.numericEnums = true;

// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
opts['scopes'] = staticMembers.scopes;
Expand Down Expand Up @@ -247,40 +250,16 @@ export class BatchServiceClient {
{
selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',
get: '/v1/{resource=projects/*/locations/*/jobs/*}:getIamPolicy',
additional_bindings: [
{get: '/v1/{resource=projects/*/locations/*/tasks/*}:getIamPolicy'},
{get: '/v1/{resource=projects/*/locations/*/nodes/*}:getIamPolicy'},
],
},
{
selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',
post: '/v1/{resource=projects/*/locations/*/jobs/*}:setIamPolicy',
body: '*',
additional_bindings: [
{
post: '/v1/{resource=projects/*/locations/*/tasks/*}:setIamPolicy',
body: '*',
},
{
post: '/v1/{resource=projects/*/locations/*/nodes/*}:setIamPolicy',
body: '*',
},
],
},
{
selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',
post: '/v1/{resource=projects/*/locations/*/jobs/*}:testIamPermissions',
body: '*',
additional_bindings: [
{
post: '/v1/{resource=projects/*/locations/*/tasks/*}:testIamPermissions',
body: '*',
},
{
post: '/v1/{resource=projects/*/locations/*/nodes/*}:testIamPermissions',
body: '*',
},
],
},
{
selector: 'google.longrunning.Operations.CancelOperation',
Expand Down
31 changes: 3 additions & 28 deletions packages/google-cloud-batch/src/v1alpha/batch_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ export class BatchServiceClient {
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
opts = Object.assign({servicePath, port, clientConfig, fallback}, opts);

// Request numeric enum values if REST transport is used.
opts.numericEnums = true;

// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
opts['scopes'] = staticMembers.scopes;
Expand Down Expand Up @@ -247,44 +250,16 @@ export class BatchServiceClient {
{
selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',
get: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:getIamPolicy',
additional_bindings: [
{
get: '/v1alpha/{resource=projects/*/locations/*/tasks/*}:getIamPolicy',
},
{
get: '/v1alpha/{resource=projects/*/locations/*/nodes/*}:getIamPolicy',
},
],
},
{
selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',
post: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:setIamPolicy',
body: '*',
additional_bindings: [
{
post: '/v1alpha/{resource=projects/*/locations/*/tasks/*}:setIamPolicy',
body: '*',
},
{
post: '/v1alpha/{resource=projects/*/locations/*/nodes/*}:setIamPolicy',
body: '*',
},
],
},
{
selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',
post: '/v1alpha/{resource=projects/*/locations/*/jobs/*}:testIamPermissions',
body: '*',
additional_bindings: [
{
post: '/v1alpha/{resource=projects/*/locations/*/tasks/*}:testIamPermissions',
body: '*',
},
{
post: '/v1alpha/{resource=projects/*/locations/*/nodes/*}:testIamPermissions',
body: '*',
},
],
},
{
selector: 'google.longrunning.Operations.CancelOperation',
Expand Down

0 comments on commit 61d2740

Please sign in to comment.