Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add InstancePolicy.boot_disk #3752

Merged
merged 14 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
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