Class: OvirtSDK4::DataCenter
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::DataCenter
- Defined in:
- lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
Returns
true
ifself
andother
have the same attributes and values. -
#clusters ⇒ Array<Cluster>
Returns the value of the
clusters
attribute. -
#clusters=(list) ⇒ Object
Sets the value of the
clusters
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#initialize(opts = {}) ⇒ DataCenter
constructor
Creates a new instance of the DataCenter class.
-
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the
iscsi_bonds
attribute. -
#iscsi_bonds=(list) ⇒ Object
Sets the value of the
iscsi_bonds
attribute. -
#local ⇒ Boolean
Returns the value of the
local
attribute. -
#local=(value) ⇒ Object
Sets the value of the
local
attribute. -
#mac_pool ⇒ MacPool
Returns the value of the
mac_pool
attribute. -
#mac_pool=(value) ⇒ Object
Sets the value of the
mac_pool
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#networks ⇒ Array<Network>
Returns the value of the
networks
attribute. -
#networks=(list) ⇒ Object
Sets the value of the
networks
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#qoss ⇒ Array<Qos>
Returns the value of the
qoss
attribute. -
#qoss=(list) ⇒ Object
Sets the value of the
qoss
attribute. -
#quota_mode ⇒ QuotaModeType
Returns the value of the
quota_mode
attribute. -
#quota_mode=(value) ⇒ Object
Sets the value of the
quota_mode
attribute. -
#quotas ⇒ Array<Quota>
Returns the value of the
quotas
attribute. -
#quotas=(list) ⇒ Object
Sets the value of the
quotas
attribute. -
#status ⇒ DataCenterStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the
storage_domains
attribute. -
#storage_domains=(list) ⇒ Object
Sets the value of the
storage_domains
attribute. -
#storage_format ⇒ StorageFormat
Returns the value of the
storage_format
attribute. -
#storage_format=(value) ⇒ Object
Sets the value of the
storage_format
attribute. -
#supported_versions ⇒ Array<Version>
Returns the value of the
supported_versions
attribute. -
#supported_versions=(list) ⇒ Object
Sets the value of the
supported_versions
attribute. -
#version ⇒ Version
Returns the value of the
version
attribute. -
#version=(value) ⇒ Object
Sets the value of the
version
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ DataCenter
Creates a new instance of the OvirtSDK4::DataCenter class.
34927 34928 34929 34930 34931 34932 34933 34934 34935 34936 34937 34938 34939 34940 34941 34942 34943 |
# File 'lib/ovirtsdk4/types.rb', line 34927 def initialize(opts = {}) super(opts) self.clusters = opts[:clusters] self.iscsi_bonds = opts[:iscsi_bonds] self.local = opts[:local] self.mac_pool = opts[:mac_pool] self.networks = opts[:networks] self. = opts[:permissions] self.qoss = opts[:qoss] self.quota_mode = opts[:quota_mode] self.quotas = opts[:quotas] self.status = opts[:status] self.storage_domains = opts[:storage_domains] self.storage_format = opts[:storage_format] self.supported_versions = opts[:supported_versions] self.version = opts[:version] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
34948 34949 34950 34951 34952 34953 34954 34955 34956 34957 34958 34959 34960 34961 34962 34963 34964 |
# File 'lib/ovirtsdk4/types.rb', line 34948 def ==(other) super && @clusters == other.clusters && @iscsi_bonds == other.iscsi_bonds && @local == other.local && @mac_pool == other.mac_pool && @networks == other.networks && @permissions == other. && @qoss == other.qoss && @quota_mode == other.quota_mode && @quotas == other.quotas && @status == other.status && @storage_domains == other.storage_domains && @storage_format == other.storage_format && @supported_versions == other.supported_versions && @version == other.version end |
#clusters ⇒ Array<Cluster>
Returns the value of the clusters
attribute.
34486 34487 34488 |
# File 'lib/ovirtsdk4/types.rb', line 34486 def clusters @clusters end |
#clusters=(list) ⇒ Object
Sets the value of the clusters
attribute.
34495 34496 34497 34498 34499 34500 34501 34502 34503 34504 34505 |
# File 'lib/ovirtsdk4/types.rb', line 34495 def clusters=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Cluster.new(value) end end end @clusters = list end |
#comment ⇒ String
Returns the value of the comment
attribute.
34512 34513 34514 |
# File 'lib/ovirtsdk4/types.rb', line 34512 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
34521 34522 34523 |
# File 'lib/ovirtsdk4/types.rb', line 34521 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
34530 34531 34532 |
# File 'lib/ovirtsdk4/types.rb', line 34530 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
34539 34540 34541 |
# File 'lib/ovirtsdk4/types.rb', line 34539 def description=(value) @description = value end |
#hash ⇒ Object
Generates a hash value for this object.
34969 34970 34971 34972 34973 34974 34975 34976 34977 34978 34979 34980 34981 34982 34983 34984 34985 |
# File 'lib/ovirtsdk4/types.rb', line 34969 def hash super + @clusters.hash + @iscsi_bonds.hash + @local.hash + @mac_pool.hash + @networks.hash + @permissions.hash + @qoss.hash + @quota_mode.hash + @quotas.hash + @status.hash + @storage_domains.hash + @storage_format.hash + @supported_versions.hash + @version.hash end |
#id ⇒ String
Returns the value of the id
attribute.
34548 34549 34550 |
# File 'lib/ovirtsdk4/types.rb', line 34548 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
34557 34558 34559 |
# File 'lib/ovirtsdk4/types.rb', line 34557 def id=(value) @id = value end |
#iscsi_bonds ⇒ Array<IscsiBond>
Returns the value of the iscsi_bonds
attribute.
34566 34567 34568 |
# File 'lib/ovirtsdk4/types.rb', line 34566 def iscsi_bonds @iscsi_bonds end |
#iscsi_bonds=(list) ⇒ Object
Sets the value of the iscsi_bonds
attribute.
34575 34576 34577 34578 34579 34580 34581 34582 34583 34584 34585 |
# File 'lib/ovirtsdk4/types.rb', line 34575 def iscsi_bonds=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = IscsiBond.new(value) end end end @iscsi_bonds = list end |
#local ⇒ Boolean
Returns the value of the local
attribute.
34592 34593 34594 |
# File 'lib/ovirtsdk4/types.rb', line 34592 def local @local end |
#local=(value) ⇒ Object
Sets the value of the local
attribute.
34601 34602 34603 |
# File 'lib/ovirtsdk4/types.rb', line 34601 def local=(value) @local = value end |
#mac_pool ⇒ MacPool
Returns the value of the mac_pool
attribute.
34610 34611 34612 |
# File 'lib/ovirtsdk4/types.rb', line 34610 def mac_pool @mac_pool end |
#mac_pool=(value) ⇒ Object
Sets the value of the mac_pool
attribute.
The value
parameter can be an instance of MacPool 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.
34623 34624 34625 34626 34627 34628 |
# File 'lib/ovirtsdk4/types.rb', line 34623 def mac_pool=(value) if value.is_a?(Hash) value = MacPool.new(value) end @mac_pool = value end |
#name ⇒ String
Returns the value of the name
attribute.
34635 34636 34637 |
# File 'lib/ovirtsdk4/types.rb', line 34635 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
34644 34645 34646 |
# File 'lib/ovirtsdk4/types.rb', line 34644 def name=(value) @name = value end |
#networks ⇒ Array<Network>
Returns the value of the networks
attribute.
34653 34654 34655 |
# File 'lib/ovirtsdk4/types.rb', line 34653 def networks @networks end |
#networks=(list) ⇒ Object
Sets the value of the networks
attribute.
34662 34663 34664 34665 34666 34667 34668 34669 34670 34671 34672 |
# File 'lib/ovirtsdk4/types.rb', line 34662 def networks=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Network.new(value) end end end @networks = list end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
34679 34680 34681 |
# File 'lib/ovirtsdk4/types.rb', line 34679 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
34688 34689 34690 34691 34692 34693 34694 34695 34696 34697 34698 |
# File 'lib/ovirtsdk4/types.rb', line 34688 def (list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Permission.new(value) end end end @permissions = list end |
#qoss ⇒ Array<Qos>
Returns the value of the qoss
attribute.
34705 34706 34707 |
# File 'lib/ovirtsdk4/types.rb', line 34705 def qoss @qoss end |
#qoss=(list) ⇒ Object
Sets the value of the qoss
attribute.
34714 34715 34716 34717 34718 34719 34720 34721 34722 34723 34724 |
# File 'lib/ovirtsdk4/types.rb', line 34714 def qoss=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Qos.new(value) end end end @qoss = list end |
#quota_mode ⇒ QuotaModeType
Returns the value of the quota_mode
attribute.
34731 34732 34733 |
# File 'lib/ovirtsdk4/types.rb', line 34731 def quota_mode @quota_mode end |
#quota_mode=(value) ⇒ Object
Sets the value of the quota_mode
attribute.
34740 34741 34742 |
# File 'lib/ovirtsdk4/types.rb', line 34740 def quota_mode=(value) @quota_mode = value end |
#quotas ⇒ Array<Quota>
Returns the value of the quotas
attribute.
34749 34750 34751 |
# File 'lib/ovirtsdk4/types.rb', line 34749 def quotas @quotas end |
#quotas=(list) ⇒ Object
Sets the value of the quotas
attribute.
34758 34759 34760 34761 34762 34763 34764 34765 34766 34767 34768 |
# File 'lib/ovirtsdk4/types.rb', line 34758 def quotas=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Quota.new(value) end end end @quotas = list end |
#status ⇒ DataCenterStatus
Returns the value of the status
attribute.
34775 34776 34777 |
# File 'lib/ovirtsdk4/types.rb', line 34775 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
34784 34785 34786 |
# File 'lib/ovirtsdk4/types.rb', line 34784 def status=(value) @status = value end |
#storage_domains ⇒ Array<StorageDomain>
Returns the value of the storage_domains
attribute.
34793 34794 34795 |
# File 'lib/ovirtsdk4/types.rb', line 34793 def storage_domains @storage_domains end |
#storage_domains=(list) ⇒ Object
Sets the value of the storage_domains
attribute.
34802 34803 34804 34805 34806 34807 34808 34809 34810 34811 34812 |
# File 'lib/ovirtsdk4/types.rb', line 34802 def storage_domains=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = StorageDomain.new(value) end end end @storage_domains = list end |
#storage_format ⇒ StorageFormat
Returns the value of the storage_format
attribute.
34819 34820 34821 |
# File 'lib/ovirtsdk4/types.rb', line 34819 def storage_format @storage_format end |
#storage_format=(value) ⇒ Object
Sets the value of the storage_format
attribute.
34828 34829 34830 |
# File 'lib/ovirtsdk4/types.rb', line 34828 def storage_format=(value) @storage_format = value end |
#supported_versions ⇒ Array<Version>
Returns the value of the supported_versions
attribute.
34837 34838 34839 |
# File 'lib/ovirtsdk4/types.rb', line 34837 def supported_versions @supported_versions end |
#supported_versions=(list) ⇒ Object
Sets the value of the supported_versions
attribute.
34846 34847 34848 34849 34850 34851 34852 34853 34854 34855 34856 |
# File 'lib/ovirtsdk4/types.rb', line 34846 def supported_versions=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Version.new(value) end end end @supported_versions = list end |
#version ⇒ Version
Returns the value of the version
attribute.
34863 34864 34865 |
# File 'lib/ovirtsdk4/types.rb', line 34863 def version @version end |
#version=(value) ⇒ Object
Sets the value of the version
attribute.
The value
parameter can be an instance of Version 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.
34876 34877 34878 34879 34880 34881 |
# File 'lib/ovirtsdk4/types.rb', line 34876 def version=(value) if value.is_a?(Hash) value = Version.new(value) end @version = value end |