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.



21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
# File 'lib/ovirtsdk4/types.rb', line 21594

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.



21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
# File 'lib/ovirtsdk4/types.rb', line 21616

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)


21197
21198
21199
# File 'lib/ovirtsdk4/types.rb', line 21197

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


21206
21207
21208
# File 'lib/ovirtsdk4/types.rb', line 21206

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


21215
21216
21217
# File 'lib/ovirtsdk4/types.rb', line 21215

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


21224
21225
21226
# File 'lib/ovirtsdk4/types.rb', line 21224

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


21233
21234
21235
# File 'lib/ovirtsdk4/types.rb', line 21233

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


21242
21243
21244
# File 'lib/ovirtsdk4/types.rb', line 21242

def description=(value)
  @description = value
end

#gluster_volumeGlusterVolume

Returns the value of the gluster_volume attribute.

Returns:



21251
21252
21253
# File 'lib/ovirtsdk4/types.rb', line 21251

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:



21264
21265
21266
21267
21268
21269
# File 'lib/ovirtsdk4/types.rb', line 21264

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.



21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
# File 'lib/ovirtsdk4/types.rb', line 21638

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:



21276
21277
21278
# File 'lib/ovirtsdk4/types.rb', line 21276

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)


21289
21290
21291
21292
21293
21294
# File 'lib/ovirtsdk4/types.rb', line 21289

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)


21301
21302
21303
# File 'lib/ovirtsdk4/types.rb', line 21301

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


21310
21311
21312
# File 'lib/ovirtsdk4/types.rb', line 21310

def id=(value)
  @id = value
end

#mount_optionsString

Returns the value of the mount_options attribute.

Returns:

  • (String)


21319
21320
21321
# File 'lib/ovirtsdk4/types.rb', line 21319

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


21328
21329
21330
# File 'lib/ovirtsdk4/types.rb', line 21328

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


21337
21338
21339
# File 'lib/ovirtsdk4/types.rb', line 21337

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


21346
21347
21348
# File 'lib/ovirtsdk4/types.rb', line 21346

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


21355
21356
21357
# File 'lib/ovirtsdk4/types.rb', line 21355

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


21364
21365
21366
# File 'lib/ovirtsdk4/types.rb', line 21364

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


21373
21374
21375
# File 'lib/ovirtsdk4/types.rb', line 21373

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


21382
21383
21384
# File 'lib/ovirtsdk4/types.rb', line 21382

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



21391
21392
21393
# File 'lib/ovirtsdk4/types.rb', line 21391

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



21400
21401
21402
# File 'lib/ovirtsdk4/types.rb', line 21400

def nfs_version=(value)
  @nfs_version = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


21409
21410
21411
# File 'lib/ovirtsdk4/types.rb', line 21409

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


21418
21419
21420
# File 'lib/ovirtsdk4/types.rb', line 21418

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


21427
21428
21429
# File 'lib/ovirtsdk4/types.rb', line 21427

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


21436
21437
21438
# File 'lib/ovirtsdk4/types.rb', line 21436

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


21445
21446
21447
# File 'lib/ovirtsdk4/types.rb', line 21445

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


21454
21455
21456
# File 'lib/ovirtsdk4/types.rb', line 21454

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


21463
21464
21465
# File 'lib/ovirtsdk4/types.rb', line 21463

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


21472
21473
21474
# File 'lib/ovirtsdk4/types.rb', line 21472

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


21481
21482
21483
# File 'lib/ovirtsdk4/types.rb', line 21481

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


21490
21491
21492
# File 'lib/ovirtsdk4/types.rb', line 21490

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



21499
21500
21501
# File 'lib/ovirtsdk4/types.rb', line 21499

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



21508
21509
21510
# File 'lib/ovirtsdk4/types.rb', line 21508

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


21517
21518
21519
# File 'lib/ovirtsdk4/types.rb', line 21517

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


21526
21527
21528
# File 'lib/ovirtsdk4/types.rb', line 21526

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


21535
21536
21537
# File 'lib/ovirtsdk4/types.rb', line 21535

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


21544
21545
21546
# File 'lib/ovirtsdk4/types.rb', line 21544

def vfs_type=(value)
  @vfs_type = value
end