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.

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.



21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
# File 'lib/ovirtsdk4/types.rb', line 21864

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.



21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
# File 'lib/ovirtsdk4/types.rb', line 21886

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.



21467
21468
21469
# File 'lib/ovirtsdk4/types.rb', line 21467

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.



21476
21477
21478
# File 'lib/ovirtsdk4/types.rb', line 21476

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.



21485
21486
21487
# File 'lib/ovirtsdk4/types.rb', line 21485

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



21494
21495
21496
# File 'lib/ovirtsdk4/types.rb', line 21494

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.



21503
21504
21505
# File 'lib/ovirtsdk4/types.rb', line 21503

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



21512
21513
21514
# File 'lib/ovirtsdk4/types.rb', line 21512

def description=(value)
  @description = value
end

#gluster_volumeGlusterVolume

Returns the value of the gluster_volume attribute.



21521
21522
21523
# File 'lib/ovirtsdk4/types.rb', line 21521

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.



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

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.



21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
# File 'lib/ovirtsdk4/types.rb', line 21908

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.



21546
21547
21548
# File 'lib/ovirtsdk4/types.rb', line 21546

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.



21559
21560
21561
21562
21563
21564
# File 'lib/ovirtsdk4/types.rb', line 21559

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.



21571
21572
21573
# File 'lib/ovirtsdk4/types.rb', line 21571

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



21580
21581
21582
# File 'lib/ovirtsdk4/types.rb', line 21580

def id=(value)
  @id = value
end

#mount_optionsString

Returns the value of the mount_options attribute.



21589
21590
21591
# File 'lib/ovirtsdk4/types.rb', line 21589

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.



21598
21599
21600
# File 'lib/ovirtsdk4/types.rb', line 21598

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.



21607
21608
21609
# File 'lib/ovirtsdk4/types.rb', line 21607

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



21616
21617
21618
# File 'lib/ovirtsdk4/types.rb', line 21616

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.



21625
21626
21627
# File 'lib/ovirtsdk4/types.rb', line 21625

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.



21634
21635
21636
# File 'lib/ovirtsdk4/types.rb', line 21634

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.



21643
21644
21645
# File 'lib/ovirtsdk4/types.rb', line 21643

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.



21652
21653
21654
# File 'lib/ovirtsdk4/types.rb', line 21652

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.



21661
21662
21663
# File 'lib/ovirtsdk4/types.rb', line 21661

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.



21670
21671
21672
# File 'lib/ovirtsdk4/types.rb', line 21670

def nfs_version=(value)
  @nfs_version = value
end

#passwordString

Returns the value of the password attribute.



21679
21680
21681
# File 'lib/ovirtsdk4/types.rb', line 21679

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.



21688
21689
21690
# File 'lib/ovirtsdk4/types.rb', line 21688

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.



21697
21698
21699
# File 'lib/ovirtsdk4/types.rb', line 21697

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.



21706
21707
21708
# File 'lib/ovirtsdk4/types.rb', line 21706

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.



21715
21716
21717
# File 'lib/ovirtsdk4/types.rb', line 21715

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.



21724
21725
21726
# File 'lib/ovirtsdk4/types.rb', line 21724

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.



21733
21734
21735
# File 'lib/ovirtsdk4/types.rb', line 21733

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.



21742
21743
21744
# File 'lib/ovirtsdk4/types.rb', line 21742

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.



21751
21752
21753
# File 'lib/ovirtsdk4/types.rb', line 21751

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.



21760
21761
21762
# File 'lib/ovirtsdk4/types.rb', line 21760

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.



21769
21770
21771
# File 'lib/ovirtsdk4/types.rb', line 21769

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.



21778
21779
21780
# File 'lib/ovirtsdk4/types.rb', line 21778

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.



21787
21788
21789
# File 'lib/ovirtsdk4/types.rb', line 21787

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.



21796
21797
21798
# File 'lib/ovirtsdk4/types.rb', line 21796

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.



21805
21806
21807
# File 'lib/ovirtsdk4/types.rb', line 21805

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.



21814
21815
21816
# File 'lib/ovirtsdk4/types.rb', line 21814

def vfs_type=(value)
  @vfs_type = value
end