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
trueifselfandotherhave the same attributes and values. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the
dns_resolver_configurationattribute. -
#dns_resolver_configuration=(value) ⇒ Object
Sets the value of the
dns_resolver_configurationattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#host ⇒ Host
Returns the value of the
hostattribute. -
#host=(value) ⇒ Object
Sets the value of the
hostattribute. -
#host_nic ⇒ HostNic
Returns the value of the
host_nicattribute. -
#host_nic=(value) ⇒ Object
Sets the value of the
host_nicattribute. -
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#in_sync ⇒ Boolean
Returns the value of the
in_syncattribute. -
#in_sync=(value) ⇒ Object
Sets the value of the
in_syncattribute. -
#initialize(opts = {}) ⇒ NetworkAttachment
constructor
Creates a new instance of the NetworkAttachment class.
-
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the
ip_address_assignmentsattribute. -
#ip_address_assignments=(list) ⇒ Object
Sets the value of the
ip_address_assignmentsattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#network ⇒ Network
Returns the value of the
networkattribute. -
#network=(value) ⇒ Object
Sets the value of the
networkattribute. -
#properties ⇒ Array<Property>
Returns the value of the
propertiesattribute. -
#properties=(list) ⇒ Object
Sets the value of the
propertiesattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute. -
#reported_configurations ⇒ Array<ReportedConfiguration>
Returns the value of the
reported_configurationsattribute. -
#reported_configurations=(list) ⇒ Object
Sets the value of the
reported_configurationsattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ NetworkAttachment
Creates a new instance of the OvirtSDK4::NetworkAttachment class.
10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 |
# File 'lib/ovirtsdk4/types.rb', line 10398 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.
10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 10425 |
# File 'lib/ovirtsdk4/types.rb', line 10414 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.
10076 10077 10078 |
# File 'lib/ovirtsdk4/types.rb', line 10076 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
10085 10086 10087 |
# File 'lib/ovirtsdk4/types.rb', line 10085 def comment=(value) @comment = value end |
#description ⇒ String
Returns the value of the description attribute.
10094 10095 10096 |
# File 'lib/ovirtsdk4/types.rb', line 10094 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
10103 10104 10105 |
# File 'lib/ovirtsdk4/types.rb', line 10103 def description=(value) @description = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration attribute.
10112 10113 10114 |
# File 'lib/ovirtsdk4/types.rb', line 10112 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.
10125 10126 10127 10128 10129 10130 |
# File 'lib/ovirtsdk4/types.rb', line 10125 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.
10430 10431 10432 10433 10434 10435 10436 10437 10438 10439 10440 10441 |
# File 'lib/ovirtsdk4/types.rb', line 10430 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.
10137 10138 10139 |
# File 'lib/ovirtsdk4/types.rb', line 10137 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.
10150 10151 10152 10153 10154 10155 |
# File 'lib/ovirtsdk4/types.rb', line 10150 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.
10162 10163 10164 |
# File 'lib/ovirtsdk4/types.rb', line 10162 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.
10175 10176 10177 10178 10179 10180 |
# File 'lib/ovirtsdk4/types.rb', line 10175 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.
10187 10188 10189 |
# File 'lib/ovirtsdk4/types.rb', line 10187 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
10196 10197 10198 |
# File 'lib/ovirtsdk4/types.rb', line 10196 def id=(value) @id = value end |
#in_sync ⇒ Boolean
Returns the value of the in_sync attribute.
10205 10206 10207 |
# File 'lib/ovirtsdk4/types.rb', line 10205 def in_sync @in_sync end |
#in_sync=(value) ⇒ Object
Sets the value of the in_sync attribute.
10214 10215 10216 |
# File 'lib/ovirtsdk4/types.rb', line 10214 def in_sync=(value) @in_sync = value end |
#ip_address_assignments ⇒ Array<IpAddressAssignment>
Returns the value of the ip_address_assignments attribute.
10223 10224 10225 |
# File 'lib/ovirtsdk4/types.rb', line 10223 def ip_address_assignments @ip_address_assignments end |
#ip_address_assignments=(list) ⇒ Object
Sets the value of the ip_address_assignments attribute.
10232 10233 10234 10235 10236 10237 10238 10239 10240 10241 10242 |
# File 'lib/ovirtsdk4/types.rb', line 10232 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.
10249 10250 10251 |
# File 'lib/ovirtsdk4/types.rb', line 10249 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
10258 10259 10260 |
# File 'lib/ovirtsdk4/types.rb', line 10258 def name=(value) @name = value end |
#network ⇒ Network
Returns the value of the network attribute.
10267 10268 10269 |
# File 'lib/ovirtsdk4/types.rb', line 10267 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.
10280 10281 10282 10283 10284 10285 |
# File 'lib/ovirtsdk4/types.rb', line 10280 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.
10292 10293 10294 |
# File 'lib/ovirtsdk4/types.rb', line 10292 def properties @properties end |
#properties=(list) ⇒ Object
Sets the value of the properties attribute.
10301 10302 10303 10304 10305 10306 10307 10308 10309 10310 10311 |
# File 'lib/ovirtsdk4/types.rb', line 10301 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.
10318 10319 10320 |
# File 'lib/ovirtsdk4/types.rb', line 10318 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.
10331 10332 10333 10334 10335 10336 |
# File 'lib/ovirtsdk4/types.rb', line 10331 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.
10343 10344 10345 |
# File 'lib/ovirtsdk4/types.rb', line 10343 def reported_configurations @reported_configurations end |
#reported_configurations=(list) ⇒ Object
Sets the value of the reported_configurations attribute.
10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 |
# File 'lib/ovirtsdk4/types.rb', line 10352 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 |