Class: Google::Apis::BatchV1::Volume

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

Volume describes a volume and parameters for it to be mounted to a VM.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Volume

Returns a new instance of Volume.



2304
2305
2306
# File 'lib/google/apis/batch_v1/classes.rb', line 2304

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#device_nameString

Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0]. instance_template. Corresponds to the JSON property deviceName

Returns:

  • (String)


2275
2276
2277
# File 'lib/google/apis/batch_v1/classes.rb', line 2275

def device_name
  @device_name
end

#gcsGoogle::Apis::BatchV1::Gcs

Represents a Google Cloud Storage volume. Corresponds to the JSON property gcs



2280
2281
2282
# File 'lib/google/apis/batch_v1/classes.rb', line 2280

def gcs
  @gcs
end

#mount_optionsArray<String>

For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7. org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/ docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command ( https://man7.org/linux/man-pages/man8/mount.8.html). Corresponds to the JSON property mountOptions

Returns:

  • (Array<String>)


2292
2293
2294
# File 'lib/google/apis/batch_v1/classes.rb', line 2292

def mount_options
  @mount_options
end

#mount_pathString

The mount path for the volume, e.g. /mnt/disks/share. Corresponds to the JSON property mountPath

Returns:

  • (String)


2297
2298
2299
# File 'lib/google/apis/batch_v1/classes.rb', line 2297

def mount_path
  @mount_path
end

#nfsGoogle::Apis::BatchV1::Nfs

Represents an NFS volume. Corresponds to the JSON property nfs



2302
2303
2304
# File 'lib/google/apis/batch_v1/classes.rb', line 2302

def nfs
  @nfs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2309
2310
2311
2312
2313
2314
2315
# File 'lib/google/apis/batch_v1/classes.rb', line 2309

def update!(**args)
  @device_name = args[:device_name] if args.key?(:device_name)
  @gcs = args[:gcs] if args.key?(:gcs)
  @mount_options = args[:mount_options] if args.key?(:mount_options)
  @mount_path = args[:mount_path] if args.key?(:mount_path)
  @nfs = args[:nfs] if args.key?(:nfs)
end