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.

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



20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
# File 'lib/ovirtsdk4/types.rb', line 20542

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



20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
# File 'lib/ovirtsdk4/types.rb', line 20563

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


20172
20173
20174
# File 'lib/ovirtsdk4/types.rb', line 20172

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


20181
20182
20183
# File 'lib/ovirtsdk4/types.rb', line 20181

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


20190
20191
20192
# File 'lib/ovirtsdk4/types.rb', line 20190

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


20199
20200
20201
# File 'lib/ovirtsdk4/types.rb', line 20199

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


20208
20209
20210
# File 'lib/ovirtsdk4/types.rb', line 20208

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


20217
20218
20219
# File 'lib/ovirtsdk4/types.rb', line 20217

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
# File 'lib/ovirtsdk4/types.rb', line 20584

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



20226
20227
20228
# File 'lib/ovirtsdk4/types.rb', line 20226

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)


20239
20240
20241
20242
20243
20244
# File 'lib/ovirtsdk4/types.rb', line 20239

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)


20251
20252
20253
# File 'lib/ovirtsdk4/types.rb', line 20251

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


20260
20261
20262
# File 'lib/ovirtsdk4/types.rb', line 20260

def id=(value)
  @id = value
end

#mount_optionsString

Returns the value of the mount_options attribute.

Returns:

  • (String)


20269
20270
20271
# File 'lib/ovirtsdk4/types.rb', line 20269

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


20278
20279
20280
# File 'lib/ovirtsdk4/types.rb', line 20278

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


20287
20288
20289
# File 'lib/ovirtsdk4/types.rb', line 20287

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


20296
20297
20298
# File 'lib/ovirtsdk4/types.rb', line 20296

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


20305
20306
20307
# File 'lib/ovirtsdk4/types.rb', line 20305

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


20314
20315
20316
# File 'lib/ovirtsdk4/types.rb', line 20314

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


20323
20324
20325
# File 'lib/ovirtsdk4/types.rb', line 20323

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


20332
20333
20334
# File 'lib/ovirtsdk4/types.rb', line 20332

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



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

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



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

def nfs_version=(value)
  @nfs_version = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


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

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


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

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


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

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


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

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


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

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


20404
20405
20406
# File 'lib/ovirtsdk4/types.rb', line 20404

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


20413
20414
20415
# File 'lib/ovirtsdk4/types.rb', line 20413

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


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

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


20431
20432
20433
# File 'lib/ovirtsdk4/types.rb', line 20431

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


20440
20441
20442
# File 'lib/ovirtsdk4/types.rb', line 20440

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



20449
20450
20451
# File 'lib/ovirtsdk4/types.rb', line 20449

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



20458
20459
20460
# File 'lib/ovirtsdk4/types.rb', line 20458

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


20467
20468
20469
# File 'lib/ovirtsdk4/types.rb', line 20467

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


20476
20477
20478
# File 'lib/ovirtsdk4/types.rb', line 20476

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


20485
20486
20487
# File 'lib/ovirtsdk4/types.rb', line 20485

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


20494
20495
20496
# File 'lib/ovirtsdk4/types.rb', line 20494

def vfs_type=(value)
  @vfs_type = value
end