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


17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
# File 'lib/ovirtsdk4/types.rb', line 17159

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.


17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
# File 'lib/ovirtsdk4/types.rb', line 17173

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.


16960
16961
16962
# File 'lib/ovirtsdk4/types.rb', line 16960

def affinity_group_mappings
  @affinity_group_mappings
end

#affinity_group_mappings=(list) ⇒ Object

Sets the value of the affinity_group_mappings attribute.

Parameters:


16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
# File 'lib/ovirtsdk4/types.rb', line 16969

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.


16986
16987
16988
# File 'lib/ovirtsdk4/types.rb', line 16986

def affinity_label_mappings
  @affinity_label_mappings
end

#affinity_label_mappings=(list) ⇒ Object

Sets the value of the affinity_label_mappings attribute.

Parameters:


16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
# File 'lib/ovirtsdk4/types.rb', line 16995

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:


17012
17013
17014
# File 'lib/ovirtsdk4/types.rb', line 17012

def cluster_mappings
  @cluster_mappings
end

#cluster_mappings=(list) ⇒ Object

Sets the value of the cluster_mappings attribute.

Parameters:


17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
# File 'lib/ovirtsdk4/types.rb', line 17021

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:


17038
17039
17040
# File 'lib/ovirtsdk4/types.rb', line 17038

def domain_mappings
  @domain_mappings
end

#domain_mappings=(list) ⇒ Object

Sets the value of the domain_mappings attribute.

Parameters:


17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
# File 'lib/ovirtsdk4/types.rb', line 17047

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.


17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
# File 'lib/ovirtsdk4/types.rb', line 17187

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:


17064
17065
17066
# File 'lib/ovirtsdk4/types.rb', line 17064

def lun_mappings
  @lun_mappings
end

#lun_mappings=(list) ⇒ Object

Sets the value of the lun_mappings attribute.

Parameters:


17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
# File 'lib/ovirtsdk4/types.rb', line 17073

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:


17090
17091
17092
# File 'lib/ovirtsdk4/types.rb', line 17090

def role_mappings
  @role_mappings
end

#role_mappings=(list) ⇒ Object

Sets the value of the role_mappings attribute.

Parameters:


17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
# File 'lib/ovirtsdk4/types.rb', line 17099

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:


17116
17117
17118
# File 'lib/ovirtsdk4/types.rb', line 17116

def vnic_profile_mappings
  @vnic_profile_mappings
end

#vnic_profile_mappings=(list) ⇒ Object

Sets the value of the vnic_profile_mappings attribute.

Parameters:


17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
# File 'lib/ovirtsdk4/types.rb', line 17125

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