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. -
#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. -
#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.
10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 |
# File 'lib/ovirtsdk4/types.rb', line 10018 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.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.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.
10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 |
# File 'lib/ovirtsdk4/types.rb', line 10043 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. && @profile_required == other.profile_required && @qos == other.qos && @required == other.required && @status == other.status && @stp == other.stp && @usages == other.usages && @vlan == other.vlan && @vnic_profiles == other.vnic_profiles end |
#cluster ⇒ Cluster
Returns the value of the cluster
attribute.
9495 9496 9497 |
# File 'lib/ovirtsdk4/types.rb', line 9495 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.
9508 9509 9510 9511 9512 9513 |
# File 'lib/ovirtsdk4/types.rb', line 9508 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.
9520 9521 9522 |
# File 'lib/ovirtsdk4/types.rb', line 9520 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment
attribute.
9529 9530 9531 |
# File 'lib/ovirtsdk4/types.rb', line 9529 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center
attribute.
9538 9539 9540 |
# File 'lib/ovirtsdk4/types.rb', line 9538 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.
9551 9552 9553 9554 9555 9556 |
# File 'lib/ovirtsdk4/types.rb', line 9551 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.
9563 9564 9565 |
# File 'lib/ovirtsdk4/types.rb', line 9563 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description
attribute.
9572 9573 9574 |
# File 'lib/ovirtsdk4/types.rb', line 9572 def description=(value) @description = value end |
#display ⇒ Boolean
Returns the value of the display
attribute.
9581 9582 9583 |
# File 'lib/ovirtsdk4/types.rb', line 9581 def display @display end |
#display=(value) ⇒ Object
Sets the value of the display
attribute.
9590 9591 9592 |
# File 'lib/ovirtsdk4/types.rb', line 9590 def display=(value) @display = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration
attribute.
9599 9600 9601 |
# File 'lib/ovirtsdk4/types.rb', line 9599 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.
9612 9613 9614 9615 9616 9617 |
# File 'lib/ovirtsdk4/types.rb', line 9612 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.
9624 9625 9626 |
# File 'lib/ovirtsdk4/types.rb', line 9624 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.
9637 9638 9639 9640 9641 9642 |
# File 'lib/ovirtsdk4/types.rb', line 9637 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.
9649 9650 9651 |
# File 'lib/ovirtsdk4/types.rb', line 9649 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.
9662 9663 9664 9665 9666 9667 |
# File 'lib/ovirtsdk4/types.rb', line 9662 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.
10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 |
# File 'lib/ovirtsdk4/types.rb', line 10068 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 + @profile_required.hash + @qos.hash + @required.hash + @status.hash + @stp.hash + @usages.hash + @vlan.hash + @vnic_profiles.hash end |
#id ⇒ String
Returns the value of the id
attribute.
9674 9675 9676 |
# File 'lib/ovirtsdk4/types.rb', line 9674 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id
attribute.
9683 9684 9685 |
# File 'lib/ovirtsdk4/types.rb', line 9683 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip
attribute.
9692 9693 9694 |
# File 'lib/ovirtsdk4/types.rb', line 9692 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.
9705 9706 9707 9708 9709 9710 |
# File 'lib/ovirtsdk4/types.rb', line 9705 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.
9717 9718 9719 |
# File 'lib/ovirtsdk4/types.rb', line 9717 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu
attribute.
9726 9727 9728 |
# File 'lib/ovirtsdk4/types.rb', line 9726 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name
attribute.
9735 9736 9737 |
# File 'lib/ovirtsdk4/types.rb', line 9735 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name
attribute.
9744 9745 9746 |
# File 'lib/ovirtsdk4/types.rb', line 9744 def name=(value) @name = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels
attribute.
9753 9754 9755 |
# File 'lib/ovirtsdk4/types.rb', line 9753 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels
attribute.
9762 9763 9764 9765 9766 9767 9768 9769 9770 9771 9772 |
# File 'lib/ovirtsdk4/types.rb', line 9762 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.
9779 9780 9781 |
# File 'lib/ovirtsdk4/types.rb', line 9779 def @permissions end |
#permissions=(list) ⇒ Object
Sets the value of the permissions
attribute.
9788 9789 9790 9791 9792 9793 9794 9795 9796 9797 9798 |
# File 'lib/ovirtsdk4/types.rb', line 9788 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 |
#profile_required ⇒ Boolean
Returns the value of the profile_required
attribute.
9805 9806 9807 |
# File 'lib/ovirtsdk4/types.rb', line 9805 def profile_required @profile_required end |
#profile_required=(value) ⇒ Object
Sets the value of the profile_required
attribute.
9814 9815 9816 |
# File 'lib/ovirtsdk4/types.rb', line 9814 def profile_required=(value) @profile_required = value end |
#qos ⇒ Qos
Returns the value of the qos
attribute.
9823 9824 9825 |
# File 'lib/ovirtsdk4/types.rb', line 9823 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.
9836 9837 9838 9839 9840 9841 |
# File 'lib/ovirtsdk4/types.rb', line 9836 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.
9848 9849 9850 |
# File 'lib/ovirtsdk4/types.rb', line 9848 def required @required end |
#required=(value) ⇒ Object
Sets the value of the required
attribute.
9857 9858 9859 |
# File 'lib/ovirtsdk4/types.rb', line 9857 def required=(value) @required = value end |
#status ⇒ NetworkStatus
Returns the value of the status
attribute.
9866 9867 9868 |
# File 'lib/ovirtsdk4/types.rb', line 9866 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status
attribute.
9875 9876 9877 |
# File 'lib/ovirtsdk4/types.rb', line 9875 def status=(value) @status = value end |
#stp ⇒ Boolean
Returns the value of the stp
attribute.
9884 9885 9886 |
# File 'lib/ovirtsdk4/types.rb', line 9884 def stp @stp end |
#stp=(value) ⇒ Object
Sets the value of the stp
attribute.
9893 9894 9895 |
# File 'lib/ovirtsdk4/types.rb', line 9893 def stp=(value) @stp = value end |
#usages ⇒ Array<NetworkUsage>
Returns the value of the usages
attribute.
9902 9903 9904 |
# File 'lib/ovirtsdk4/types.rb', line 9902 def usages @usages end |
#usages=(list) ⇒ Object
Sets the value of the usages
attribute.
9911 9912 9913 |
# File 'lib/ovirtsdk4/types.rb', line 9911 def usages=(list) @usages = list end |
#vlan ⇒ Vlan
Returns the value of the vlan
attribute.
9920 9921 9922 |
# File 'lib/ovirtsdk4/types.rb', line 9920 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.
9933 9934 9935 9936 9937 9938 |
# File 'lib/ovirtsdk4/types.rb', line 9933 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.
9945 9946 9947 |
# File 'lib/ovirtsdk4/types.rb', line 9945 def vnic_profiles @vnic_profiles end |
#vnic_profiles=(list) ⇒ Object
Sets the value of the vnic_profiles
attribute.
9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 |
# File 'lib/ovirtsdk4/types.rb', line 9954 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 |