Class: OvirtSDK4::HostStorage

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 = {}) ⇒ HostStorage

Creates a new instance of the OvirtSDK4::HostStorage 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.

  • :driver_options (Array<Property>, Array<Hash>)

    The values of attribute driver_options.

  • :driver_sensitive_options (Array<Property>, Array<Hash>)

    The values of attribute driver_sensitive_options.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :logical_units (Array<LogicalUnit>, Array<Hash>)

    The values of attribute logical_units.

  • :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.

  • :override_luns (Boolean)

    The value of attribute override_luns.

  • :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.

  • :volume_group (VolumeGroup, Hash)

    The value of attribute volume_group.


45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
45705
# File 'lib/ovirtsdk4/types.rb', line 45684

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.driver_options = opts[:driver_options]
  self.driver_sensitive_options = opts[:driver_sensitive_options]
  self.host = opts[:host]
  self.logical_units = opts[:logical_units]
  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.override_luns = opts[:override_luns]
  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]
  self.volume_group = opts[:volume_group]
end

Instance Method Details

#==(other) ⇒ Object

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


45710
45711
45712
45713
45714
45715
45716
45717
45718
45719
45720
45721
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
# File 'lib/ovirtsdk4/types.rb', line 45710

def ==(other)
  super &&
  @address == other.address &&
  @driver_options == other.driver_options &&
  @driver_sensitive_options == other.driver_sensitive_options &&
  @host == other.host &&
  @logical_units == other.logical_units &&
  @mount_options == other.mount_options &&
  @nfs_retrans == other.nfs_retrans &&
  @nfs_timeo == other.nfs_timeo &&
  @nfs_version == other.nfs_version &&
  @override_luns == other.override_luns &&
  @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 &&
  @volume_group == other.volume_group
end

#addressString

Returns the value of the address attribute.

Returns:

  • (String)

45183
45184
45185
# File 'lib/ovirtsdk4/types.rb', line 45183

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)

45192
45193
45194
# File 'lib/ovirtsdk4/types.rb', line 45192

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

45201
45202
45203
# File 'lib/ovirtsdk4/types.rb', line 45201

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

45210
45211
45212
# File 'lib/ovirtsdk4/types.rb', line 45210

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

45219
45220
45221
# File 'lib/ovirtsdk4/types.rb', line 45219

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

45228
45229
45230
# File 'lib/ovirtsdk4/types.rb', line 45228

def description=(value)
  @description = value
end

#driver_optionsArray<Property>

Returns the value of the driver_options attribute.

Returns:


45237
45238
45239
# File 'lib/ovirtsdk4/types.rb', line 45237

def driver_options
  @driver_options
end

#driver_options=(list) ⇒ Object

Sets the value of the driver_options attribute.

Parameters:


45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
# File 'lib/ovirtsdk4/types.rb', line 45246

def driver_options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @driver_options = list
end

#driver_sensitive_optionsArray<Property>

Returns the value of the driver_sensitive_options attribute.

Returns:


45263
45264
45265
# File 'lib/ovirtsdk4/types.rb', line 45263

def driver_sensitive_options
  @driver_sensitive_options
end

#driver_sensitive_options=(list) ⇒ Object

Sets the value of the driver_sensitive_options attribute.

Parameters:


45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
# File 'lib/ovirtsdk4/types.rb', line 45272

def driver_sensitive_options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @driver_sensitive_options = list
end

#hashObject

Generates a hash value for this object.


45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752
45753
45754
45755
45756
45757
# File 'lib/ovirtsdk4/types.rb', line 45736

def hash
  super +
  @address.hash +
  @driver_options.hash +
  @driver_sensitive_options.hash +
  @host.hash +
  @logical_units.hash +
  @mount_options.hash +
  @nfs_retrans.hash +
  @nfs_timeo.hash +
  @nfs_version.hash +
  @override_luns.hash +
  @password.hash +
  @path.hash +
  @port.hash +
  @portal.hash +
  @target.hash +
  @type.hash +
  @username.hash +
  @vfs_type.hash +
  @volume_group.hash
end

#hostHost

Returns the value of the host attribute.

Returns:


45289
45290
45291
# File 'lib/ovirtsdk4/types.rb', line 45289

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of OvirtSDK4::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)

45302
45303
45304
45305
45306
45307
# File 'lib/ovirtsdk4/types.rb', line 45302

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)

45314
45315
45316
# File 'lib/ovirtsdk4/types.rb', line 45314

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

45323
45324
45325
# File 'lib/ovirtsdk4/types.rb', line 45323

def id=(value)
  @id = value
end

#logical_unitsArray<LogicalUnit>

Returns the value of the logical_units attribute.

Returns:


45332
45333
45334
# File 'lib/ovirtsdk4/types.rb', line 45332

def logical_units
  @logical_units
end

#logical_units=(list) ⇒ Object

Sets the value of the logical_units attribute.

Parameters:


45341
45342
45343
45344
45345
45346
45347
45348
45349
45350
45351
# File 'lib/ovirtsdk4/types.rb', line 45341

def logical_units=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = LogicalUnit.new(value)
      end
    end
  end
  @logical_units = list
end

#mount_optionsString

Returns the value of the mount_options attribute.

Returns:

  • (String)

45358
45359
45360
# File 'lib/ovirtsdk4/types.rb', line 45358

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)

45367
45368
45369
# File 'lib/ovirtsdk4/types.rb', line 45367

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

45376
45377
45378
# File 'lib/ovirtsdk4/types.rb', line 45376

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

45385
45386
45387
# File 'lib/ovirtsdk4/types.rb', line 45385

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)

45394
45395
45396
# File 'lib/ovirtsdk4/types.rb', line 45394

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)

45403
45404
45405
# File 'lib/ovirtsdk4/types.rb', line 45403

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)

45412
45413
45414
# File 'lib/ovirtsdk4/types.rb', line 45412

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)

45421
45422
45423
# File 'lib/ovirtsdk4/types.rb', line 45421

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:


45430
45431
45432
# File 'lib/ovirtsdk4/types.rb', line 45430

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:


45439
45440
45441
# File 'lib/ovirtsdk4/types.rb', line 45439

def nfs_version=(value)
  @nfs_version = value
end

#override_lunsBoolean

Returns the value of the override_luns attribute.

Returns:

  • (Boolean)

45448
45449
45450
# File 'lib/ovirtsdk4/types.rb', line 45448

def override_luns
  @override_luns
end

#override_luns=(value) ⇒ Object

Sets the value of the override_luns attribute.

Parameters:

  • value (Boolean)

45457
45458
45459
# File 'lib/ovirtsdk4/types.rb', line 45457

def override_luns=(value)
  @override_luns = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

45466
45467
45468
# File 'lib/ovirtsdk4/types.rb', line 45466

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

45475
45476
45477
# File 'lib/ovirtsdk4/types.rb', line 45475

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)

45484
45485
45486
# File 'lib/ovirtsdk4/types.rb', line 45484

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)

45493
45494
45495
# File 'lib/ovirtsdk4/types.rb', line 45493

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)

45502
45503
45504
# File 'lib/ovirtsdk4/types.rb', line 45502

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)

45511
45512
45513
# File 'lib/ovirtsdk4/types.rb', line 45511

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)

45520
45521
45522
# File 'lib/ovirtsdk4/types.rb', line 45520

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)

45529
45530
45531
# File 'lib/ovirtsdk4/types.rb', line 45529

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)

45538
45539
45540
# File 'lib/ovirtsdk4/types.rb', line 45538

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)

45547
45548
45549
# File 'lib/ovirtsdk4/types.rb', line 45547

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:


45556
45557
45558
# File 'lib/ovirtsdk4/types.rb', line 45556

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:


45565
45566
45567
# File 'lib/ovirtsdk4/types.rb', line 45565

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

45574
45575
45576
# File 'lib/ovirtsdk4/types.rb', line 45574

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

45583
45584
45585
# File 'lib/ovirtsdk4/types.rb', line 45583

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)

45592
45593
45594
# File 'lib/ovirtsdk4/types.rb', line 45592

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)

45601
45602
45603
# File 'lib/ovirtsdk4/types.rb', line 45601

def vfs_type=(value)
  @vfs_type = value
end

#volume_groupVolumeGroup

Returns the value of the volume_group attribute.

Returns:


45610
45611
45612
# File 'lib/ovirtsdk4/types.rb', line 45610

def volume_group
  @volume_group
end

#volume_group=(value) ⇒ Object

Sets the value of the volume_group attribute.

The value parameter can be an instance of VolumeGroup 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:


45623
45624
45625
45626
45627
45628
# File 'lib/ovirtsdk4/types.rb', line 45623

def volume_group=(value)
  if value.is_a?(Hash)
    value = VolumeGroup.new(value)
  end
  @volume_group = value
end