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


17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
# File 'lib/ovirtsdk4/types.rb', line 17053

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.


17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
# File 'lib/ovirtsdk4/types.rb', line 17067

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.


16854
16855
16856
# File 'lib/ovirtsdk4/types.rb', line 16854

def affinity_group_mappings
  @affinity_group_mappings
end

#affinity_group_mappings=(list) ⇒ Object

Sets the value of the affinity_group_mappings attribute.

Parameters:


16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
# File 'lib/ovirtsdk4/types.rb', line 16863

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.


16880
16881
16882
# File 'lib/ovirtsdk4/types.rb', line 16880

def affinity_label_mappings
  @affinity_label_mappings
end

#affinity_label_mappings=(list) ⇒ Object

Sets the value of the affinity_label_mappings attribute.

Parameters:


16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
# File 'lib/ovirtsdk4/types.rb', line 16889

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:


16906
16907
16908
# File 'lib/ovirtsdk4/types.rb', line 16906

def cluster_mappings
  @cluster_mappings
end

#cluster_mappings=(list) ⇒ Object

Sets the value of the cluster_mappings attribute.

Parameters:


16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
# File 'lib/ovirtsdk4/types.rb', line 16915

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:


16932
16933
16934
# File 'lib/ovirtsdk4/types.rb', line 16932

def domain_mappings
  @domain_mappings
end

#domain_mappings=(list) ⇒ Object

Sets the value of the domain_mappings attribute.

Parameters:


16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
# File 'lib/ovirtsdk4/types.rb', line 16941

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.


17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
# File 'lib/ovirtsdk4/types.rb', line 17081

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:


16958
16959
16960
# File 'lib/ovirtsdk4/types.rb', line 16958

def lun_mappings
  @lun_mappings
end

#lun_mappings=(list) ⇒ Object

Sets the value of the lun_mappings attribute.

Parameters:


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

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:


16984
16985
16986
# File 'lib/ovirtsdk4/types.rb', line 16984

def role_mappings
  @role_mappings
end

#role_mappings=(list) ⇒ Object

Sets the value of the role_mappings attribute.

Parameters:


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

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:


17010
17011
17012
# File 'lib/ovirtsdk4/types.rb', line 17010

def vnic_profile_mappings
  @vnic_profile_mappings
end

#vnic_profile_mappings=(list) ⇒ Object

Sets the value of the vnic_profile_mappings attribute.

Parameters:


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

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