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

#href, #href=

Constructor Details

- (HostStorage) initialize(opts = {})

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.



35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
# File 'lib/ovirtsdk4/types.rb', line 35218

def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.host = opts[:host]
  self.id = opts[:id]
  self.logical_units = opts[:logical_units]
  self.mount_options = opts[:mount_options]
  self.name = opts[:name]
  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

- (String) address

Returns the value of the address attribute.

Returns:

  • (String)


34774
34775
34776
# File 'lib/ovirtsdk4/types.rb', line 34774

def address
  return @address
end

- (Object) address=(value)

Sets the value of the address attribute.

Parameters:

  • value (String)


34783
34784
34785
# File 'lib/ovirtsdk4/types.rb', line 34783

def address=(value)
  @address = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


34792
34793
34794
# File 'lib/ovirtsdk4/types.rb', line 34792

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


34801
34802
34803
# File 'lib/ovirtsdk4/types.rb', line 34801

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


34810
34811
34812
# File 'lib/ovirtsdk4/types.rb', line 34810

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


34819
34820
34821
# File 'lib/ovirtsdk4/types.rb', line 34819

def description=(value)
  @description = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



34828
34829
34830
# File 'lib/ovirtsdk4/types.rb', line 34828

def host
  return @host
end

- (Object) host=(value)

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)


34841
34842
34843
34844
34845
34846
# File 'lib/ovirtsdk4/types.rb', line 34841

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


34853
34854
34855
# File 'lib/ovirtsdk4/types.rb', line 34853

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


34862
34863
34864
# File 'lib/ovirtsdk4/types.rb', line 34862

def id=(value)
  @id = value
end

- (Array<LogicalUnit>) logical_units

Returns the value of the logical_units attribute.

Returns:



34871
34872
34873
# File 'lib/ovirtsdk4/types.rb', line 34871

def logical_units
  return @logical_units
end

- (Object) logical_units=(list)

Sets the value of the logical_units attribute.

Parameters:



34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
# File 'lib/ovirtsdk4/types.rb', line 34879

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

- (String) mount_options

Returns the value of the mount_options attribute.

Returns:

  • (String)


34896
34897
34898
# File 'lib/ovirtsdk4/types.rb', line 34896

def mount_options
  return @mount_options
end

- (Object) mount_options=(value)

Sets the value of the mount_options attribute.

Parameters:

  • value (String)


34905
34906
34907
# File 'lib/ovirtsdk4/types.rb', line 34905

def mount_options=(value)
  @mount_options = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


34914
34915
34916
# File 'lib/ovirtsdk4/types.rb', line 34914

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


34923
34924
34925
# File 'lib/ovirtsdk4/types.rb', line 34923

def name=(value)
  @name = value
end

- (Integer) nfs_retrans

Returns the value of the nfs_retrans attribute.

Returns:

  • (Integer)


34932
34933
34934
# File 'lib/ovirtsdk4/types.rb', line 34932

def nfs_retrans
  return @nfs_retrans
end

- (Object) nfs_retrans=(value)

Sets the value of the nfs_retrans attribute.

Parameters:

  • value (Integer)


34941
34942
34943
# File 'lib/ovirtsdk4/types.rb', line 34941

def nfs_retrans=(value)
  @nfs_retrans = value
end

- (Integer) nfs_timeo

Returns the value of the nfs_timeo attribute.

Returns:

  • (Integer)


34950
34951
34952
# File 'lib/ovirtsdk4/types.rb', line 34950

def nfs_timeo
  return @nfs_timeo
end

- (Object) nfs_timeo=(value)

Sets the value of the nfs_timeo attribute.

Parameters:

  • value (Integer)


34959
34960
34961
# File 'lib/ovirtsdk4/types.rb', line 34959

def nfs_timeo=(value)
  @nfs_timeo = value
end

- (NfsVersion) nfs_version

Returns the value of the nfs_version attribute.

Returns:



34968
34969
34970
# File 'lib/ovirtsdk4/types.rb', line 34968

def nfs_version
  return @nfs_version
end

- (Object) nfs_version=(value)

Sets the value of the nfs_version attribute.

Parameters:



34977
34978
34979
# File 'lib/ovirtsdk4/types.rb', line 34977

def nfs_version=(value)
  @nfs_version = value
end

- (Boolean) override_luns

Returns the value of the override_luns attribute.

Returns:

  • (Boolean)


34986
34987
34988
# File 'lib/ovirtsdk4/types.rb', line 34986

def override_luns
  return @override_luns
end

- (Object) override_luns=(value)

Sets the value of the override_luns attribute.

Parameters:

  • value (Boolean)


34995
34996
34997
# File 'lib/ovirtsdk4/types.rb', line 34995

def override_luns=(value)
  @override_luns = value
end

- (String) password

Returns the value of the password attribute.

Returns:

  • (String)


35004
35005
35006
# File 'lib/ovirtsdk4/types.rb', line 35004

def password
  return @password
end

- (Object) password=(value)

Sets the value of the password attribute.

Parameters:

  • value (String)


35013
35014
35015
# File 'lib/ovirtsdk4/types.rb', line 35013

def password=(value)
  @password = value
end

- (String) path

Returns the value of the path attribute.

Returns:

  • (String)


35022
35023
35024
# File 'lib/ovirtsdk4/types.rb', line 35022

def path
  return @path
end

- (Object) path=(value)

Sets the value of the path attribute.

Parameters:

  • value (String)


35031
35032
35033
# File 'lib/ovirtsdk4/types.rb', line 35031

def path=(value)
  @path = value
end

- (Integer) port

Returns the value of the port attribute.

Returns:

  • (Integer)


35040
35041
35042
# File 'lib/ovirtsdk4/types.rb', line 35040

def port
  return @port
end

- (Object) port=(value)

Sets the value of the port attribute.

Parameters:

  • value (Integer)


35049
35050
35051
# File 'lib/ovirtsdk4/types.rb', line 35049

def port=(value)
  @port = value
end

- (String) portal

Returns the value of the portal attribute.

Returns:

  • (String)


35058
35059
35060
# File 'lib/ovirtsdk4/types.rb', line 35058

def portal
  return @portal
end

- (Object) portal=(value)

Sets the value of the portal attribute.

Parameters:

  • value (String)


35067
35068
35069
# File 'lib/ovirtsdk4/types.rb', line 35067

def portal=(value)
  @portal = value
end

- (String) target

Returns the value of the target attribute.

Returns:

  • (String)


35076
35077
35078
# File 'lib/ovirtsdk4/types.rb', line 35076

def target
  return @target
end

- (Object) target=(value)

Sets the value of the target attribute.

Parameters:

  • value (String)


35085
35086
35087
# File 'lib/ovirtsdk4/types.rb', line 35085

def target=(value)
  @target = value
end

- (StorageType) type

Returns the value of the type attribute.

Returns:



35094
35095
35096
# File 'lib/ovirtsdk4/types.rb', line 35094

def type
  return @type
end

- (Object) type=(value)

Sets the value of the type attribute.

Parameters:



35103
35104
35105
# File 'lib/ovirtsdk4/types.rb', line 35103

def type=(value)
  @type = value
end

- (String) username

Returns the value of the username attribute.

Returns:

  • (String)


35112
35113
35114
# File 'lib/ovirtsdk4/types.rb', line 35112

def username
  return @username
end

- (Object) username=(value)

Sets the value of the username attribute.

Parameters:

  • value (String)


35121
35122
35123
# File 'lib/ovirtsdk4/types.rb', line 35121

def username=(value)
  @username = value
end

- (String) vfs_type

Returns the value of the vfs_type attribute.

Returns:

  • (String)


35130
35131
35132
# File 'lib/ovirtsdk4/types.rb', line 35130

def vfs_type
  return @vfs_type
end

- (Object) vfs_type=(value)

Sets the value of the vfs_type attribute.

Parameters:

  • value (String)


35139
35140
35141
# File 'lib/ovirtsdk4/types.rb', line 35139

def vfs_type=(value)
  @vfs_type = value
end

- (VolumeGroup) volume_group

Returns the value of the volume_group attribute.

Returns:



35148
35149
35150
# File 'lib/ovirtsdk4/types.rb', line 35148

def volume_group
  return @volume_group
end

- (Object) volume_group=(value)

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:



35161
35162
35163
35164
35165
35166
# File 'lib/ovirtsdk4/types.rb', line 35161

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