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. -
#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. -
#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.
9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 |
# File 'lib/ovirtsdk4/types.rb', line 9995 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.
10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 |
# File 'lib/ovirtsdk4/types.rb', line 10020 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. && @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.
9472 9473 9474 |
# File 'lib/ovirtsdk4/types.rb', line 9472 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.
9485 9486 9487 9488 9489 9490 |
# File 'lib/ovirtsdk4/types.rb', line 9485 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.
9497 9498 9499 |
# File 'lib/ovirtsdk4/types.rb', line 9497 def comment @comment end |
#comment=(value) ⇒ Object
Sets the value of the comment attribute.
9506 9507 9508 |
# File 'lib/ovirtsdk4/types.rb', line 9506 def comment=(value) @comment = value end |
#data_center ⇒ DataCenter
Returns the value of the data_center attribute.
9515 9516 9517 |
# File 'lib/ovirtsdk4/types.rb', line 9515 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.
9528 9529 9530 9531 9532 9533 |
# File 'lib/ovirtsdk4/types.rb', line 9528 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.
9540 9541 9542 |
# File 'lib/ovirtsdk4/types.rb', line 9540 def description @description end |
#description=(value) ⇒ Object
Sets the value of the description attribute.
9549 9550 9551 |
# File 'lib/ovirtsdk4/types.rb', line 9549 def description=(value) @description = value end |
#display ⇒ Boolean
Returns the value of the display attribute.
9558 9559 9560 |
# File 'lib/ovirtsdk4/types.rb', line 9558 def display @display end |
#display=(value) ⇒ Object
Sets the value of the display attribute.
9567 9568 9569 |
# File 'lib/ovirtsdk4/types.rb', line 9567 def display=(value) @display = value end |
#dns_resolver_configuration ⇒ DnsResolverConfiguration
Returns the value of the dns_resolver_configuration attribute.
9576 9577 9578 |
# File 'lib/ovirtsdk4/types.rb', line 9576 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.
9589 9590 9591 9592 9593 9594 |
# File 'lib/ovirtsdk4/types.rb', line 9589 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.
9601 9602 9603 |
# File 'lib/ovirtsdk4/types.rb', line 9601 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.
9614 9615 9616 9617 9618 9619 |
# File 'lib/ovirtsdk4/types.rb', line 9614 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.
9626 9627 9628 |
# File 'lib/ovirtsdk4/types.rb', line 9626 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.
9639 9640 9641 9642 9643 9644 |
# File 'lib/ovirtsdk4/types.rb', line 9639 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.
10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 |
# File 'lib/ovirtsdk4/types.rb', line 10045 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 + @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.
9651 9652 9653 |
# File 'lib/ovirtsdk4/types.rb', line 9651 def id @id end |
#id=(value) ⇒ Object
Sets the value of the id attribute.
9660 9661 9662 |
# File 'lib/ovirtsdk4/types.rb', line 9660 def id=(value) @id = value end |
#ip ⇒ Ip
Returns the value of the ip attribute.
9669 9670 9671 |
# File 'lib/ovirtsdk4/types.rb', line 9669 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.
9682 9683 9684 9685 9686 9687 |
# File 'lib/ovirtsdk4/types.rb', line 9682 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.
9694 9695 9696 |
# File 'lib/ovirtsdk4/types.rb', line 9694 def mtu @mtu end |
#mtu=(value) ⇒ Object
Sets the value of the mtu attribute.
9703 9704 9705 |
# File 'lib/ovirtsdk4/types.rb', line 9703 def mtu=(value) @mtu = value end |
#name ⇒ String
Returns the value of the name attribute.
9712 9713 9714 |
# File 'lib/ovirtsdk4/types.rb', line 9712 def name @name end |
#name=(value) ⇒ Object
Sets the value of the name attribute.
9721 9722 9723 |
# File 'lib/ovirtsdk4/types.rb', line 9721 def name=(value) @name = value end |
#network_labels ⇒ Array<NetworkLabel>
Returns the value of the network_labels attribute.
9730 9731 9732 |
# File 'lib/ovirtsdk4/types.rb', line 9730 def network_labels @network_labels end |
#network_labels=(list) ⇒ Object
Sets the value of the network_labels attribute.
9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 9749 |
# File 'lib/ovirtsdk4/types.rb', line 9739 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.
9756 9757 9758 |
# File 'lib/ovirtsdk4/types.rb', line 9756 def end |
#permissions=(list) ⇒ Object
Sets the value of the permissions attribute.
9765 9766 9767 9768 9769 9770 9771 9772 9773 9774 9775 |
# File 'lib/ovirtsdk4/types.rb', line 9765 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 |
#profile_required ⇒ Boolean
Returns the value of the profile_required attribute.
9782 9783 9784 |
# File 'lib/ovirtsdk4/types.rb', line 9782 def profile_required @profile_required end |
#profile_required=(value) ⇒ Object
Sets the value of the profile_required attribute.
9791 9792 9793 |
# File 'lib/ovirtsdk4/types.rb', line 9791 def profile_required=(value) @profile_required = value end |
#qos ⇒ Qos
Returns the value of the qos attribute.
9800 9801 9802 |
# File 'lib/ovirtsdk4/types.rb', line 9800 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.
9813 9814 9815 9816 9817 9818 |
# File 'lib/ovirtsdk4/types.rb', line 9813 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.
9825 9826 9827 |
# File 'lib/ovirtsdk4/types.rb', line 9825 def required @required end |
#required=(value) ⇒ Object
Sets the value of the required attribute.
9834 9835 9836 |
# File 'lib/ovirtsdk4/types.rb', line 9834 def required=(value) @required = value end |
#status ⇒ NetworkStatus
Returns the value of the status attribute.
9843 9844 9845 |
# File 'lib/ovirtsdk4/types.rb', line 9843 def status @status end |
#status=(value) ⇒ Object
Sets the value of the status attribute.
9852 9853 9854 |
# File 'lib/ovirtsdk4/types.rb', line 9852 def status=(value) @status = value end |
#stp ⇒ Boolean
Returns the value of the stp attribute.
9861 9862 9863 |
# File 'lib/ovirtsdk4/types.rb', line 9861 def stp @stp end |
#stp=(value) ⇒ Object
Sets the value of the stp attribute.
9870 9871 9872 |
# File 'lib/ovirtsdk4/types.rb', line 9870 def stp=(value) @stp = value end |
#usages ⇒ Array<NetworkUsage>
Returns the value of the usages attribute.
9879 9880 9881 |
# File 'lib/ovirtsdk4/types.rb', line 9879 def usages @usages end |
#usages=(list) ⇒ Object
Sets the value of the usages attribute.
9888 9889 9890 |
# File 'lib/ovirtsdk4/types.rb', line 9888 def usages=(list) @usages = list end |
#vlan ⇒ Vlan
Returns the value of the vlan attribute.
9897 9898 9899 |
# File 'lib/ovirtsdk4/types.rb', line 9897 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.
9910 9911 9912 9913 9914 9915 |
# File 'lib/ovirtsdk4/types.rb', line 9910 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.
9922 9923 9924 |
# File 'lib/ovirtsdk4/types.rb', line 9922 def vnic_profiles @vnic_profiles end |
#vnic_profiles=(list) ⇒ Object
Sets the value of the vnic_profiles attribute.
9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 |
# File 'lib/ovirtsdk4/types.rb', line 9931 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 |