Class: OvirtSDK4::NetworkAttachment
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::NetworkAttachment
- 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. -
#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. -
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the
dns_resolver_configuration
attribute. -
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the
dns_resolver_configuration
attribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
host
attribute. -
#host=(value) ⇒ Object
Sets the value of the
host
attribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nic
attribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nic
attribute. -
#id ⇒ String
Returns the value of the
id
attribute. -
#id=(value) ⇒ Object
Sets the value of the
id
attribute. -
#in_sync ⇒ Boolean
Returns the value of the
in_sync
attribute. -
#in_sync=(value) ⇒ Object
Sets the value of the
in_sync
attribute. -
#initialize(opts = {}) ⇒ NetworkAttachment
constructor
Creates a new instance of the NetworkAttachment class.
-
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the
ip_address_assignments
attribute. -
#ip_address_assignments=(list) ⇒ Object
Sets the value of the
ip_address_assignments
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#network ⇒ Network
Returns the value of the
network
attribute. -
#network=(value) ⇒ Object
Sets the value of the
network
attribute. -
#properties ⇒ Array<Property>
Returns the value of the
properties
attribute. -
#properties=(list) ⇒ Object
Sets the value of the
properties
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute. -
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the
reported_configurations
attribute. -
#reported_configurations=(list) ⇒ Object
Sets the value of the
reported_configurations
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NetworkAttachment
Creates a new instance of the OvirtSDK4::NetworkAttachment class.
11207 11208 11209 11210 11211 11212 11213 11214 11215 11216 11217 11218 |
# File 'lib/ovirtsdk4/types.rb', line 11207 def initialize(opts = {}) super(opts) self.dns_resolver_configuration = opts[:dns_resolver_configuration] self.host = opts[:host] self.host_nic = opts[:host_nic] self.in_sync = opts[:in_sync] self.ip_address_assignments = opts[:ip_address_assignments] self.network = opts[:network] self.properties = opts[:properties] self.qos = opts[:qos] self.reported_configurations = opts[:reported_configurations] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
11223 11224 11225 11226 11227 11228 11229 11230 11231 11232 11233 11234 |
# File 'lib/ovirtsdk4/types.rb', line 11223 def ==(other) super && @dns_resolver_configuration == other.dns_resolver_configuration && @host == other.host && @host_nic == other.host_nic && @in_sync == other.in_sync && @ip_address_assignments == other.ip_address_assignments && @network == other.network && @properties == other.properties && @qos == other.qos && @reported_configurations == other.reported_configurations end |
#comment ⇒ String
Returns the value of the comment
attribute.
10885 10886 10887 |
# File 'lib/ovirtsdk4/types.rb', line 10885 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
10894 10895 10896 |
# File 'lib/ovirtsdk4/types.rb', line 10894 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description
attribute.
10903 10904 10905 |
# File 'lib/ovirtsdk4/types.rb', line 10903 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
10912 10913 10914 |
# File 'lib/ovirtsdk4/types.rb', line 10912 def description=(value) @description = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration
attribute.
10921 10922 10923 |
# File 'lib/ovirtsdk4/types.rb', line 10921 def dns_resolver_configuration @dns_resolver_configuration end |
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the dns_resolver_configuration
attribute.
The value
parameter can be an instance of DnsResolverConfiguration 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.
10934 10935 10936 10937 10938 10939 |
# File 'lib/ovirtsdk4/types.rb', line 10934 def dns_resolver_configuration=(value) if value.is_a?(Hash) value = DnsResolverConfiguration.new(value) end @dns_resolver_configuration = value end |
#hash ⇒ Object
Generates a hash value for this object.
11239 11240 11241 11242 11243 11244 11245 11246 11247 11248 11249 11250 |
# File 'lib/ovirtsdk4/types.rb', line 11239 def hash super + @dns_resolver_configuration.hash + @host.hash + @host_nic.hash + @in_sync.hash + @ip_address_assignments.hash + @network.hash + @properties.hash + @qos.hash + @reported_configurations.hash end |
#host ⇒ Host
Returns the value of the host
attribute.
10946 10947 10948 |
# File 'lib/ovirtsdk4/types.rb', line 10946 def host @host end |
#host=(value) ⇒ Object
Sets the value of the host
attribute.
The value
parameter can be an instance of Host 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.
10959 10960 10961 10962 10963 10964 |
# File 'lib/ovirtsdk4/types.rb', line 10959 def host=(value) if value.is_a?(Hash) value = Host.new(value) end @host = value end |
#host_nic ⇒ HostNic
Returns the value of the host_nic
attribute.
10971 10972 10973 |
# File 'lib/ovirtsdk4/types.rb', line 10971 def host_nic @host_nic end |
#host_nic=(value) ⇒ Object
Sets the value of the host_nic
attribute.
The value
parameter can be an instance of HostNic 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.
10984 10985 10986 10987 10988 10989 |
# File 'lib/ovirtsdk4/types.rb', line 10984 def host_nic=(value) if value.is_a?(Hash) value = HostNic.new(value) end @host_nic = value end |
#id ⇒ String
Returns the value of the id
attribute.
10996 10997 10998 |
# File 'lib/ovirtsdk4/types.rb', line 10996 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
11005 11006 11007 |
# File 'lib/ovirtsdk4/types.rb', line 11005 def id=(value) @id = value end |
#in_sync ⇒ Boolean
Returns the value of the in_sync
attribute.
11014 11015 11016 |
# File 'lib/ovirtsdk4/types.rb', line 11014 def in_sync @in_sync end |
#in_sync=(value) ⇒ Object
Sets the value of the in_sync
attribute.
11023 11024 11025 |
# File 'lib/ovirtsdk4/types.rb', line 11023 def in_sync=(value) @in_sync = value end |
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the ip_address_assignments
attribute.
11032 11033 11034 |
# File 'lib/ovirtsdk4/types.rb', line 11032 def ip_address_assignments @ip_address_assignments end |
#ip_address_assignments=(list) ⇒ Object
Sets the value of the ip_address_assignments
attribute.
11041 11042 11043 11044 11045 11046 11047 11048 11049 11050 11051 |
# File 'lib/ovirtsdk4/types.rb', line 11041 def ip_address_assignments=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = IpAddressAssignment.new(value) end end end @ip_address_assignments = list end |
#name ⇒ String
Returns the value of the name
attribute.
11058 11059 11060 |
# File 'lib/ovirtsdk4/types.rb', line 11058 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
11067 11068 11069 |
# File 'lib/ovirtsdk4/types.rb', line 11067 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network
attribute.
11076 11077 11078 |
# File 'lib/ovirtsdk4/types.rb', line 11076 def network @network end |
#network=(value) ⇒ Object
Sets the value of the network
attribute.
The value
parameter can be an instance of OvirtSDK4::Network 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.
11089 11090 11091 11092 11093 11094 |
# File 'lib/ovirtsdk4/types.rb', line 11089 def network=(value) if value.is_a?(Hash) value = Network.new(value) end @network = value end |
#properties ⇒ Array<Property>
Returns the value of the properties
attribute.
11101 11102 11103 |
# File 'lib/ovirtsdk4/types.rb', line 11101 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties
attribute.
11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 |
# File 'lib/ovirtsdk4/types.rb', line 11110 def properties=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = Property.new(value) end end end @properties = list end |
#qos ⇒ Qos
Returns the value of the qos
attribute.
11127 11128 11129 |
# File 'lib/ovirtsdk4/types.rb', line 11127 def qos @qos end |
#qos=(value) ⇒ Object
Sets the value of the qos
attribute.
The value
parameter can be an instance of Qos 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.
11140 11141 11142 11143 11144 11145 |
# File 'lib/ovirtsdk4/types.rb', line 11140 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the reported_configurations
attribute.
11152 11153 11154 |
# File 'lib/ovirtsdk4/types.rb', line 11152 def reported_configurations @reported_configurations end |
#reported_configurations=(list) ⇒ Object
Sets the value of the reported_configurations
attribute.
11161 11162 11163 11164 11165 11166 11167 11168 11169 11170 11171 |
# File 'lib/ovirtsdk4/types.rb', line 11161 def reported_configurations=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = ReportedConfiguration.new(value) end end end @reported_configurations = list end |