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.



21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
# File 'lib/ovirtsdk4/types.rb', line 21121

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.



21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
# File 'lib/ovirtsdk4/types.rb', line 21143

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)


20724
20725
20726
# File 'lib/ovirtsdk4/types.rb', line 20724

def address
  @address
end

#address=(value) ⇒ Object

Sets the value of the address attribute.

Parameters:

  • value (String)


20733
20734
20735
# File 'lib/ovirtsdk4/types.rb', line 20733

def address=(value)
  @address = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


20742
20743
20744
# File 'lib/ovirtsdk4/types.rb', line 20742

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


20751
20752
20753
# File 'lib/ovirtsdk4/types.rb', line 20751

def comment=(value)
  @comment = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


20760
20761
20762
# File 'lib/ovirtsdk4/types.rb', line 20760

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


20769
20770
20771
# File 'lib/ovirtsdk4/types.rb', line 20769

def description=(value)
  @description = value
end

#gluster_volumeGlusterVolume

Returns the value of the gluster_volume attribute.

Returns:



20778
20779
20780
# File 'lib/ovirtsdk4/types.rb', line 20778

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:



20791
20792
20793
20794
20795
20796
# File 'lib/ovirtsdk4/types.rb', line 20791

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.



21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
# File 'lib/ovirtsdk4/types.rb', line 21165

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:



20803
20804
20805
# File 'lib/ovirtsdk4/types.rb', line 20803

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)


20816
20817
20818
20819
20820
20821
# File 'lib/ovirtsdk4/types.rb', line 20816

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)


20828
20829
20830
# File 'lib/ovirtsdk4/types.rb', line 20828

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


20837
20838
20839
# File 'lib/ovirtsdk4/types.rb', line 20837

def id=(value)
  @id = value
end

#mount_optionsString

Returns the value of the mount_options attribute.

Returns:

  • (String)


20846
20847
20848
# File 'lib/ovirtsdk4/types.rb', line 20846

def mount_options
  @mount_options
end

#mount_options=(value) ⇒ Object

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


20855
20856
20857
# File 'lib/ovirtsdk4/types.rb', line 20855

def mount_options=(value)
  @mount_options = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


20864
20865
20866
# File 'lib/ovirtsdk4/types.rb', line 20864

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


20873
20874
20875
# File 'lib/ovirtsdk4/types.rb', line 20873

def name=(value)
  @name = value
end

#nfs_retransInteger

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


20882
20883
20884
# File 'lib/ovirtsdk4/types.rb', line 20882

def nfs_retrans
  @nfs_retrans
end

#nfs_retrans=(value) ⇒ Object

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


20891
20892
20893
# File 'lib/ovirtsdk4/types.rb', line 20891

def nfs_retrans=(value)
  @nfs_retrans = value
end

#nfs_timeoInteger

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


20900
20901
20902
# File 'lib/ovirtsdk4/types.rb', line 20900

def nfs_timeo
  @nfs_timeo
end

#nfs_timeo=(value) ⇒ Object

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


20909
20910
20911
# File 'lib/ovirtsdk4/types.rb', line 20909

def nfs_timeo=(value)
  @nfs_timeo = value
end

#nfs_versionNfsVersion

Returns the value of the nfs_version attribute.

Returns:



20918
20919
20920
# File 'lib/ovirtsdk4/types.rb', line 20918

def nfs_version
  @nfs_version
end

#nfs_version=(value) ⇒ Object

Sets the value of the nfs_version attribute.

Parameters:



20927
20928
20929
# File 'lib/ovirtsdk4/types.rb', line 20927

def nfs_version=(value)
  @nfs_version = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


20936
20937
20938
# File 'lib/ovirtsdk4/types.rb', line 20936

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


20945
20946
20947
# File 'lib/ovirtsdk4/types.rb', line 20945

def password=(value)
  @password = value
end

#pathString

Returns the value of the path attribute.

Returns:

  • (String)


20954
20955
20956
# File 'lib/ovirtsdk4/types.rb', line 20954

def path
  @path
end

#path=(value) ⇒ Object

Sets the value of the path attribute.

Parameters:

  • value (String)


20963
20964
20965
# File 'lib/ovirtsdk4/types.rb', line 20963

def path=(value)
  @path = value
end

#portInteger

Returns the value of the port attribute.

Returns:

  • (Integer)


20972
20973
20974
# File 'lib/ovirtsdk4/types.rb', line 20972

def port
  @port
end

#port=(value) ⇒ Object

Sets the value of the port attribute.

Parameters:

  • value (Integer)


20981
20982
20983
# File 'lib/ovirtsdk4/types.rb', line 20981

def port=(value)
  @port = value
end

#portalString

Returns the value of the portal attribute.

Returns:

  • (String)


20990
20991
20992
# File 'lib/ovirtsdk4/types.rb', line 20990

def portal
  @portal
end

#portal=(value) ⇒ Object

Sets the value of the portal attribute.

Parameters:

  • value (String)


20999
21000
21001
# File 'lib/ovirtsdk4/types.rb', line 20999

def portal=(value)
  @portal = value
end

#targetString

Returns the value of the target attribute.

Returns:

  • (String)


21008
21009
21010
# File 'lib/ovirtsdk4/types.rb', line 21008

def target
  @target
end

#target=(value) ⇒ Object

Sets the value of the target attribute.

Parameters:

  • value (String)


21017
21018
21019
# File 'lib/ovirtsdk4/types.rb', line 21017

def target=(value)
  @target = value
end

#typeStorageType

Returns the value of the type attribute.

Returns:



21026
21027
21028
# File 'lib/ovirtsdk4/types.rb', line 21026

def type
  @type
end

#type=(value) ⇒ Object

Sets the value of the type attribute.

Parameters:



21035
21036
21037
# File 'lib/ovirtsdk4/types.rb', line 21035

def type=(value)
  @type = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


21044
21045
21046
# File 'lib/ovirtsdk4/types.rb', line 21044

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


21053
21054
21055
# File 'lib/ovirtsdk4/types.rb', line 21053

def username=(value)
  @username = value
end

#vfs_typeString

Returns the value of the vfs_type attribute.

Returns:

  • (String)


21062
21063
21064
# File 'lib/ovirtsdk4/types.rb', line 21062

def vfs_type
  @vfs_type
end

#vfs_type=(value) ⇒ Object

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


21071
21072
21073
# File 'lib/ovirtsdk4/types.rb', line 21071

def vfs_type=(value)
  @vfs_type = value
end