Class: OvirtSDK4::RegistrationConfiguration

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 = {}) ⇒ RegistrationConfiguration

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



17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
# File 'lib/ovirtsdk4/types.rb', line 17902

def initialize(opts = {})
  super(opts)
  self.affinity_group_mappings = opts[:affinity_group_mappings]
  self.affinity_label_mappings = opts[:affinity_label_mappings]
  self.cluster_mappings = opts[:cluster_mappings]
  self.domain_mappings = opts[:domain_mappings]
  self.lun_mappings = opts[:lun_mappings]
  self.role_mappings = opts[:role_mappings]
  self.vnic_profile_mappings = opts[:vnic_profile_mappings]
end

Instance Method Details

#==(other) ⇒ Object

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



17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
# File 'lib/ovirtsdk4/types.rb', line 17916

def ==(other)
  super &&
  @affinity_group_mappings == other.affinity_group_mappings &&
  @affinity_label_mappings == other.affinity_label_mappings &&
  @cluster_mappings == other.cluster_mappings &&
  @domain_mappings == other.domain_mappings &&
  @lun_mappings == other.lun_mappings &&
  @role_mappings == other.role_mappings &&
  @vnic_profile_mappings == other.vnic_profile_mappings
end

#affinity_group_mappingsArray<RegistrationAffinityGroupMapping>

Returns the value of the affinity_group_mappings attribute.



17703
17704
17705
# File 'lib/ovirtsdk4/types.rb', line 17703

def affinity_group_mappings
  @affinity_group_mappings
end

#affinity_group_mappings=(list) ⇒ Object

Sets the value of the affinity_group_mappings attribute.

Parameters:



17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
# File 'lib/ovirtsdk4/types.rb', line 17712

def affinity_group_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationAffinityGroupMapping.new(value)
      end
    end
  end
  @affinity_group_mappings = list
end

#affinity_label_mappingsArray<RegistrationAffinityLabelMapping>

Returns the value of the affinity_label_mappings attribute.



17729
17730
17731
# File 'lib/ovirtsdk4/types.rb', line 17729

def affinity_label_mappings
  @affinity_label_mappings
end

#affinity_label_mappings=(list) ⇒ Object

Sets the value of the affinity_label_mappings attribute.

Parameters:



17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
# File 'lib/ovirtsdk4/types.rb', line 17738

def affinity_label_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationAffinityLabelMapping.new(value)
      end
    end
  end
  @affinity_label_mappings = list
end

#cluster_mappingsArray<RegistrationClusterMapping>

Returns the value of the cluster_mappings attribute.

Returns:



17755
17756
17757
# File 'lib/ovirtsdk4/types.rb', line 17755

def cluster_mappings
  @cluster_mappings
end

#cluster_mappings=(list) ⇒ Object

Sets the value of the cluster_mappings attribute.

Parameters:



17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
# File 'lib/ovirtsdk4/types.rb', line 17764

def cluster_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationClusterMapping.new(value)
      end
    end
  end
  @cluster_mappings = list
end

#domain_mappingsArray<RegistrationDomainMapping>

Returns the value of the domain_mappings attribute.

Returns:



17781
17782
17783
# File 'lib/ovirtsdk4/types.rb', line 17781

def domain_mappings
  @domain_mappings
end

#domain_mappings=(list) ⇒ Object

Sets the value of the domain_mappings attribute.

Parameters:



17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
# File 'lib/ovirtsdk4/types.rb', line 17790

def domain_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationDomainMapping.new(value)
      end
    end
  end
  @domain_mappings = list
end

#hashObject

Generates a hash value for this object.



17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
# File 'lib/ovirtsdk4/types.rb', line 17930

def hash
  super +
  @affinity_group_mappings.hash +
  @affinity_label_mappings.hash +
  @cluster_mappings.hash +
  @domain_mappings.hash +
  @lun_mappings.hash +
  @role_mappings.hash +
  @vnic_profile_mappings.hash
end

#lun_mappingsArray<RegistrationLunMapping>

Returns the value of the lun_mappings attribute.

Returns:



17807
17808
17809
# File 'lib/ovirtsdk4/types.rb', line 17807

def lun_mappings
  @lun_mappings
end

#lun_mappings=(list) ⇒ Object

Sets the value of the lun_mappings attribute.

Parameters:



17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
# File 'lib/ovirtsdk4/types.rb', line 17816

def lun_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationLunMapping.new(value)
      end
    end
  end
  @lun_mappings = list
end

#role_mappingsArray<RegistrationRoleMapping>

Returns the value of the role_mappings attribute.

Returns:



17833
17834
17835
# File 'lib/ovirtsdk4/types.rb', line 17833

def role_mappings
  @role_mappings
end

#role_mappings=(list) ⇒ Object

Sets the value of the role_mappings attribute.

Parameters:



17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
# File 'lib/ovirtsdk4/types.rb', line 17842

def role_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationRoleMapping.new(value)
      end
    end
  end
  @role_mappings = list
end

#vnic_profile_mappingsArray<RegistrationVnicProfileMapping>

Returns the value of the vnic_profile_mappings attribute.

Returns:



17859
17860
17861
# File 'lib/ovirtsdk4/types.rb', line 17859

def vnic_profile_mappings
  @vnic_profile_mappings
end

#vnic_profile_mappings=(list) ⇒ Object

Sets the value of the vnic_profile_mappings attribute.

Parameters:



17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
# File 'lib/ovirtsdk4/types.rb', line 17868

def vnic_profile_mappings=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = RegistrationVnicProfileMapping.new(value)
      end
    end
  end
  @vnic_profile_mappings = list
end