Class: OvirtSDK4::Network
- Inherits:
-
Identified
- Object
- Struct
- Identified
- OvirtSDK4::Network
- 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. -
#cluster ⇒ Cluster
Returns the value of the
cluster
attribute. -
#cluster=(value) ⇒ Object
Sets the value of the
cluster
attribute. -
#comment ⇒ String
Returns the value of the
comment
attribute. -
#comment=(value) ⇒ Object
Sets the value of the
comment
attribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_center
attribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_center
attribute. -
#description ⇒ String
Returns the value of the
description
attribute. -
#description=(value) ⇒ Object
Sets the value of the
description
attribute. -
#display ⇒ Boolean
Returns the value of the
display
attribute. -
#display=(value) ⇒ Object
Sets the value of the
display
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. -
#external_provider ⇒ OpenStackNetworkProvider
Returns the value of the
external_provider
attribute. -
#external_provider=(value) ⇒ Object
Sets the value of the
external_provider
attribute. -
#external_provider_physical_network ⇒ Network
Returns the value of the
external_provider_physical_network
attribute. -
#external_provider_physical_network=(value) ⇒ Object
Sets the value of the
external_provider_physical_network
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 = {}) ⇒ Network
constructor
Creates a new instance of the Network class.
-
#ip ⇒ Ip
Returns the value of the
ip
attribute. -
#ip=(value) ⇒ Object
Sets the value of the
ip
attribute. -
#mtu ⇒ Integer
Returns the value of the
mtu
attribute. -
#mtu=(value) ⇒ Object
Sets the value of the
mtu
attribute. -
#name ⇒ String
Returns the value of the
name
attribute. -
#name=(value) ⇒ Object
Sets the value of the
name
attribute. -
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labels
attribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labels
attribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissions
attribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissions
attribute. -
#port_isolation ⇒ Boolean
Returns the value of the
port_isolation
attribute. -
#port_isolation=(value) ⇒ Object
Sets the value of the
port_isolation
attribute. -
#profile_required ⇒ Boolean
Returns the value of the
profile_required
attribute. -
#profile_required=(value) ⇒ Object
Sets the value of the
profile_required
attribute. -
#qos ⇒ Qos
Returns the value of the
qos
attribute. -
#qos=(value) ⇒ Object
Sets the value of the
qos
attribute. -
#required ⇒ Boolean
Returns the value of the
required
attribute. -
#required=(value) ⇒ Object
Sets the value of the
required
attribute. -
#status ⇒ NetworkStatus
Returns the value of the
status
attribute. -
#status=(value) ⇒ Object
Sets the value of the
status
attribute. -
#stp ⇒ Boolean
Returns the value of the
stp
attribute. -
#stp=(value) ⇒ Object
Sets the value of the
stp
attribute. -
#usages ⇒ Array<NetworkUsage>
Returns the value of the
usages
attribute. -
#usages=(list) ⇒ Object
Sets the value of the
usages
attribute. -
#vdsm_name ⇒ String
Returns the value of the
vdsm_name
attribute. -
#vdsm_name=(value) ⇒ Object
Sets the value of the
vdsm_name
attribute. -
#vlan ⇒ Vlan
Returns the value of the
vlan
attribute. -
#vlan=(value) ⇒ Object
Sets the value of the
vlan
attribute. -
#vnic_profiles ⇒ Array<VnicProfile>
Returns the value of the
vnic_profiles
attribute. -
#vnic_profiles=(list) ⇒ Object
Sets the value of the
vnic_profiles
attribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Network
Creates a new instance of the OvirtSDK4::Network class.
10798 10799 10800 10801 10802 10803 10804 10805 10806 10807 10808 10809 10810 10811 10812 10813 10814 10815 10816 10817 10818 10819 10820 |
# File 'lib/ovirtsdk4/types.rb', line 10798 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self.data_center = opts[:data_center] self.display = opts[:display] self.dns_resolver_configuration = opts[:dns_resolver_configuration] self.external_provider = opts[:external_provider] self.external_provider_physical_network = opts[:external_provider_physical_network] self.ip = opts[:ip] self.mtu = opts[:mtu] self.network_labels = opts[:network_labels] self. = opts[:permissions] self.port_isolation = opts[:port_isolation] self.profile_required = opts[:profile_required] self.qos = opts[:qos] self.required = opts[:required] self.status = opts[:status] self.stp = opts[:stp] self.usages = opts[:usages] self.vdsm_name = opts[:vdsm_name] self.vlan = opts[:vlan] self.vnic_profiles = opts[:vnic_profiles] end |
Instance Method Details
#==(other) ⇒ Object
Returns true
if self
and other
have the same attributes and values.
10825 10826 10827 10828 10829 10830 10831 10832 10833 10834 10835 10836 10837 10838 10839 10840 10841 10842 10843 10844 10845 10846 10847 |
# File 'lib/ovirtsdk4/types.rb', line 10825 def ==(other) super && @cluster == other.cluster && @data_center == other.data_center && @display == other.display && @dns_resolver_configuration == other.dns_resolver_configuration && @external_provider == other.external_provider && @external_provider_physical_network == other.external_provider_physical_network && @ip == other.ip && @mtu == other.mtu && @network_labels == other.network_labels && @permissions == other. && @port_isolation == other.port_isolation && @profile_required == other.profile_required && @qos == other.qos && @required == other.required && @status == other.status && @stp == other.stp && @usages == other.usages && @vdsm_name == other.vdsm_name && @vlan == other.vlan && @vnic_profiles == other.vnic_profiles end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
10235 10236 10237 |
# File 'lib/ovirtsdk4/types.rb', line 10235 def cluster @cluster end |
#cluster=(value) ⇒ Object
Sets the value of the cluster
attribute.
The value
parameter can be an instance of Cluster 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.
10248 10249 10250 10251 10252 10253 |
# File 'lib/ovirtsdk4/types.rb', line 10248 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end |
#comment ⇒ String
Returns the value of the comment
attribute.
10260 10261 10262 |
# File 'lib/ovirtsdk4/types.rb', line 10260 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
10269 10270 10271 |
# File 'lib/ovirtsdk4/types.rb', line 10269 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
10278 10279 10280 |
# File 'lib/ovirtsdk4/types.rb', line 10278 def data_center @data_center end |
#data_center=(value) ⇒ Object
Sets the value of the data_center
attribute.
The value
parameter can be an instance of DataCenter 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.
10291 10292 10293 10294 10295 10296 |
# File 'lib/ovirtsdk4/types.rb', line 10291 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end |
#description ⇒ String
Returns the value of the description
attribute.
10303 10304 10305 |
# File 'lib/ovirtsdk4/types.rb', line 10303 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
10312 10313 10314 |
# File 'lib/ovirtsdk4/types.rb', line 10312 def description=(value) @description = value end |
#display ⇒ Boolean
Returns the value of the display
attribute.
10321 10322 10323 |
# File 'lib/ovirtsdk4/types.rb', line 10321 def display @display end |
#display=(value) ⇒ Object
Sets the value of the display
attribute.
10330 10331 10332 |
# File 'lib/ovirtsdk4/types.rb', line 10330 def display=(value) @display = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration
attribute.
10339 10340 10341 |
# File 'lib/ovirtsdk4/types.rb', line 10339 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.
10352 10353 10354 10355 10356 10357 |
# File 'lib/ovirtsdk4/types.rb', line 10352 def dns_resolver_configuration=(value) if value.is_a?(Hash) value = DnsResolverConfiguration.new(value) end @dns_resolver_configuration = value end |
#external_provider ⇒ OpenStackNetworkProvider
Returns the value of the external_provider
attribute.
10364 10365 10366 |
# File 'lib/ovirtsdk4/types.rb', line 10364 def external_provider @external_provider end |
#external_provider=(value) ⇒ Object
Sets the value of the external_provider
attribute.
The value
parameter can be an instance of OpenStackNetworkProvider 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.
10377 10378 10379 10380 10381 10382 |
# File 'lib/ovirtsdk4/types.rb', line 10377 def external_provider=(value) if value.is_a?(Hash) value = OpenStackNetworkProvider.new(value) end @external_provider = value end |
#external_provider_physical_network ⇒ Network
Returns the value of the external_provider_physical_network
attribute.
10389 10390 10391 |
# File 'lib/ovirtsdk4/types.rb', line 10389 def external_provider_physical_network @external_provider_physical_network end |
#external_provider_physical_network=(value) ⇒ Object
Sets the value of the external_provider_physical_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.
10402 10403 10404 10405 10406 10407 |
# File 'lib/ovirtsdk4/types.rb', line 10402 def external_provider_physical_network=(value) if value.is_a?(Hash) value = Network.new(value) end @external_provider_physical_network = value end |
#hash ⇒ Object
Generates a hash value for this object.
10852 10853 10854 10855 10856 10857 10858 10859 10860 10861 10862 10863 10864 10865 10866 10867 10868 10869 10870 10871 10872 10873 10874 |
# File 'lib/ovirtsdk4/types.rb', line 10852 def hash super + @cluster.hash + @data_center.hash + @display.hash + @dns_resolver_configuration.hash + @external_provider.hash + @external_provider_physical_network.hash + @ip.hash + @mtu.hash + @network_labels.hash + @permissions.hash + @port_isolation.hash + @profile_required.hash + @qos.hash + @required.hash + @status.hash + @stp.hash + @usages.hash + @vdsm_name.hash + @vlan.hash + @vnic_profiles.hash end |
#id ⇒ String
Returns the value of the id
attribute.
10414 10415 10416 |
# File 'lib/ovirtsdk4/types.rb', line 10414 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
10423 10424 10425 |
# File 'lib/ovirtsdk4/types.rb', line 10423 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
10432 10433 10434 |
# File 'lib/ovirtsdk4/types.rb', line 10432 def ip @ip end |
#ip=(value) ⇒ Object
Sets the value of the ip
attribute.
The value
parameter can be an instance of Ip 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.
10445 10446 10447 10448 10449 10450 |
# File 'lib/ovirtsdk4/types.rb', line 10445 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end |
#mtu ⇒ Integer
Returns the value of the mtu
attribute.
10457 10458 10459 |
# File 'lib/ovirtsdk4/types.rb', line 10457 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu
attribute.
10466 10467 10468 |
# File 'lib/ovirtsdk4/types.rb', line 10466 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name
attribute.
10475 10476 10477 |
# File 'lib/ovirtsdk4/types.rb', line 10475 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
10484 10485 10486 |
# File 'lib/ovirtsdk4/types.rb', line 10484 def name=(value) @name = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels
attribute.
10493 10494 10495 |
# File 'lib/ovirtsdk4/types.rb', line 10493 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 |
# File 'lib/ovirtsdk4/types.rb', line 10502 def network_labels=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = NetworkLabel.new(value) end end end @network_labels = list end |
#permissions ⇒ Array<Permission>
Returns the value of the permissions
attribute.
10519 10520 10521 |
# File 'lib/ovirtsdk4/types.rb', line 10519 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 |
# File 'lib/ovirtsdk4/types.rb', line 10528 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 |
#port_isolation ⇒ Boolean
Returns the value of the port_isolation
attribute.
10545 10546 10547 |
# File 'lib/ovirtsdk4/types.rb', line 10545 def port_isolation @port_isolation end |
#port_isolation=(value) ⇒ Object
Sets the value of the port_isolation
attribute.
10554 10555 10556 |
# File 'lib/ovirtsdk4/types.rb', line 10554 def port_isolation=(value) @port_isolation = value end |
#profile_required ⇒ Boolean
Returns the value of the profile_required
attribute.
10563 10564 10565 |
# File 'lib/ovirtsdk4/types.rb', line 10563 def profile_required @profile_required end |
#profile_required=(value) ⇒ Object
Sets the value of the profile_required
attribute.
10572 10573 10574 |
# File 'lib/ovirtsdk4/types.rb', line 10572 def profile_required=(value) @profile_required = value end |
#qos ⇒ Qos
Returns the value of the qos
attribute.
10581 10582 10583 |
# File 'lib/ovirtsdk4/types.rb', line 10581 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.
10594 10595 10596 10597 10598 10599 |
# File 'lib/ovirtsdk4/types.rb', line 10594 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end |
#required ⇒ Boolean
Returns the value of the required
attribute.
10606 10607 10608 |
# File 'lib/ovirtsdk4/types.rb', line 10606 def required @required end |
#required=(value) ⇒ Object
Sets the value of the required
attribute.
10615 10616 10617 |
# File 'lib/ovirtsdk4/types.rb', line 10615 def required=(value) @required = value end |
#status ⇒ NetworkStatus
Returns the value of the status
attribute.
10624 10625 10626 |
# File 'lib/ovirtsdk4/types.rb', line 10624 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
10633 10634 10635 |
# File 'lib/ovirtsdk4/types.rb', line 10633 def status=(value) @status = value end |
#stp ⇒ Boolean
Returns the value of the stp
attribute.
10642 10643 10644 |
# File 'lib/ovirtsdk4/types.rb', line 10642 def stp @stp end |
#stp=(value) ⇒ Object
Sets the value of the stp
attribute.
10651 10652 10653 |
# File 'lib/ovirtsdk4/types.rb', line 10651 def stp=(value) @stp = value end |
#usages ⇒ Array<NetworkUsage>
Returns the value of the usages
attribute.
10660 10661 10662 |
# File 'lib/ovirtsdk4/types.rb', line 10660 def usages @usages end |
#usages=(list) ⇒ Object
Sets the value of the usages
attribute.
10669 10670 10671 |
# File 'lib/ovirtsdk4/types.rb', line 10669 def usages=(list) @usages = list end |
#vdsm_name ⇒ String
Returns the value of the vdsm_name
attribute.
10678 10679 10680 |
# File 'lib/ovirtsdk4/types.rb', line 10678 def vdsm_name @vdsm_name end |
#vdsm_name=(value) ⇒ Object
Sets the value of the vdsm_name
attribute.
10687 10688 10689 |
# File 'lib/ovirtsdk4/types.rb', line 10687 def vdsm_name=(value) @vdsm_name = value end |
#vlan ⇒ Vlan
Returns the value of the vlan
attribute.
10696 10697 10698 |
# File 'lib/ovirtsdk4/types.rb', line 10696 def vlan @vlan end |
#vlan=(value) ⇒ Object
Sets the value of the vlan
attribute.
The value
parameter can be an instance of Vlan 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.
10709 10710 10711 10712 10713 10714 |
# File 'lib/ovirtsdk4/types.rb', line 10709 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end |
#vnic_profiles ⇒ Array<VnicProfile>
Returns the value of the vnic_profiles
attribute.
10721 10722 10723 |
# File 'lib/ovirtsdk4/types.rb', line 10721 def vnic_profiles @vnic_profiles end |
#vnic_profiles=(list) ⇒ Object
Sets the value of the vnic_profiles
attribute.
10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 |
# File 'lib/ovirtsdk4/types.rb', line 10730 def vnic_profiles=(list) if list.class == Array list = List.new(list) list.each_with_index do |value, index| if value.is_a?(Hash) list[index] = VnicProfile.new(value) end end end @vnic_profiles = list end |