Class: OvirtSDK4::ExternalVmImport

Inherits:
Struct
  • Object
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 = {}) ⇒ ExternalVmImport

Creates a new instance of the OvirtSDK4::ExternalVmImport 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):

  • :cluster (Cluster, Hash)

    The value of attribute cluster.

  • :cpu_profile (CpuProfile, Hash)

    The value of attribute cpu_profile.

  • :drivers_iso (File, Hash)

    The value of attribute drivers_iso.

  • :host (Host, Hash)

    The value of attribute host.

  • :name (String)

    The value of attribute name.

  • :password (String)

    The value of attribute password.

  • :provider (ExternalVmProviderType)

    The value of attribute provider.

  • :quota (Quota, Hash)

    The value of attribute quota.

  • :sparse (Boolean)

    The value of attribute sparse.

  • :storage_domain (StorageDomain, Hash)

    The value of attribute storage_domain.

  • :url (String)

    The value of attribute url.

  • :username (String)

    The value of attribute username.

  • :vm (Vm, Hash)

    The value of attribute vm.



3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
# File 'lib/ovirtsdk4/types.rb', line 3716

def initialize(opts = {})
  super(opts)
  self.cluster = opts[:cluster]
  self.cpu_profile = opts[:cpu_profile]
  self.drivers_iso = opts[:drivers_iso]
  self.host = opts[:host]
  self.name = opts[:name]
  self.password = opts[:password]
  self.provider = opts[:provider]
  self.quota = opts[:quota]
  self.sparse = opts[:sparse]
  self.storage_domain = opts[:storage_domain]
  self.url = opts[:url]
  self.username = opts[:username]
  self.vm = opts[:vm]
end

Instance Method Details

#==(other) ⇒ Object

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



3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
# File 'lib/ovirtsdk4/types.rb', line 3736

def ==(other)
  super &&
  @cluster == other.cluster &&
  @cpu_profile == other.cpu_profile &&
  @drivers_iso == other.drivers_iso &&
  @host == other.host &&
  @name == other.name &&
  @password == other.password &&
  @provider == other.provider &&
  @quota == other.quota &&
  @sparse == other.sparse &&
  @storage_domain == other.storage_domain &&
  @url == other.url &&
  @username == other.username &&
  @vm == other.vm
end

#clusterCluster

Returns the value of the cluster attribute.

Returns:



3404
3405
3406
# File 'lib/ovirtsdk4/types.rb', line 3404

def cluster
  @cluster
end

#cluster=(value) ⇒ Object

Sets the value of the cluster attribute.

The value parameter can be an instance of Cluster 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:



3417
3418
3419
3420
3421
3422
# File 'lib/ovirtsdk4/types.rb', line 3417

def cluster=(value)
  if value.is_a?(Hash)
    value = Cluster.new(value)
  end
  @cluster = value
end

#cpu_profileCpuProfile

Returns the value of the cpu_profile attribute.

Returns:



3429
3430
3431
# File 'lib/ovirtsdk4/types.rb', line 3429

def cpu_profile
  @cpu_profile
end

#cpu_profile=(value) ⇒ Object

Sets the value of the cpu_profile attribute.

The value parameter can be an instance of CpuProfile 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:



3442
3443
3444
3445
3446
3447
# File 'lib/ovirtsdk4/types.rb', line 3442

def cpu_profile=(value)
  if value.is_a?(Hash)
    value = CpuProfile.new(value)
  end
  @cpu_profile = value
end

#drivers_isoFile

Returns the value of the drivers_iso attribute.

Returns:



3454
3455
3456
# File 'lib/ovirtsdk4/types.rb', line 3454

def drivers_iso
  @drivers_iso
end

#drivers_iso=(value) ⇒ Object

Sets the value of the drivers_iso attribute.

The value parameter can be an instance of File 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 (File, Hash)


3467
3468
3469
3470
3471
3472
# File 'lib/ovirtsdk4/types.rb', line 3467

def drivers_iso=(value)
  if value.is_a?(Hash)
    value = File.new(value)
  end
  @drivers_iso = value
end

#hashObject

Generates a hash value for this object.



3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
# File 'lib/ovirtsdk4/types.rb', line 3756

def hash
  super +
  @cluster.hash +
  @cpu_profile.hash +
  @drivers_iso.hash +
  @host.hash +
  @name.hash +
  @password.hash +
  @provider.hash +
  @quota.hash +
  @sparse.hash +
  @storage_domain.hash +
  @url.hash +
  @username.hash +
  @vm.hash
end

#hostHost

Returns the value of the host attribute.

Returns:



3479
3480
3481
# File 'lib/ovirtsdk4/types.rb', line 3479

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)


3492
3493
3494
3495
3496
3497
# File 'lib/ovirtsdk4/types.rb', line 3492

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

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


3504
3505
3506
# File 'lib/ovirtsdk4/types.rb', line 3504

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


3513
3514
3515
# File 'lib/ovirtsdk4/types.rb', line 3513

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


3522
3523
3524
# File 'lib/ovirtsdk4/types.rb', line 3522

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


3531
3532
3533
# File 'lib/ovirtsdk4/types.rb', line 3531

def password=(value)
  @password = value
end

#providerExternalVmProviderType

Returns the value of the provider attribute.



3540
3541
3542
# File 'lib/ovirtsdk4/types.rb', line 3540

def provider
  @provider
end

#provider=(value) ⇒ Object

Sets the value of the provider attribute.

Parameters:



3549
3550
3551
# File 'lib/ovirtsdk4/types.rb', line 3549

def provider=(value)
  @provider = value
end

#quotaQuota

Returns the value of the quota attribute.

Returns:



3558
3559
3560
# File 'lib/ovirtsdk4/types.rb', line 3558

def quota
  @quota
end

#quota=(value) ⇒ Object

Sets the value of the quota attribute.

The value parameter can be an instance of Quota 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:



3571
3572
3573
3574
3575
3576
# File 'lib/ovirtsdk4/types.rb', line 3571

def quota=(value)
  if value.is_a?(Hash)
    value = Quota.new(value)
  end
  @quota = value
end

#sparseBoolean

Returns the value of the sparse attribute.

Returns:

  • (Boolean)


3583
3584
3585
# File 'lib/ovirtsdk4/types.rb', line 3583

def sparse
  @sparse
end

#sparse=(value) ⇒ Object

Sets the value of the sparse attribute.

Parameters:

  • value (Boolean)


3592
3593
3594
# File 'lib/ovirtsdk4/types.rb', line 3592

def sparse=(value)
  @sparse = value
end

#storage_domainStorageDomain

Returns the value of the storage_domain attribute.

Returns:



3601
3602
3603
# File 'lib/ovirtsdk4/types.rb', line 3601

def storage_domain
  @storage_domain
end

#storage_domain=(value) ⇒ Object

Sets the value of the storage_domain attribute.

The value parameter can be an instance of StorageDomain 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:



3614
3615
3616
3617
3618
3619
# File 'lib/ovirtsdk4/types.rb', line 3614

def storage_domain=(value)
  if value.is_a?(Hash)
    value = StorageDomain.new(value)
  end
  @storage_domain = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


3626
3627
3628
# File 'lib/ovirtsdk4/types.rb', line 3626

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


3635
3636
3637
# File 'lib/ovirtsdk4/types.rb', line 3635

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


3644
3645
3646
# File 'lib/ovirtsdk4/types.rb', line 3644

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


3653
3654
3655
# File 'lib/ovirtsdk4/types.rb', line 3653

def username=(value)
  @username = value
end

#vmVm

Returns the value of the vm attribute.

Returns:



3662
3663
3664
# File 'lib/ovirtsdk4/types.rb', line 3662

def vm
  @vm
end

#vm=(value) ⇒ Object

Sets the value of the vm attribute.

The value parameter can be an instance of Vm 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 (Vm, Hash)


3675
3676
3677
3678
3679
3680
# File 'lib/ovirtsdk4/types.rb', line 3675

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end