Class: OvirtSDK4::HostNic

Inherits:
Identified show all
Defined in:
lib/ovirtsdk4/types.rb,
lib/ovirtsdk4/types.rb

Instance Method Summary collapse

Methods included from Type

#dig, #href, #href=

Constructor Details

#initialize(opts = {}) ⇒ HostNic

Creates a new instance of the OvirtSDK4::HostNic class.

Parameters:

  • opts (Hash) (defaults to: {})

    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.

Options Hash (opts):

  • :ad_aggregator_id (Integer)

    The value of attribute ad_aggregator_id.

  • :base_interface (String)

    The value of attribute base_interface.

  • :bonding (Bonding, Hash)

    The value of attribute bonding.

  • :boot_protocol (BootProtocol)

    The value of attribute boot_protocol.

  • :bridged (Boolean)

    The value of attribute bridged.

  • :check_connectivity (Boolean)

    The value of attribute check_connectivity.

  • :comment (String)

    The value of attribute comment.

  • :custom_configuration (Boolean)

    The value of attribute custom_configuration.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :id (String)

    The value of attribute id.

  • :ip (Ip, Hash)

    The value of attribute ip.

  • :ipv6 (Ip, Hash)

    The value of attribute ipv6.

  • :ipv6_boot_protocol (BootProtocol)

    The value of attribute ipv6_boot_protocol.

  • :mac (Mac, Hash)

    The value of attribute mac.

  • :mtu (Integer)

    The value of attribute mtu.

  • :name (String)

    The value of attribute name.

  • :network (Network, Hash)

    The value of attribute network.

  • :network_labels (Array<NetworkLabel>, Array<Hash>)

    The values of attribute network_labels.

  • :override_configuration (Boolean)

    The value of attribute override_configuration.

  • :physical_function (HostNic, Hash)

    The value of attribute physical_function.

  • :properties (Array<Property>, Array<Hash>)

    The values of attribute properties.

  • :qos (Qos, Hash)

    The value of attribute qos.

  • :speed (Integer)

    The value of attribute speed.

  • :statistics (Array<Statistic>, Array<Hash>)

    The values of attribute statistics.

  • :status (NicStatus)

    The value of attribute status.

  • :virtual_functions_configuration (HostNicVirtualFunctionsConfiguration, Hash)

    The value of attribute virtual_functions_configuration.

  • :vlan (Vlan, Hash)

    The value of attribute vlan.


45084
45085
45086
45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
# File 'lib/ovirtsdk4/types.rb', line 45084

def initialize(opts = {})
  super(opts)
  self.ad_aggregator_id = opts[:ad_aggregator_id]
  self.base_interface = opts[:base_interface]
  self.bonding = opts[:bonding]
  self.boot_protocol = opts[:boot_protocol]
  self.bridged = opts[:bridged]
  self.check_connectivity = opts[:check_connectivity]
  self.custom_configuration = opts[:custom_configuration]
  self.host = opts[:host]
  self.ip = opts[:ip]
  self.ipv6 = opts[:ipv6]
  self.ipv6_boot_protocol = opts[:ipv6_boot_protocol]
  self.mac = opts[:mac]
  self.mtu = opts[:mtu]
  self.network = opts[:network]
  self.network_labels = opts[:network_labels]
  self.override_configuration = opts[:override_configuration]
  self.physical_function = opts[:physical_function]
  self.properties = opts[:properties]
  self.qos = opts[:qos]
  self.speed = opts[:speed]
  self.statistics = opts[:statistics]
  self.status = opts[:status]
  self.virtual_functions_configuration = opts[:virtual_functions_configuration]
  self.vlan = opts[:vlan]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.


45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
# File 'lib/ovirtsdk4/types.rb', line 45115

def ==(other)
  super &&
  @ad_aggregator_id == other.ad_aggregator_id &&
  @base_interface == other.base_interface &&
  @bonding == other.bonding &&
  @boot_protocol == other.boot_protocol &&
  @bridged == other.bridged &&
  @check_connectivity == other.check_connectivity &&
  @custom_configuration == other.custom_configuration &&
  @host == other.host &&
  @ip == other.ip &&
  @ipv6 == other.ipv6 &&
  @ipv6_boot_protocol == other.ipv6_boot_protocol &&
  @mac == other.mac &&
  @mtu == other.mtu &&
  @network == other.network &&
  @network_labels == other.network_labels &&
  @override_configuration == other.override_configuration &&
  @physical_function == other.physical_function &&
  @properties == other.properties &&
  @qos == other.qos &&
  @speed == other.speed &&
  @statistics == other.statistics &&
  @status == other.status &&
  @virtual_functions_configuration == other.virtual_functions_configuration &&
  @vlan == other.vlan
end

#ad_aggregator_idInteger

Returns the value of the ad_aggregator_id attribute.

Returns:

  • (Integer)

44427
44428
44429
# File 'lib/ovirtsdk4/types.rb', line 44427

def ad_aggregator_id
  @ad_aggregator_id
end

#ad_aggregator_id=(value) ⇒ Object

Sets the value of the ad_aggregator_id attribute.

Parameters:

  • value (Integer)

44436
44437
44438
# File 'lib/ovirtsdk4/types.rb', line 44436

def ad_aggregator_id=(value)
  @ad_aggregator_id = value
end

#base_interfaceString

Returns the value of the base_interface attribute.

Returns:

  • (String)

44445
44446
44447
# File 'lib/ovirtsdk4/types.rb', line 44445

def base_interface
  @base_interface
end

#base_interface=(value) ⇒ Object

Sets the value of the base_interface attribute.

Parameters:

  • value (String)

44454
44455
44456
# File 'lib/ovirtsdk4/types.rb', line 44454

def base_interface=(value)
  @base_interface = value
end

#bondingBonding

Returns the value of the bonding attribute.

Returns:


44463
44464
44465
# File 'lib/ovirtsdk4/types.rb', line 44463

def bonding
  @bonding
end

#bonding=(value) ⇒ Object

Sets the value of the bonding attribute.

The value parameter can be an instance of Bonding 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.

Parameters:


44476
44477
44478
44479
44480
44481
# File 'lib/ovirtsdk4/types.rb', line 44476

def bonding=(value)
  if value.is_a?(Hash)
    value = Bonding.new(value)
  end
  @bonding = value
end

#boot_protocolBootProtocol

Returns the value of the boot_protocol attribute.

Returns:


44488
44489
44490
# File 'lib/ovirtsdk4/types.rb', line 44488

def boot_protocol
  @boot_protocol
end

#boot_protocol=(value) ⇒ Object

Sets the value of the boot_protocol attribute.

Parameters:


44497
44498
44499
# File 'lib/ovirtsdk4/types.rb', line 44497

def boot_protocol=(value)
  @boot_protocol = value
end

#bridgedBoolean

Returns the value of the bridged attribute.

Returns:

  • (Boolean)

44506
44507
44508
# File 'lib/ovirtsdk4/types.rb', line 44506

def bridged
  @bridged
end

#bridged=(value) ⇒ Object

Sets the value of the bridged attribute.

Parameters:

  • value (Boolean)

44515
44516
44517
# File 'lib/ovirtsdk4/types.rb', line 44515

def bridged=(value)
  @bridged = value
end

#check_connectivityBoolean

Returns the value of the check_connectivity attribute.

Returns:

  • (Boolean)

44524
44525
44526
# File 'lib/ovirtsdk4/types.rb', line 44524

def check_connectivity
  @check_connectivity
end

#check_connectivity=(value) ⇒ Object

Sets the value of the check_connectivity attribute.

Parameters:

  • value (Boolean)

44533
44534
44535
# File 'lib/ovirtsdk4/types.rb', line 44533

def check_connectivity=(value)
  @check_connectivity = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

44542
44543
44544
# File 'lib/ovirtsdk4/types.rb', line 44542

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

44551
44552
44553
# File 'lib/ovirtsdk4/types.rb', line 44551

def comment=(value)
  @comment = value
end

#custom_configurationBoolean

Returns the value of the custom_configuration attribute.

Returns:

  • (Boolean)

44560
44561
44562
# File 'lib/ovirtsdk4/types.rb', line 44560

def custom_configuration
  @custom_configuration
end

#custom_configuration=(value) ⇒ Object

Sets the value of the custom_configuration attribute.

Parameters:

  • value (Boolean)

44569
44570
44571
# File 'lib/ovirtsdk4/types.rb', line 44569

def custom_configuration=(value)
  @custom_configuration = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

44578
44579
44580
# File 'lib/ovirtsdk4/types.rb', line 44578

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

44587
44588
44589
# File 'lib/ovirtsdk4/types.rb', line 44587

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.


45146
45147
45148
45149
45150
45151
45152
45153
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163
45164
45165
45166
45167
45168
45169
45170
45171
45172
# File 'lib/ovirtsdk4/types.rb', line 45146

def hash
  super +
  @ad_aggregator_id.hash +
  @base_interface.hash +
  @bonding.hash +
  @boot_protocol.hash +
  @bridged.hash +
  @check_connectivity.hash +
  @custom_configuration.hash +
  @host.hash +
  @ip.hash +
  @ipv6.hash +
  @ipv6_boot_protocol.hash +
  @mac.hash +
  @mtu.hash +
  @network.hash +
  @network_labels.hash +
  @override_configuration.hash +
  @physical_function.hash +
  @properties.hash +
  @qos.hash +
  @speed.hash +
  @statistics.hash +
  @status.hash +
  @virtual_functions_configuration.hash +
  @vlan.hash
end

#hostHost

Returns the value of the host attribute.

Returns:


44596
44597
44598
# File 'lib/ovirtsdk4/types.rb', line 44596

def host
  @host
end

#host=(value) ⇒ Object

Sets the value of the host attribute.

The value parameter can be an instance of OvirtSDK4::Host 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.

Parameters:

  • value (Host, Hash)

44609
44610
44611
44612
44613
44614
# File 'lib/ovirtsdk4/types.rb', line 44609

def host=(value)
  if value.is_a?(Hash)
    value = Host.new(value)
  end
  @host = value
end

#idString

Returns the value of the id attribute.

Returns:

  • (String)

44621
44622
44623
# File 'lib/ovirtsdk4/types.rb', line 44621

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

44630
44631
44632
# File 'lib/ovirtsdk4/types.rb', line 44630

def id=(value)
  @id = value
end

#ipIp

Returns the value of the ip attribute.

Returns:


44639
44640
44641
# File 'lib/ovirtsdk4/types.rb', line 44639

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.

Parameters:

  • value (Ip, Hash)

44652
44653
44654
44655
44656
44657
# File 'lib/ovirtsdk4/types.rb', line 44652

def ip=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ip = value
end

#ipv6Ip

Returns the value of the ipv6 attribute.

Returns:


44664
44665
44666
# File 'lib/ovirtsdk4/types.rb', line 44664

def ipv6
  @ipv6
end

#ipv6=(value) ⇒ Object

Sets the value of the ipv6 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.

Parameters:

  • value (Ip, Hash)

44677
44678
44679
44680
44681
44682
# File 'lib/ovirtsdk4/types.rb', line 44677

def ipv6=(value)
  if value.is_a?(Hash)
    value = Ip.new(value)
  end
  @ipv6 = value
end

#ipv6_boot_protocolBootProtocol

Returns the value of the ipv6_boot_protocol attribute.

Returns:


44689
44690
44691
# File 'lib/ovirtsdk4/types.rb', line 44689

def ipv6_boot_protocol
  @ipv6_boot_protocol
end

#ipv6_boot_protocol=(value) ⇒ Object

Sets the value of the ipv6_boot_protocol attribute.

Parameters:


44698
44699
44700
# File 'lib/ovirtsdk4/types.rb', line 44698

def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end

#macMac

Returns the value of the mac attribute.

Returns:


44707
44708
44709
# File 'lib/ovirtsdk4/types.rb', line 44707

def mac
  @mac
end

#mac=(value) ⇒ Object

Sets the value of the mac attribute.

The value parameter can be an instance of Mac 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.

Parameters:

  • value (Mac, Hash)

44720
44721
44722
44723
44724
44725
# File 'lib/ovirtsdk4/types.rb', line 44720

def mac=(value)
  if value.is_a?(Hash)
    value = Mac.new(value)
  end
  @mac = value
end

#mtuInteger

Returns the value of the mtu attribute.

Returns:

  • (Integer)

44732
44733
44734
# File 'lib/ovirtsdk4/types.rb', line 44732

def mtu
  @mtu
end

#mtu=(value) ⇒ Object

Sets the value of the mtu attribute.

Parameters:

  • value (Integer)

44741
44742
44743
# File 'lib/ovirtsdk4/types.rb', line 44741

def mtu=(value)
  @mtu = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

44750
44751
44752
# File 'lib/ovirtsdk4/types.rb', line 44750

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

44759
44760
44761
# File 'lib/ovirtsdk4/types.rb', line 44759

def name=(value)
  @name = value
end

#networkNetwork

Returns the value of the network attribute.

Returns:


44768
44769
44770
# File 'lib/ovirtsdk4/types.rb', line 44768

def network
  @network
end

#network=(value) ⇒ Object

Sets the value of the network attribute.

The value parameter can be an instance of 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.

Parameters:


44781
44782
44783
44784
44785
44786
# File 'lib/ovirtsdk4/types.rb', line 44781

def network=(value)
  if value.is_a?(Hash)
    value = Network.new(value)
  end
  @network = value
end

#network_labelsArray<NetworkLabel>

Returns the value of the network_labels attribute.

Returns:


44793
44794
44795
# File 'lib/ovirtsdk4/types.rb', line 44793

def network_labels
  @network_labels
end

#network_labels=(list) ⇒ Object

Sets the value of the network_labels attribute.

Parameters:


44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
# File 'lib/ovirtsdk4/types.rb', line 44802

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

#override_configurationBoolean

Returns the value of the override_configuration attribute.

Returns:

  • (Boolean)

44819
44820
44821
# File 'lib/ovirtsdk4/types.rb', line 44819

def override_configuration
  @override_configuration
end

#override_configuration=(value) ⇒ Object

Sets the value of the override_configuration attribute.

Parameters:

  • value (Boolean)

44828
44829
44830
# File 'lib/ovirtsdk4/types.rb', line 44828

def override_configuration=(value)
  @override_configuration = value
end

#physical_functionHostNic

Returns the value of the physical_function attribute.

Returns:


44837
44838
44839
# File 'lib/ovirtsdk4/types.rb', line 44837

def physical_function
  @physical_function
end

#physical_function=(value) ⇒ Object

Sets the value of the physical_function attribute.

The value parameter can be an instance of OvirtSDK4::HostNic 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.

Parameters:


44850
44851
44852
44853
44854
44855
# File 'lib/ovirtsdk4/types.rb', line 44850

def physical_function=(value)
  if value.is_a?(Hash)
    value = HostNic.new(value)
  end
  @physical_function = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


44862
44863
44864
# File 'lib/ovirtsdk4/types.rb', line 44862

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


44871
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
# File 'lib/ovirtsdk4/types.rb', line 44871

def properties=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Property.new(value)
      end
    end
  end
  @properties = list
end

#qosQos

Returns the value of the qos attribute.

Returns:


44888
44889
44890
# File 'lib/ovirtsdk4/types.rb', line 44888

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.

Parameters:

  • value (Qos, Hash)

44901
44902
44903
44904
44905
44906
# File 'lib/ovirtsdk4/types.rb', line 44901

def qos=(value)
  if value.is_a?(Hash)
    value = Qos.new(value)
  end
  @qos = value
end

#speedInteger

Returns the value of the speed attribute.

Returns:

  • (Integer)

44913
44914
44915
# File 'lib/ovirtsdk4/types.rb', line 44913

def speed
  @speed
end

#speed=(value) ⇒ Object

Sets the value of the speed attribute.

Parameters:

  • value (Integer)

44922
44923
44924
# File 'lib/ovirtsdk4/types.rb', line 44922

def speed=(value)
  @speed = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:


44931
44932
44933
# File 'lib/ovirtsdk4/types.rb', line 44931

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:


44940
44941
44942
44943
44944
44945
44946
44947
44948
44949
44950
# File 'lib/ovirtsdk4/types.rb', line 44940

def statistics=(list)
  if list.class == Array
    list = List.new(list)
    list.each_with_index do |value, index|
      if value.is_a?(Hash)
        list[index] = Statistic.new(value)
      end
    end
  end
  @statistics = list
end

#statusNicStatus

Returns the value of the status attribute.

Returns:


44957
44958
44959
# File 'lib/ovirtsdk4/types.rb', line 44957

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:


44966
44967
44968
# File 'lib/ovirtsdk4/types.rb', line 44966

def status=(value)
  @status = value
end

#virtual_functions_configurationHostNicVirtualFunctionsConfiguration

Returns the value of the virtual_functions_configuration attribute.


44975
44976
44977
# File 'lib/ovirtsdk4/types.rb', line 44975

def virtual_functions_configuration
  @virtual_functions_configuration
end

#virtual_functions_configuration=(value) ⇒ Object

Sets the value of the virtual_functions_configuration attribute.

The value parameter can be an instance of OvirtSDK4::HostNicVirtualFunctionsConfiguration 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.

Parameters:


44988
44989
44990
44991
44992
44993
# File 'lib/ovirtsdk4/types.rb', line 44988

def virtual_functions_configuration=(value)
  if value.is_a?(Hash)
    value = HostNicVirtualFunctionsConfiguration.new(value)
  end
  @virtual_functions_configuration = value
end

#vlanVlan

Returns the value of the vlan attribute.

Returns:


45000
45001
45002
# File 'lib/ovirtsdk4/types.rb', line 45000

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.

Parameters:

  • value (Vlan, Hash)

45013
45014
45015
45016
45017
45018
# File 'lib/ovirtsdk4/types.rb', line 45013

def vlan=(value)
  if value.is_a?(Hash)
    value = Vlan.new(value)
  end
  @vlan = value
end