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.
10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 |
# File 'lib/ovirtsdk4/types.rb', line 10348 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.
10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 |
# File 'lib/ovirtsdk4/types.rb', line 10375 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.
9785 9786 9787 |
# File 'lib/ovirtsdk4/types.rb', line 9785 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.
9798 9799 9800 9801 9802 9803 |
# File 'lib/ovirtsdk4/types.rb', line 9798 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.
9810 9811 9812 |
# File 'lib/ovirtsdk4/types.rb', line 9810 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
9819 9820 9821 |
# File 'lib/ovirtsdk4/types.rb', line 9819 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
9828 9829 9830 |
# File 'lib/ovirtsdk4/types.rb', line 9828 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.
9841 9842 9843 9844 9845 9846 |
# File 'lib/ovirtsdk4/types.rb', line 9841 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.
9853 9854 9855 |
# File 'lib/ovirtsdk4/types.rb', line 9853 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
9862 9863 9864 |
# File 'lib/ovirtsdk4/types.rb', line 9862 def description=(value) @description = value end |
#display ⇒ Boolean
Returns the value of the display attribute.
9871 9872 9873 |
# File 'lib/ovirtsdk4/types.rb', line 9871 def display @display end |
#display=(value) ⇒ Object
Sets the value of the display attribute.
9880 9881 9882 |
# File 'lib/ovirtsdk4/types.rb', line 9880 def display=(value) @display = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration attribute.
9889 9890 9891 |
# File 'lib/ovirtsdk4/types.rb', line 9889 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.
9902 9903 9904 9905 9906 9907 |
# File 'lib/ovirtsdk4/types.rb', line 9902 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.
9914 9915 9916 |
# File 'lib/ovirtsdk4/types.rb', line 9914 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.
9927 9928 9929 9930 9931 9932 |
# File 'lib/ovirtsdk4/types.rb', line 9927 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.
9939 9940 9941 |
# File 'lib/ovirtsdk4/types.rb', line 9939 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.
9952 9953 9954 9955 9956 9957 |
# File 'lib/ovirtsdk4/types.rb', line 9952 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.
10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 |
# File 'lib/ovirtsdk4/types.rb', line 10402 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.
9964 9965 9966 |
# File 'lib/ovirtsdk4/types.rb', line 9964 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
9973 9974 9975 |
# File 'lib/ovirtsdk4/types.rb', line 9973 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip attribute.
9982 9983 9984 |
# File 'lib/ovirtsdk4/types.rb', line 9982 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.
9995 9996 9997 9998 9999 10000 |
# File 'lib/ovirtsdk4/types.rb', line 9995 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.
10007 10008 10009 |
# File 'lib/ovirtsdk4/types.rb', line 10007 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu attribute.
10016 10017 10018 |
# File 'lib/ovirtsdk4/types.rb', line 10016 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name attribute.
10025 10026 10027 |
# File 'lib/ovirtsdk4/types.rb', line 10025 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
10034 10035 10036 |
# File 'lib/ovirtsdk4/types.rb', line 10034 def name=(value) @name = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels attribute.
10043 10044 10045 |
# File 'lib/ovirtsdk4/types.rb', line 10043 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 |
# File 'lib/ovirtsdk4/types.rb', line 10052 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.
10069 10070 10071 |
# File 'lib/ovirtsdk4/types.rb', line 10069 def end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 |
# File 'lib/ovirtsdk4/types.rb', line 10078 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.
10095 10096 10097 |
# File 'lib/ovirtsdk4/types.rb', line 10095 def port_isolation @port_isolation end |
#port_isolation=(value) ⇒ Object
Sets the value of the port_isolation attribute.
10104 10105 10106 |
# File 'lib/ovirtsdk4/types.rb', line 10104 def port_isolation=(value) @port_isolation = value end |
#profile_required ⇒ Boolean
Returns the value of the profile_required attribute.
10113 10114 10115 |
# File 'lib/ovirtsdk4/types.rb', line 10113 def profile_required @profile_required end |
#profile_required=(value) ⇒ Object
Sets the value of the profile_required attribute.
10122 10123 10124 |
# File 'lib/ovirtsdk4/types.rb', line 10122 def profile_required=(value) @profile_required = value end |
#qos ⇒ Qos
Returns the value of the qos attribute.
10131 10132 10133 |
# File 'lib/ovirtsdk4/types.rb', line 10131 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.
10144 10145 10146 10147 10148 10149 |
# File 'lib/ovirtsdk4/types.rb', line 10144 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.
10156 10157 10158 |
# File 'lib/ovirtsdk4/types.rb', line 10156 def required @required end |
#required=(value) ⇒ Object
Sets the value of the required attribute.
10165 10166 10167 |
# File 'lib/ovirtsdk4/types.rb', line 10165 def required=(value) @required = value end |
#status ⇒ NetworkStatus
Returns the value of the status attribute.
10174 10175 10176 |
# File 'lib/ovirtsdk4/types.rb', line 10174 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
10183 10184 10185 |
# File 'lib/ovirtsdk4/types.rb', line 10183 def status=(value) @status = value end |
#stp ⇒ Boolean
Returns the value of the stp attribute.
10192 10193 10194 |
# File 'lib/ovirtsdk4/types.rb', line 10192 def stp @stp end |
#stp=(value) ⇒ Object
Sets the value of the stp attribute.
10201 10202 10203 |
# File 'lib/ovirtsdk4/types.rb', line 10201 def stp=(value) @stp = value end |
#usages ⇒ Array<NetworkUsage>
Returns the value of the usages attribute.
10210 10211 10212 |
# File 'lib/ovirtsdk4/types.rb', line 10210 def usages @usages end |
#usages=(list) ⇒ Object
Sets the value of the usages attribute.
10219 10220 10221 |
# File 'lib/ovirtsdk4/types.rb', line 10219 def usages=(list) @usages = list end |
#vdsm_name ⇒ String
Returns the value of the vdsm_name attribute.
10228 10229 10230 |
# File 'lib/ovirtsdk4/types.rb', line 10228 def vdsm_name @vdsm_name end |
#vdsm_name=(value) ⇒ Object
Sets the value of the vdsm_name attribute.
10237 10238 10239 |
# File 'lib/ovirtsdk4/types.rb', line 10237 def vdsm_name=(value) @vdsm_name = value end |
#vlan ⇒ Vlan
Returns the value of the vlan attribute.
10246 10247 10248 |
# File 'lib/ovirtsdk4/types.rb', line 10246 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.
10259 10260 10261 10262 10263 10264 |
# File 'lib/ovirtsdk4/types.rb', line 10259 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.
10271 10272 10273 |
# File 'lib/ovirtsdk4/types.rb', line 10271 def vnic_profiles @vnic_profiles end |
#vnic_profiles=(list) ⇒ Object
Sets the value of the vnic_profiles attribute.
10280 10281 10282 10283 10284 10285 10286 10287 10288 10289 10290 |
# File 'lib/ovirtsdk4/types.rb', line 10280 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 |