class OvirtSDK4::HostStorage

Public Class Methods

new(opts = {}) click to toggle source

Creates a new instance of the {HostStorage} class.

@param opts [Hash] 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.

@option opts [String] :address The value of attribute `address`.

@option opts [String] :comment The value of attribute `comment`.

@option opts [String] :description The value of attribute `description`.

@option opts [Array<Property>, Array<Hash>] :driver_options The values of attribute `driver_options`.

@option opts [Array<Property>, Array<Hash>] :driver_sensitive_options The values of attribute `driver_sensitive_options`.

@option opts [Host, Hash] :host The value of attribute `host`.

@option opts [String] :id The value of attribute `id`.

@option opts [Array<LogicalUnit>, Array<Hash>] :logical_units The values of attribute `logical_units`.

@option opts [String] :mount_options The value of attribute `mount_options`.

@option opts [String] :name The value of attribute `name`.

@option opts [Integer] :nfs_retrans The value of attribute `nfs_retrans`.

@option opts [Integer] :nfs_timeo The value of attribute `nfs_timeo`.

@option opts [NfsVersion] :nfs_version The value of attribute `nfs_version`.

@option opts [Boolean] :override_luns The value of attribute `override_luns`.

@option opts [String] :password The value of attribute `password`.

@option opts [String] :path The value of attribute `path`.

@option opts [Integer] :port The value of attribute `port`.

@option opts [String] :portal The value of attribute `portal`.

@option opts [String] :target The value of attribute `target`.

@option opts [StorageType] :type The value of attribute `type`.

@option opts [String] :username The value of attribute `username`.

@option opts [String] :vfs_type The value of attribute `vfs_type`.

@option opts [VolumeGroup, Hash] :volume_group The value of attribute `volume_group`.

Calls superclass method OvirtSDK4::Identified::new
# File lib/ovirtsdk4/types.rb, line 47732
def initialize(opts = {})
  super(opts)
  self.address = opts[:address]
  self.driver_options = opts[:driver_options]
  self.driver_sensitive_options = opts[:driver_sensitive_options]
  self.host = opts[:host]
  self.logical_units = opts[:logical_units]
  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.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

Public Instance Methods

==(other) click to toggle source

Returns `true` if `self` and `other` have the same attributes and values.

Calls superclass method OvirtSDK4::Identified#==
# File lib/ovirtsdk4/types.rb, line 47758
def ==(other)
  super &&
  @address == other.address &&
  @driver_options == other.driver_options &&
  @driver_sensitive_options == other.driver_sensitive_options &&
  @host == other.host &&
  @logical_units == other.logical_units &&
  @mount_options == other.mount_options &&
  @nfs_retrans == other.nfs_retrans &&
  @nfs_timeo == other.nfs_timeo &&
  @nfs_version == other.nfs_version &&
  @override_luns == other.override_luns &&
  @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 &&
  @volume_group == other.volume_group
end
address() click to toggle source

Returns the value of the `address` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47231
def address
  @address
end
address=(value) click to toggle source

Sets the value of the `address` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47240
def address=(value)
  @address = value
end
comment() click to toggle source

Returns the value of the `comment` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47249
def comment
  @comment
end
comment=(value) click to toggle source

Sets the value of the `comment` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47258
def comment=(value)
  @comment = value
end
description() click to toggle source

Returns the value of the `description` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47267
def description
  @description
end
description=(value) click to toggle source

Sets the value of the `description` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47276
def description=(value)
  @description = value
end
driver_options() click to toggle source

Returns the value of the `driver_options` attribute.

@return [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 47285
def driver_options
  @driver_options
end
driver_options=(list) click to toggle source

Sets the value of the `driver_options` attribute.

@param list [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 47294
def driver_options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @driver_options = list
end
driver_sensitive_options() click to toggle source

Returns the value of the `driver_sensitive_options` attribute.

@return [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 47311
def driver_sensitive_options
  @driver_sensitive_options
end
driver_sensitive_options=(list) click to toggle source

Sets the value of the `driver_sensitive_options` attribute.

@param list [Array<Property>]

# File lib/ovirtsdk4/types.rb, line 47320
def driver_sensitive_options=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @driver_sensitive_options = list
end
hash() click to toggle source

Generates a hash value for this object.

Calls superclass method OvirtSDK4::Identified#hash
# File lib/ovirtsdk4/types.rb, line 47784
def hash
  super +
  @address.hash +
  @driver_options.hash +
  @driver_sensitive_options.hash +
  @host.hash +
  @logical_units.hash +
  @mount_options.hash +
  @nfs_retrans.hash +
  @nfs_timeo.hash +
  @nfs_version.hash +
  @override_luns.hash +
  @password.hash +
  @path.hash +
  @port.hash +
  @portal.hash +
  @target.hash +
  @type.hash +
  @username.hash +
  @vfs_type.hash +
  @volume_group.hash
end
host() click to toggle source

Returns the value of the `host` attribute.

@return [Host]

# File lib/ovirtsdk4/types.rb, line 47337
def host
  @host
end
host=(value) click to toggle source

Sets the value of the `host` attribute.

@param value [Host, Hash]

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.

# File lib/ovirtsdk4/types.rb, line 47350
def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end
id() click to toggle source

Returns the value of the `id` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47362
def id
  @id
end
id=(value) click to toggle source

Sets the value of the `id` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47371
def id=(value)
  @id = value
end
logical_units() click to toggle source

Returns the value of the `logical_units` attribute.

@return [Array<LogicalUnit>]

# File lib/ovirtsdk4/types.rb, line 47380
def logical_units
  @logical_units
end
logical_units=(list) click to toggle source

Sets the value of the `logical_units` attribute.

@param list [Array<LogicalUnit>]

# File lib/ovirtsdk4/types.rb, line 47389
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
mount_options() click to toggle source

Returns the value of the `mount_options` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47406
def mount_options
  @mount_options
end
mount_options=(value) click to toggle source

Sets the value of the `mount_options` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47415
def mount_options=(value)
  @mount_options = value
end
name() click to toggle source

Returns the value of the `name` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47424
def name
  @name
end
name=(value) click to toggle source

Sets the value of the `name` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47433
def name=(value)
  @name = value
end
nfs_retrans() click to toggle source

Returns the value of the `nfs_retrans` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 47442
def nfs_retrans
  @nfs_retrans
end
nfs_retrans=(value) click to toggle source

Sets the value of the `nfs_retrans` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 47451
def nfs_retrans=(value)
  @nfs_retrans = value
end
nfs_timeo() click to toggle source

Returns the value of the `nfs_timeo` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 47460
def nfs_timeo
  @nfs_timeo
end
nfs_timeo=(value) click to toggle source

Sets the value of the `nfs_timeo` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 47469
def nfs_timeo=(value)
  @nfs_timeo = value
end
nfs_version() click to toggle source

Returns the value of the `nfs_version` attribute.

@return [NfsVersion]

# File lib/ovirtsdk4/types.rb, line 47478
def nfs_version
  @nfs_version
end
nfs_version=(value) click to toggle source

Sets the value of the `nfs_version` attribute.

@param value [NfsVersion]

# File lib/ovirtsdk4/types.rb, line 47487
def nfs_version=(value)
  @nfs_version = value
end
override_luns() click to toggle source

Returns the value of the `override_luns` attribute.

@return [Boolean]

# File lib/ovirtsdk4/types.rb, line 47496
def override_luns
  @override_luns
end
override_luns=(value) click to toggle source

Sets the value of the `override_luns` attribute.

@param value [Boolean]

# File lib/ovirtsdk4/types.rb, line 47505
def override_luns=(value)
  @override_luns = value
end
password() click to toggle source

Returns the value of the `password` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47514
def password
  @password
end
password=(value) click to toggle source

Sets the value of the `password` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47523
def password=(value)
  @password = value
end
path() click to toggle source

Returns the value of the `path` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47532
def path
  @path
end
path=(value) click to toggle source

Sets the value of the `path` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47541
def path=(value)
  @path = value
end
port() click to toggle source

Returns the value of the `port` attribute.

@return [Integer]

# File lib/ovirtsdk4/types.rb, line 47550
def port
  @port
end
port=(value) click to toggle source

Sets the value of the `port` attribute.

@param value [Integer]

# File lib/ovirtsdk4/types.rb, line 47559
def port=(value)
  @port = value
end
portal() click to toggle source

Returns the value of the `portal` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47568
def portal
  @portal
end
portal=(value) click to toggle source

Sets the value of the `portal` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47577
def portal=(value)
  @portal = value
end
target() click to toggle source

Returns the value of the `target` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47586
def target
  @target
end
target=(value) click to toggle source

Sets the value of the `target` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47595
def target=(value)
  @target = value
end
type() click to toggle source

Returns the value of the `type` attribute.

@return [StorageType]

# File lib/ovirtsdk4/types.rb, line 47604
def type
  @type
end
type=(value) click to toggle source

Sets the value of the `type` attribute.

@param value [StorageType]

# File lib/ovirtsdk4/types.rb, line 47613
def type=(value)
  @type = value
end
username() click to toggle source

Returns the value of the `username` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47622
def username
  @username
end
username=(value) click to toggle source

Sets the value of the `username` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47631
def username=(value)
  @username = value
end
vfs_type() click to toggle source

Returns the value of the `vfs_type` attribute.

@return [String]

# File lib/ovirtsdk4/types.rb, line 47640
def vfs_type
  @vfs_type
end
vfs_type=(value) click to toggle source

Sets the value of the `vfs_type` attribute.

@param value [String]

# File lib/ovirtsdk4/types.rb, line 47649
def vfs_type=(value)
  @vfs_type = value
end
volume_group() click to toggle source

Returns the value of the `volume_group` attribute.

@return [VolumeGroup]

# File lib/ovirtsdk4/types.rb, line 47658
def volume_group
  @volume_group
end
volume_group=(value) click to toggle source

Sets the value of the `volume_group` attribute.

@param value [VolumeGroup, Hash]

The `value` parameter can be an instance of {OvirtSDK4::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.

# File lib/ovirtsdk4/types.rb, line 47671
def volume_group=(value)
  if value.is_a?(Hash)
    value = VolumeGroup.new(value)
  end
  @volume_group = value
end