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.



48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046
# File 'lib/ovirtsdk4/types.rb', line 48025

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.



48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
# File 'lib/ovirtsdk4/types.rb', line 48051

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)


47524
47525
47526
# File 'lib/ovirtsdk4/types.rb', line 47524

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


47533
47534
47535
# File 'lib/ovirtsdk4/types.rb', line 47533

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


47542
47543
47544
# File 'lib/ovirtsdk4/types.rb', line 47542

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


47551
47552
47553
# File 'lib/ovirtsdk4/types.rb', line 47551

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


47560
47561
47562
# File 'lib/ovirtsdk4/types.rb', line 47560

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


47569
47570
47571
# File 'lib/ovirtsdk4/types.rb', line 47569

def description=(value)
  @description = value
end

#driver_optionsArray<Property>

Returns the value of the driver_options attribute.

Returns:



47578
47579
47580
# File 'lib/ovirtsdk4/types.rb', line 47578

def driver_options
  @driver_options
end

#driver_options=(list) ⇒ Object

Sets the value of the driver_options attribute.

Parameters:



47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
# File 'lib/ovirtsdk4/types.rb', line 47587

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:



47604
47605
47606
# File 'lib/ovirtsdk4/types.rb', line 47604

def driver_sensitive_options
  @driver_sensitive_options
end

#driver_sensitive_options=(list) ⇒ Object

Sets the value of the driver_sensitive_options attribute.

Parameters:



47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
# File 'lib/ovirtsdk4/types.rb', line 47613

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.



48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
# File 'lib/ovirtsdk4/types.rb', line 48077

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:



47630
47631
47632
# File 'lib/ovirtsdk4/types.rb', line 47630

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)


47643
47644
47645
47646
47647
47648
# File 'lib/ovirtsdk4/types.rb', line 47643

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)


47655
47656
47657
# File 'lib/ovirtsdk4/types.rb', line 47655

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


47664
47665
47666
# File 'lib/ovirtsdk4/types.rb', line 47664

def id=(value)
  @id = value
end

#logical_unitsArray<LogicalUnit>

Returns the value of the logical_units attribute.

Returns:



47673
47674
47675
# File 'lib/ovirtsdk4/types.rb', line 47673

def logical_units
  @logical_units
end

#logical_units=(list) ⇒ Object

Sets the value of the logical_units attribute.

Parameters:



47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
# File 'lib/ovirtsdk4/types.rb', line 47682

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)


47699
47700
47701
# File 'lib/ovirtsdk4/types.rb', line 47699

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


47708
47709
47710
# File 'lib/ovirtsdk4/types.rb', line 47708

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


47717
47718
47719
# File 'lib/ovirtsdk4/types.rb', line 47717

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


47726
47727
47728
# File 'lib/ovirtsdk4/types.rb', line 47726

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


47735
47736
47737
# File 'lib/ovirtsdk4/types.rb', line 47735

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


47744
47745
47746
# File 'lib/ovirtsdk4/types.rb', line 47744

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


47753
47754
47755
# File 'lib/ovirtsdk4/types.rb', line 47753

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


47762
47763
47764
# File 'lib/ovirtsdk4/types.rb', line 47762

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



47771
47772
47773
# File 'lib/ovirtsdk4/types.rb', line 47771

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



47780
47781
47782
# File 'lib/ovirtsdk4/types.rb', line 47780

def nfs_version=(value)
  @nfs_version = value
end

#override_lunsBoolean

Returns the value of the override_luns attribute.

Returns:

  • (Boolean)


47789
47790
47791
# File 'lib/ovirtsdk4/types.rb', line 47789

def override_luns
  @override_luns
end

#override_luns=(value) ⇒ Object

Sets the value of the override_luns attribute.

Parameters:

  • value (Boolean)


47798
47799
47800
# File 'lib/ovirtsdk4/types.rb', line 47798

def override_luns=(value)
  @override_luns = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


47807
47808
47809
# File 'lib/ovirtsdk4/types.rb', line 47807

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


47816
47817
47818
# File 'lib/ovirtsdk4/types.rb', line 47816

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


47825
47826
47827
# File 'lib/ovirtsdk4/types.rb', line 47825

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


47834
47835
47836
# File 'lib/ovirtsdk4/types.rb', line 47834

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


47843
47844
47845
# File 'lib/ovirtsdk4/types.rb', line 47843

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


47852
47853
47854
# File 'lib/ovirtsdk4/types.rb', line 47852

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


47861
47862
47863
# File 'lib/ovirtsdk4/types.rb', line 47861

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


47870
47871
47872
# File 'lib/ovirtsdk4/types.rb', line 47870

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


47879
47880
47881
# File 'lib/ovirtsdk4/types.rb', line 47879

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


47888
47889
47890
# File 'lib/ovirtsdk4/types.rb', line 47888

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



47897
47898
47899
# File 'lib/ovirtsdk4/types.rb', line 47897

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



47906
47907
47908
# File 'lib/ovirtsdk4/types.rb', line 47906

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


47915
47916
47917
# File 'lib/ovirtsdk4/types.rb', line 47915

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


47924
47925
47926
# File 'lib/ovirtsdk4/types.rb', line 47924

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


47933
47934
47935
# File 'lib/ovirtsdk4/types.rb', line 47933

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


47942
47943
47944
# File 'lib/ovirtsdk4/types.rb', line 47942

def vfs_type=(value)
  @vfs_type = value
end

#volume_groupVolumeGroup

Returns the value of the volume_group attribute.

Returns:



47951
47952
47953
# File 'lib/ovirtsdk4/types.rb', line 47951

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:



47964
47965
47966
47967
47968
47969
# File 'lib/ovirtsdk4/types.rb', line 47964

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