class OvirtSDK4::Network
Public Class Methods
Creates a new instance of the {Network} class.
@param opts [Hash] A hash containing the attributes of the object. The keys of the hash
should be symbols corresponding to the names of the attributes. The values of the hash should be the values of the attributes.
@option opts [Cluster, Hash] :cluster The value of attribute `cluster`.
@option opts [String] :comment The value of attribute `comment`.
@option opts [DataCenter, Hash] :data_center The value of attribute `data_center`.
@option opts [String] :description The value of attribute `description`.
@option opts [Boolean] :display The value of attribute `display`.
@option opts [String] :id The value of attribute `id`.
@option opts [Ip, Hash] :ip The value of attribute `ip`.
@option opts [Integer] :mtu The value of attribute `mtu`.
@option opts [String] :name The value of attribute `name`.
@option opts [Array<NetworkLabel>, Array<Hash>] :network_labels The values of attribute `network_labels`.
@option opts [Array<Permission>, Array<Hash>] :permissions The values of attribute `permissions`.
@option opts [Boolean] :profile_required The value of attribute `profile_required`.
@option opts [Qos, Hash] :qos The value of attribute `qos`.
@option opts [Boolean] :required The value of attribute `required`.
@option opts [NetworkStatus] :status The value of attribute `status`.
@option opts [Boolean] :stp The value of attribute `stp`.
@option opts [Array<NetworkUsage>, Array<Hash>] :usages The values of attribute `usages`.
@option opts [Vlan, Hash] :vlan The value of attribute `vlan`.
@option opts [Array<VnicProfile>, Array<Hash>] :vnic_profiles The values of attribute `vnic_profiles`.
# File lib/ovirtsdk4/types.rb, line 7848 def initialize(opts = {}) super(opts) self.cluster = opts[:cluster] self.comment = opts[:comment] self.data_center = opts[:data_center] self.description = opts[:description] self.display = opts[:display] self.id = opts[:id] self.ip = opts[:ip] self.mtu = opts[:mtu] self.name = opts[:name] self.network_labels = opts[:network_labels] self.permissions = 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
Public Instance Methods
Returns the value of the `cluster` attribute.
@return [Cluster]
# File lib/ovirtsdk4/types.rb, line 7410 def cluster return @cluster end
Sets the value of the `cluster` attribute.
@param value [Cluster, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 7423 def cluster=(value) if value.is_a?(Hash) value = Cluster.new(value) end @cluster = value end
Returns the value of the `comment` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 7435 def comment return @comment end
Sets the value of the `comment` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 7444 def comment=(value) @comment = value end
Returns the value of the `data_center` attribute.
@return [DataCenter]
# File lib/ovirtsdk4/types.rb, line 7453 def data_center return @data_center end
Sets the value of the `data_center` attribute.
@param value [DataCenter, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 7466 def data_center=(value) if value.is_a?(Hash) value = DataCenter.new(value) end @data_center = value end
Returns the value of the `description` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 7478 def description return @description end
Sets the value of the `description` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 7487 def description=(value) @description = value end
Returns the value of the `display` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 7496 def display return @display end
Sets the value of the `display` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 7505 def display=(value) @display = value end
Returns the value of the `id` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 7514 def id return @id end
Sets the value of the `id` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 7523 def id=(value) @id = value end
Returns the value of the `ip` attribute.
@return [Ip]
# File lib/ovirtsdk4/types.rb, line 7532 def ip return @ip end
Sets the value of the `ip` attribute.
@param value [Ip, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 7545 def ip=(value) if value.is_a?(Hash) value = Ip.new(value) end @ip = value end
Returns the value of the `mtu` attribute.
@return [Integer]
# File lib/ovirtsdk4/types.rb, line 7557 def mtu return @mtu end
Sets the value of the `mtu` attribute.
@param value [Integer]
# File lib/ovirtsdk4/types.rb, line 7566 def mtu=(value) @mtu = value end
Returns the value of the `name` attribute.
@return [String]
# File lib/ovirtsdk4/types.rb, line 7575 def name return @name end
Sets the value of the `name` attribute.
@param value [String]
# File lib/ovirtsdk4/types.rb, line 7584 def name=(value) @name = value end
Returns the value of the `network_labels` attribute.
@return [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 7593 def network_labels return @network_labels end
Sets the value of the `network_labels` attribute.
@param list [Array<NetworkLabel>]
# File lib/ovirtsdk4/types.rb, line 7601 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
Returns the value of the `permissions` attribute.
@return [Array<Permission>]
# File lib/ovirtsdk4/types.rb, line 7618 def permissions return @permissions end
Sets the value of the `permissions` attribute.
@param list [Array<Permission>]
# File lib/ovirtsdk4/types.rb, line 7626 def permissions=(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
Returns the value of the `profile_required` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 7643 def profile_required return @profile_required end
Sets the value of the `profile_required` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 7652 def profile_required=(value) @profile_required = value end
Returns the value of the `qos` attribute.
@return [Qos]
# File lib/ovirtsdk4/types.rb, line 7661 def qos return @qos end
Sets the value of the `qos` attribute.
@param value [Qos, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 7674 def qos=(value) if value.is_a?(Hash) value = Qos.new(value) end @qos = value end
Returns the value of the `required` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 7686 def required return @required end
Sets the value of the `required` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 7695 def required=(value) @required = value end
Returns the value of the `status` attribute.
@return [NetworkStatus]
# File lib/ovirtsdk4/types.rb, line 7704 def status return @status end
Sets the value of the `status` attribute.
@param value [NetworkStatus]
# File lib/ovirtsdk4/types.rb, line 7713 def status=(value) @status = value end
Returns the value of the `stp` attribute.
@return [Boolean]
# File lib/ovirtsdk4/types.rb, line 7722 def stp return @stp end
Sets the value of the `stp` attribute.
@param value [Boolean]
# File lib/ovirtsdk4/types.rb, line 7731 def stp=(value) @stp = value end
Returns the value of the `usages` attribute.
@return [Array<NetworkUsage>]
# File lib/ovirtsdk4/types.rb, line 7740 def usages return @usages end
Sets the value of the `usages` attribute.
@param list [Array<NetworkUsage>]
# File lib/ovirtsdk4/types.rb, line 7748 def usages=(list) @usages = list end
Returns the value of the `vlan` attribute.
@return [Vlan]
# File lib/ovirtsdk4/types.rb, line 7757 def vlan return @vlan end
Sets the value of the `vlan` attribute.
@param value [Vlan, Hash]
The `value` parameter can be an instance of {OvirtSDK4::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.
# File lib/ovirtsdk4/types.rb, line 7770 def vlan=(value) if value.is_a?(Hash) value = Vlan.new(value) end @vlan = value end
Returns the value of the `vnic_profiles` attribute.
@return [Array<VnicProfile>]
# File lib/ovirtsdk4/types.rb, line 7782 def vnic_profiles return @vnic_profiles end
Sets the value of the `vnic_profiles` attribute.
@param list [Array<VnicProfile>]
# File lib/ovirtsdk4/types.rb, line 7790 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