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):



16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
# File 'lib/ovirtsdk4/types.rb', line 16754

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.



16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
# File 'lib/ovirtsdk4/types.rb', line 16768

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.



16555
16556
16557
# File 'lib/ovirtsdk4/types.rb', line 16555

def affinity_group_mappings
  @affinity_group_mappings
end

#affinity_group_mappings=(list) ⇒ Object

Sets the value of the affinity_group_mappings attribute.

Parameters:



16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
# File 'lib/ovirtsdk4/types.rb', line 16564

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.



16581
16582
16583
# File 'lib/ovirtsdk4/types.rb', line 16581

def affinity_label_mappings
  @affinity_label_mappings
end

#affinity_label_mappings=(list) ⇒ Object

Sets the value of the affinity_label_mappings attribute.

Parameters:



16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
# File 'lib/ovirtsdk4/types.rb', line 16590

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:



16607
16608
16609
# File 'lib/ovirtsdk4/types.rb', line 16607

def cluster_mappings
  @cluster_mappings
end

#cluster_mappings=(list) ⇒ Object

Sets the value of the cluster_mappings attribute.

Parameters:



16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
# File 'lib/ovirtsdk4/types.rb', line 16616

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:



16633
16634
16635
# File 'lib/ovirtsdk4/types.rb', line 16633

def domain_mappings
  @domain_mappings
end

#domain_mappings=(list) ⇒ Object

Sets the value of the domain_mappings attribute.

Parameters:



16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
# File 'lib/ovirtsdk4/types.rb', line 16642

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.



16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
# File 'lib/ovirtsdk4/types.rb', line 16782

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:



16659
16660
16661
# File 'lib/ovirtsdk4/types.rb', line 16659

def lun_mappings
  @lun_mappings
end

#lun_mappings=(list) ⇒ Object

Sets the value of the lun_mappings attribute.

Parameters:



16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
# File 'lib/ovirtsdk4/types.rb', line 16668

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:



16685
16686
16687
# File 'lib/ovirtsdk4/types.rb', line 16685

def role_mappings
  @role_mappings
end

#role_mappings=(list) ⇒ Object

Sets the value of the role_mappings attribute.

Parameters:



16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
# File 'lib/ovirtsdk4/types.rb', line 16694

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:



16711
16712
16713
# File 'lib/ovirtsdk4/types.rb', line 16711

def vnic_profile_mappings
  @vnic_profile_mappings
end

#vnic_profile_mappings=(list) ⇒ Object

Sets the value of the vnic_profile_mappings attribute.

Parameters:



16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
# File 'lib/ovirtsdk4/types.rb', line 16720

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