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
trueifselfandotherhave the same attributes and values. -
#cluster ⇒ Cluster
Returns the value of the
clusterattribute. -
#cluster=(value) ⇒ Object
Sets the value of the
clusterattribute. -
#comment ⇒ String
Returns the value of the
commentattribute. -
#comment=(value) ⇒ Object
Sets the value of the
commentattribute. -
#data_center ⇒ DataCenter
Returns the value of the
data_centerattribute. -
#data_center=(value) ⇒ Object
Sets the value of the
data_centerattribute. -
#description ⇒ String
Returns the value of the
descriptionattribute. -
#description=(value) ⇒ Object
Sets the value of the
descriptionattribute. -
#display ⇒ Boolean
Returns the value of the
displayattribute. -
#display=(value) ⇒ Object
Sets the value of the
displayattribute. -
#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. -
#external_provider ⇒ OpenStackNetworkProvider
Returns the value of the
external_providerattribute. -
#external_provider=(value) ⇒ Object
Sets the value of the
external_providerattribute. -
#external_provider_physical_network ⇒ Network
Returns the value of the
external_provider_physical_networkattribute. -
#external_provider_physical_network=(value) ⇒ Object
Sets the value of the
external_provider_physical_networkattribute. -
#hash ⇒ Object
Generates a hash value for this object.
-
#id ⇒ String
Returns the value of the
idattribute. -
#id=(value) ⇒ Object
Sets the value of the
idattribute. -
#initialize(opts = {}) ⇒ Network
constructor
Creates a new instance of the Network class.
-
#ip ⇒ Ip
Returns the value of the
ipattribute. -
#ip=(value) ⇒ Object
Sets the value of the
ipattribute. -
#mtu ⇒ Integer
Returns the value of the
mtuattribute. -
#mtu=(value) ⇒ Object
Sets the value of the
mtuattribute. -
#name ⇒ String
Returns the value of the
nameattribute. -
#name=(value) ⇒ Object
Sets the value of the
nameattribute. -
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the
network_labelsattribute. -
#network_labels=(list) ⇒ Object
Sets the value of the
network_labelsattribute. -
#permissions ⇒ Array<Permission>
Returns the value of the
permissionsattribute. -
#permissions=(list) ⇒ Object
Sets the value of the
permissionsattribute. -
#port_isolation ⇒ Boolean
Returns the value of the
port_isolationattribute. -
#port_isolation=(value) ⇒ Object
Sets the value of the
port_isolationattribute. -
#profile_required ⇒ Boolean
Returns the value of the
profile_requiredattribute. -
#profile_required=(value) ⇒ Object
Sets the value of the
profile_requiredattribute. -
#qos ⇒ Qos
Returns the value of the
qosattribute. -
#qos=(value) ⇒ Object
Sets the value of the
qosattribute. -
#required ⇒ Boolean
Returns the value of the
requiredattribute. -
#required=(value) ⇒ Object
Sets the value of the
requiredattribute. -
#status ⇒ NetworkStatus
Returns the value of the
statusattribute. -
#status=(value) ⇒ Object
Sets the value of the
statusattribute. -
#stp ⇒ Boolean
Returns the value of the
stpattribute. -
#stp=(value) ⇒ Object
Sets the value of the
stpattribute. -
#usages ⇒ Array<NetworkUsage>
Returns the value of the
usagesattribute. -
#usages=(list) ⇒ Object
Sets the value of the
usagesattribute. -
#vdsm_name ⇒ String
Returns the value of the
vdsm_nameattribute. -
#vdsm_name=(value) ⇒ Object
Sets the value of the
vdsm_nameattribute. -
#vlan ⇒ Vlan
Returns the value of the
vlanattribute. -
#vlan=(value) ⇒ Object
Sets the value of the
vlanattribute. -
#vnic_profiles ⇒ Array<VnicProfile>
Returns the value of the
vnic_profilesattribute. -
#vnic_profiles=(list) ⇒ Object
Sets the value of the
vnic_profilesattribute.
Methods included from Type
Constructor Details
#initialize(opts = {}) ⇒ Network
Creates a new instance of the OvirtSDK4::Network class.
11045 11046 11047 11048 11049 11050 11051 11052 11053 11054 11055 11056 11057 11058 11059 11060 11061 11062 11063 11064 11065 11066 11067 |
# File 'lib/ovirtsdk4/types.rb', line 11045 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.
11072 11073 11074 11075 11076 11077 11078 11079 11080 11081 11082 11083 11084 11085 11086 11087 11088 11089 11090 11091 11092 11093 11094 |
# File 'lib/ovirtsdk4/types.rb', line 11072 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 && == 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.
10482 10483 10484 |
# File 'lib/ovirtsdk4/types.rb', line 10482 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.
10495 10496 10497 10498 10499 10500 |
# File 'lib/ovirtsdk4/types.rb', line 10495 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.
10507 10508 10509 |
# File 'lib/ovirtsdk4/types.rb', line 10507 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
10516 10517 10518 |
# File 'lib/ovirtsdk4/types.rb', line 10516 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
10525 10526 10527 |
# File 'lib/ovirtsdk4/types.rb', line 10525 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.
10538 10539 10540 10541 10542 10543 |
# File 'lib/ovirtsdk4/types.rb', line 10538 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.
10550 10551 10552 |
# File 'lib/ovirtsdk4/types.rb', line 10550 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
10559 10560 10561 |
# File 'lib/ovirtsdk4/types.rb', line 10559 def description=(value) @description = value end |
#display ⇒ Boolean
Returns the value of the display attribute.
10568 10569 10570 |
# File 'lib/ovirtsdk4/types.rb', line 10568 def display @display end |
#display=(value) ⇒ Object
Sets the value of the display attribute.
10577 10578 10579 |
# File 'lib/ovirtsdk4/types.rb', line 10577 def display=(value) @display = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration attribute.
10586 10587 10588 |
# File 'lib/ovirtsdk4/types.rb', line 10586 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.
10599 10600 10601 10602 10603 10604 |
# File 'lib/ovirtsdk4/types.rb', line 10599 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.
10611 10612 10613 |
# File 'lib/ovirtsdk4/types.rb', line 10611 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.
10624 10625 10626 10627 10628 10629 |
# File 'lib/ovirtsdk4/types.rb', line 10624 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.
10636 10637 10638 |
# File 'lib/ovirtsdk4/types.rb', line 10636 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.
10649 10650 10651 10652 10653 10654 |
# File 'lib/ovirtsdk4/types.rb', line 10649 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.
11099 11100 11101 11102 11103 11104 11105 11106 11107 11108 11109 11110 11111 11112 11113 11114 11115 11116 11117 11118 11119 11120 11121 |
# File 'lib/ovirtsdk4/types.rb', line 11099 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 + .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.
10661 10662 10663 |
# File 'lib/ovirtsdk4/types.rb', line 10661 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
10670 10671 10672 |
# File 'lib/ovirtsdk4/types.rb', line 10670 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip attribute.
10679 10680 10681 |
# File 'lib/ovirtsdk4/types.rb', line 10679 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.
10692 10693 10694 10695 10696 10697 |
# File 'lib/ovirtsdk4/types.rb', line 10692 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.
10704 10705 10706 |
# File 'lib/ovirtsdk4/types.rb', line 10704 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu attribute.
10713 10714 10715 |
# File 'lib/ovirtsdk4/types.rb', line 10713 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name attribute.
10722 10723 10724 |
# File 'lib/ovirtsdk4/types.rb', line 10722 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
10731 10732 10733 |
# File 'lib/ovirtsdk4/types.rb', line 10731 def name=(value) @name = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels attribute.
10740 10741 10742 |
# File 'lib/ovirtsdk4/types.rb', line 10740 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
10749 10750 10751 10752 10753 10754 10755 10756 10757 10758 10759 |
# File 'lib/ovirtsdk4/types.rb', line 10749 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.
10766 10767 10768 |
# File 'lib/ovirtsdk4/types.rb', line 10766 def end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 |
# File 'lib/ovirtsdk4/types.rb', line 10775 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 = list end |
#port_isolation ⇒ Boolean
Returns the value of the port_isolation attribute.
10792 10793 10794 |
# File 'lib/ovirtsdk4/types.rb', line 10792 def port_isolation @port_isolation end |
#port_isolation=(value) ⇒ Object
Sets the value of the port_isolation attribute.
10801 10802 10803 |
# File 'lib/ovirtsdk4/types.rb', line 10801 def port_isolation=(value) @port_isolation = value end |
#profile_required ⇒ Boolean
Returns the value of the profile_required attribute.
10810 10811 10812 |
# File 'lib/ovirtsdk4/types.rb', line 10810 def profile_required @profile_required end |
#profile_required=(value) ⇒ Object
Sets the value of the profile_required attribute.
10819 10820 10821 |
# File 'lib/ovirtsdk4/types.rb', line 10819 def profile_required=(value) @profile_required = value end |
#qos ⇒ Qos
Returns the value of the qos attribute.
10828 10829 10830 |
# File 'lib/ovirtsdk4/types.rb', line 10828 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.
10841 10842 10843 10844 10845 10846 |
# File 'lib/ovirtsdk4/types.rb', line 10841 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.
10853 10854 10855 |
# File 'lib/ovirtsdk4/types.rb', line 10853 def required @required end |
#required=(value) ⇒ Object
Sets the value of the required attribute.
10862 10863 10864 |
# File 'lib/ovirtsdk4/types.rb', line 10862 def required=(value) @required = value end |
#status ⇒ NetworkStatus
Returns the value of the status attribute.
10871 10872 10873 |
# File 'lib/ovirtsdk4/types.rb', line 10871 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
10880 10881 10882 |
# File 'lib/ovirtsdk4/types.rb', line 10880 def status=(value) @status = value end |
#stp ⇒ Boolean
Returns the value of the stp attribute.
10889 10890 10891 |
# File 'lib/ovirtsdk4/types.rb', line 10889 def stp @stp end |
#stp=(value) ⇒ Object
Sets the value of the stp attribute.
10898 10899 10900 |
# File 'lib/ovirtsdk4/types.rb', line 10898 def stp=(value) @stp = value end |
#usages ⇒ Array<NetworkUsage>
Returns the value of the usages attribute.
10907 10908 10909 |
# File 'lib/ovirtsdk4/types.rb', line 10907 def usages @usages end |
#usages=(list) ⇒ Object
Sets the value of the usages attribute.
10916 10917 10918 |
# File 'lib/ovirtsdk4/types.rb', line 10916 def usages=(list) @usages = list end |
#vdsm_name ⇒ String
Returns the value of the vdsm_name attribute.
10925 10926 10927 |
# File 'lib/ovirtsdk4/types.rb', line 10925 def vdsm_name @vdsm_name end |
#vdsm_name=(value) ⇒ Object
Sets the value of the vdsm_name attribute.
10934 10935 10936 |
# File 'lib/ovirtsdk4/types.rb', line 10934 def vdsm_name=(value) @vdsm_name = value end |
#vlan ⇒ Vlan
Returns the value of the vlan attribute.
10943 10944 10945 |
# File 'lib/ovirtsdk4/types.rb', line 10943 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.
10956 10957 10958 10959 10960 10961 |
# File 'lib/ovirtsdk4/types.rb', line 10956 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.
10968 10969 10970 |
# File 'lib/ovirtsdk4/types.rb', line 10968 def vnic_profiles @vnic_profiles end |
#vnic_profiles=(list) ⇒ Object
Sets the value of the vnic_profiles attribute.
10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 |
# File 'lib/ovirtsdk4/types.rb', line 10977 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 |