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.



2657
2658
2659
# File 'lib/google/apis/batch_v1/classes.rb', line 2657

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)


2627
2628
2629
# File 'lib/google/apis/batch_v1/classes.rb', line 2627

def device_name
  @device_name
end

#gcsGoogle::Apis::BatchV1::Gcs

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



2632
2633
2634
# File 'lib/google/apis/batch_v1/classes.rb', line 2632

def gcs
  @gcs
end

#mount_optionsArray<String>

Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the gcsfuse tool are supported. * For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode. * For any other disk or a Network File System (NFS), all the mount options provided by the mount command are supported. Corresponds to the JSON property mountOptions

Returns:

  • (Array<String>)


2645
2646
2647
# File 'lib/google/apis/batch_v1/classes.rb', line 2645

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)


2650
2651
2652
# File 'lib/google/apis/batch_v1/classes.rb', line 2650

def mount_path
  @mount_path
end

#nfsGoogle::Apis::BatchV1::Nfs

Represents an NFS volume. Corresponds to the JSON property nfs



2655
2656
2657
# File 'lib/google/apis/batch_v1/classes.rb', line 2655

def nfs
  @nfs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2662
2663
2664
2665
2666
2667
2668
# File 'lib/google/apis/batch_v1/classes.rb', line 2662

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