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.

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



44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
# File 'lib/ovirtsdk4/types.rb', line 44262

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  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.



44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
# File 'lib/ovirtsdk4/types.rb', line 44286

def ==(other)
  super &&
  @address == other.address &&
  @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)


43817
43818
43819
# File 'lib/ovirtsdk4/types.rb', line 43817

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


43826
43827
43828
# File 'lib/ovirtsdk4/types.rb', line 43826

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


43835
43836
43837
# File 'lib/ovirtsdk4/types.rb', line 43835

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


43844
43845
43846
# File 'lib/ovirtsdk4/types.rb', line 43844

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


43853
43854
43855
# File 'lib/ovirtsdk4/types.rb', line 43853

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


43862
43863
43864
# File 'lib/ovirtsdk4/types.rb', line 43862

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
# File 'lib/ovirtsdk4/types.rb', line 44310

def hash
  super +
  @address.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:



43871
43872
43873
# File 'lib/ovirtsdk4/types.rb', line 43871

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)


43884
43885
43886
43887
43888
43889
# File 'lib/ovirtsdk4/types.rb', line 43884

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)


43896
43897
43898
# File 'lib/ovirtsdk4/types.rb', line 43896

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


43905
43906
43907
# File 'lib/ovirtsdk4/types.rb', line 43905

def id=(value)
  @id = value
end

#logical_unitsArray<LogicalUnit>

Returns the value of the logical_units attribute.

Returns:



43914
43915
43916
# File 'lib/ovirtsdk4/types.rb', line 43914

def logical_units
  @logical_units
end

#logical_units=(list) ⇒ Object

Sets the value of the logical_units attribute.

Parameters:



43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
# File 'lib/ovirtsdk4/types.rb', line 43923

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)


43940
43941
43942
# File 'lib/ovirtsdk4/types.rb', line 43940

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


43949
43950
43951
# File 'lib/ovirtsdk4/types.rb', line 43949

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


43958
43959
43960
# File 'lib/ovirtsdk4/types.rb', line 43958

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


43967
43968
43969
# File 'lib/ovirtsdk4/types.rb', line 43967

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


43976
43977
43978
# File 'lib/ovirtsdk4/types.rb', line 43976

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


43985
43986
43987
# File 'lib/ovirtsdk4/types.rb', line 43985

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


43994
43995
43996
# File 'lib/ovirtsdk4/types.rb', line 43994

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


44003
44004
44005
# File 'lib/ovirtsdk4/types.rb', line 44003

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



44012
44013
44014
# File 'lib/ovirtsdk4/types.rb', line 44012

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



44021
44022
44023
# File 'lib/ovirtsdk4/types.rb', line 44021

def nfs_version=(value)
  @nfs_version = value
end

#override_lunsBoolean

Returns the value of the override_luns attribute.

Returns:

  • (Boolean)


44030
44031
44032
# File 'lib/ovirtsdk4/types.rb', line 44030

def override_luns
  @override_luns
end

#override_luns=(value) ⇒ Object

Sets the value of the override_luns attribute.

Parameters:

  • value (Boolean)


44039
44040
44041
# File 'lib/ovirtsdk4/types.rb', line 44039

def override_luns=(value)
  @override_luns = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


44048
44049
44050
# File 'lib/ovirtsdk4/types.rb', line 44048

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


44057
44058
44059
# File 'lib/ovirtsdk4/types.rb', line 44057

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


44066
44067
44068
# File 'lib/ovirtsdk4/types.rb', line 44066

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


44075
44076
44077
# File 'lib/ovirtsdk4/types.rb', line 44075

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


44084
44085
44086
# File 'lib/ovirtsdk4/types.rb', line 44084

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


44093
44094
44095
# File 'lib/ovirtsdk4/types.rb', line 44093

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


44102
44103
44104
# File 'lib/ovirtsdk4/types.rb', line 44102

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


44111
44112
44113
# File 'lib/ovirtsdk4/types.rb', line 44111

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


44120
44121
44122
# File 'lib/ovirtsdk4/types.rb', line 44120

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


44129
44130
44131
# File 'lib/ovirtsdk4/types.rb', line 44129

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



44138
44139
44140
# File 'lib/ovirtsdk4/types.rb', line 44138

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



44147
44148
44149
# File 'lib/ovirtsdk4/types.rb', line 44147

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


44156
44157
44158
# File 'lib/ovirtsdk4/types.rb', line 44156

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


44165
44166
44167
# File 'lib/ovirtsdk4/types.rb', line 44165

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


44174
44175
44176
# File 'lib/ovirtsdk4/types.rb', line 44174

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


44183
44184
44185
# File 'lib/ovirtsdk4/types.rb', line 44183

def vfs_type=(value)
  @vfs_type = value
end

#volume_groupVolumeGroup

Returns the value of the volume_group attribute.

Returns:



44192
44193
44194
# File 'lib/ovirtsdk4/types.rb', line 44192

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:



44205
44206
44207
44208
44209
44210
# File 'lib/ovirtsdk4/types.rb', line 44205

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