xref: /aosp_15_r20/external/googleapis/google/cloud/batch/v1/volume.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.batch.v1;
18
19option csharp_namespace = "Google.Cloud.Batch.V1";
20option go_package = "cloud.google.com/go/batch/apiv1/batchpb;batchpb";
21option java_multiple_files = true;
22option java_outer_classname = "VolumeProto";
23option java_package = "com.google.cloud.batch.v1";
24option objc_class_prefix = "GCB";
25option php_namespace = "Google\\Cloud\\Batch\\V1";
26option ruby_package = "Google::Cloud::Batch::V1";
27
28// Volume describes a volume and parameters for it to be mounted to a VM.
29message Volume {
30  // The source for the volume.
31  oneof source {
32    // A Network File System (NFS) volume. For example, a
33    // Filestore file share.
34    NFS nfs = 1;
35
36    // A Google Cloud Storage (GCS) volume.
37    GCS gcs = 3;
38
39    // Device name of an attached disk volume, which should align with a
40    // device_name specified by
41    // job.allocation_policy.instances[0].policy.disks[i].device_name or
42    // defined by the given instance template in
43    // job.allocation_policy.instances[0].instance_template.
44    string device_name = 6;
45  }
46
47  // The mount path for the volume, e.g. /mnt/disks/share.
48  string mount_path = 4;
49
50  // For Google Cloud Storage (GCS), mount options are the options supported by
51  // the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).
52  // For existing persistent disks, mount options provided by the
53  // mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except
54  // writing are supported. This is due to restrictions of multi-writer mode
55  // (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
56  // For other attached disks and Network File System (NFS), mount options are
57  // these supported by the mount command
58  // (https://man7.org/linux/man-pages/man8/mount.8.html).
59  repeated string mount_options = 5;
60}
61
62// Represents an NFS volume.
63message NFS {
64  // The IP address of the NFS.
65  string server = 1;
66
67  // Remote source path exported from the NFS, e.g., "/share".
68  string remote_path = 2;
69}
70
71// Represents a Google Cloud Storage volume.
72message GCS {
73  // Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
74  // bucket_name, bucket_name/subdirectory/
75  string remote_path = 1;
76}
77