Class: OvirtSDK4::StorageConnection

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ StorageConnection

Creates a new instance of the OvirtSDK4::StorageConnection class.

Parameters:

  • opts (Hash) (defaults to: {})

    A hash containing the attributes of the object. The keys of the hash should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.

Options Hash (opts):

  • :address (String)

    The value of attribute address.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :gluster_volume (GlusterVolume, Hash)

    The value of attribute gluster_volume.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :mount_options (String)

    The value of attribute mount_options.

  • :name (String)

    The value of attribute name.

  • :nfs_retrans (Integer)

    The value of attribute nfs_retrans.

  • :nfs_timeo (Integer)

    The value of attribute nfs_timeo.

  • :nfs_version (NfsVersion)

    The value of attribute nfs_version.

  • :password (String)

    The value of attribute password.

  • :path (String)

    The value of attribute path.

  • :port (Integer)

    The value of attribute port.

  • :portal (String)

    The value of attribute portal.

  • :target (String)

    The value of attribute target.

  • :type (StorageType)

    The value of attribute type.

  • :username (String)

    The value of attribute username.

  • :vfs_type (String)

    The value of attribute vfs_type.



20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
# File 'lib/ovirtsdk4/types.rb', line 20739

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.gluster_volume = opts[:gluster_volume]
  self.host = opts[:host]
  self.mount_options = opts[:mount_options]
  self.nfs_retrans = opts[:nfs_retrans]
  self.nfs_timeo = opts[:nfs_timeo]
  self.nfs_version = opts[:nfs_version]
  self.password = opts[:password]
  self.path = opts[:path]
  self.port = opts[:port]
  self.portal = opts[:portal]
  self.target = opts[:target]
  self.type = opts[:type]
  self.username = opts[:username]
  self.vfs_type = opts[:vfs_type]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.



20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
# File 'lib/ovirtsdk4/types.rb', line 20761

def ==(other)
  super &&
  @address == other.address &&
  @gluster_volume == other.gluster_volume &&
  @host == other.host &&
  @mount_options == other.mount_options &&
  @nfs_retrans == other.nfs_retrans &&
  @nfs_timeo == other.nfs_timeo &&
  @nfs_version == other.nfs_version &&
  @password == other.password &&
  @path == other.path &&
  @port == other.port &&
  @portal == other.portal &&
  @target == other.target &&
  @type == other.type &&
  @username == other.username &&
  @vfs_type == other.vfs_type
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)


20342
20343
20344
# File 'lib/ovirtsdk4/types.rb', line 20342

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


20351
20352
20353
# File 'lib/ovirtsdk4/types.rb', line 20351

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


20360
20361
20362
# File 'lib/ovirtsdk4/types.rb', line 20360

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


20369
20370
20371
# File 'lib/ovirtsdk4/types.rb', line 20369

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


20378
20379
20380
# File 'lib/ovirtsdk4/types.rb', line 20378

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


20387
20388
20389
# File 'lib/ovirtsdk4/types.rb', line 20387

def description=(value)
  @description = value
end

#gluster_volumeGlusterVolume

Returns the value of the gluster_volume attribute.

Returns:



20396
20397
20398
# File 'lib/ovirtsdk4/types.rb', line 20396

def gluster_volume
  @gluster_volume
end

#gluster_volume=(value) ⇒ Object

Sets the value of the gluster_volume attribute.

The value parameter can be an instance of GlusterVolume or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:



20409
20410
20411
20412
20413
20414
# File 'lib/ovirtsdk4/types.rb', line 20409

def gluster_volume=(value)
  if value.is_a?(Hash)
    value = GlusterVolume.new(value)
  end
  @gluster_volume = value
end

#hashObject

Generates a hash value for this object.



20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
# File 'lib/ovirtsdk4/types.rb', line 20783

def hash
  super +
  @address.hash +
  @gluster_volume.hash +
  @host.hash +
  @mount_options.hash +
  @nfs_retrans.hash +
  @nfs_timeo.hash +
  @nfs_version.hash +
  @password.hash +
  @path.hash +
  @port.hash +
  @portal.hash +
  @target.hash +
  @type.hash +
  @username.hash +
  @vfs_type.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



20421
20422
20423
# File 'lib/ovirtsdk4/types.rb', line 20421

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of Host or a hash. If it is a hash then a new instance will be created passing the hash as the opts parameter to the constructor.

Parameters:

  • value (Host, Hash)


20434
20435
20436
20437
20438
20439
# File 'lib/ovirtsdk4/types.rb', line 20434

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)


20446
20447
20448
# File 'lib/ovirtsdk4/types.rb', line 20446

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


20455
20456
20457
# File 'lib/ovirtsdk4/types.rb', line 20455

def id=(value)
  @id = value
end

#mount_optionsString

Returns the value of the mount_options attribute.

Returns:

  • (String)


20464
20465
20466
# File 'lib/ovirtsdk4/types.rb', line 20464

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


20473
20474
20475
# File 'lib/ovirtsdk4/types.rb', line 20473

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


20482
20483
20484
# File 'lib/ovirtsdk4/types.rb', line 20482

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


20491
20492
20493
# File 'lib/ovirtsdk4/types.rb', line 20491

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


20500
20501
20502
# File 'lib/ovirtsdk4/types.rb', line 20500

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


20509
20510
20511
# File 'lib/ovirtsdk4/types.rb', line 20509

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


20518
20519
20520
# File 'lib/ovirtsdk4/types.rb', line 20518

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


20527
20528
20529
# File 'lib/ovirtsdk4/types.rb', line 20527

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



20536
20537
20538
# File 'lib/ovirtsdk4/types.rb', line 20536

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



20545
20546
20547
# File 'lib/ovirtsdk4/types.rb', line 20545

def nfs_version=(value)
  @nfs_version = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


20554
20555
20556
# File 'lib/ovirtsdk4/types.rb', line 20554

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


20563
20564
20565
# File 'lib/ovirtsdk4/types.rb', line 20563

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


20572
20573
20574
# File 'lib/ovirtsdk4/types.rb', line 20572

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


20581
20582
20583
# File 'lib/ovirtsdk4/types.rb', line 20581

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


20590
20591
20592
# File 'lib/ovirtsdk4/types.rb', line 20590

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


20599
20600
20601
# File 'lib/ovirtsdk4/types.rb', line 20599

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


20608
20609
20610
# File 'lib/ovirtsdk4/types.rb', line 20608

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


20617
20618
20619
# File 'lib/ovirtsdk4/types.rb', line 20617

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


20626
20627
20628
# File 'lib/ovirtsdk4/types.rb', line 20626

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


20635
20636
20637
# File 'lib/ovirtsdk4/types.rb', line 20635

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



20644
20645
20646
# File 'lib/ovirtsdk4/types.rb', line 20644

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



20653
20654
20655
# File 'lib/ovirtsdk4/types.rb', line 20653

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


20662
20663
20664
# File 'lib/ovirtsdk4/types.rb', line 20662

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


20671
20672
20673
# File 'lib/ovirtsdk4/types.rb', line 20671

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


20680
20681
20682
# File 'lib/ovirtsdk4/types.rb', line 20680

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


20689
20690
20691
# File 'lib/ovirtsdk4/types.rb', line 20689

def vfs_type=(value)
  @vfs_type = value
end