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.



43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
# File 'lib/ovirtsdk4/types.rb', line 43391

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.



43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
# File 'lib/ovirtsdk4/types.rb', line 43422

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)


42734
42735
42736
# File 'lib/ovirtsdk4/types.rb', line 42734

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)


42743
42744
42745
# File 'lib/ovirtsdk4/types.rb', line 42743

def ad_aggregator_id=(value)
  @ad_aggregator_id = value
end

#base_interfaceString

Returns the value of the base_interface attribute.

Returns:

  • (String)


42752
42753
42754
# File 'lib/ovirtsdk4/types.rb', line 42752

def base_interface
  @base_interface
end

#base_interface=(value) ⇒ Object

Sets the value of the base_interface attribute.

Parameters:

  • value (String)


42761
42762
42763
# File 'lib/ovirtsdk4/types.rb', line 42761

def base_interface=(value)
  @base_interface = value
end

#bondingBonding

Returns the value of the bonding attribute.

Returns:



42770
42771
42772
# File 'lib/ovirtsdk4/types.rb', line 42770

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:



42783
42784
42785
42786
42787
42788
# File 'lib/ovirtsdk4/types.rb', line 42783

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:



42795
42796
42797
# File 'lib/ovirtsdk4/types.rb', line 42795

def boot_protocol
  @boot_protocol
end

#boot_protocol=(value) ⇒ Object

Sets the value of the boot_protocol attribute.

Parameters:



42804
42805
42806
# File 'lib/ovirtsdk4/types.rb', line 42804

def boot_protocol=(value)
  @boot_protocol = value
end

#bridgedBoolean

Returns the value of the bridged attribute.

Returns:

  • (Boolean)


42813
42814
42815
# File 'lib/ovirtsdk4/types.rb', line 42813

def bridged
  @bridged
end

#bridged=(value) ⇒ Object

Sets the value of the bridged attribute.

Parameters:

  • value (Boolean)


42822
42823
42824
# File 'lib/ovirtsdk4/types.rb', line 42822

def bridged=(value)
  @bridged = value
end

#check_connectivityBoolean

Returns the value of the check_connectivity attribute.

Returns:

  • (Boolean)


42831
42832
42833
# File 'lib/ovirtsdk4/types.rb', line 42831

def check_connectivity
  @check_connectivity
end

#check_connectivity=(value) ⇒ Object

Sets the value of the check_connectivity attribute.

Parameters:

  • value (Boolean)


42840
42841
42842
# File 'lib/ovirtsdk4/types.rb', line 42840

def check_connectivity=(value)
  @check_connectivity = value
end

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)


42849
42850
42851
# File 'lib/ovirtsdk4/types.rb', line 42849

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


42858
42859
42860
# File 'lib/ovirtsdk4/types.rb', line 42858

def comment=(value)
  @comment = value
end

#custom_configurationBoolean

Returns the value of the custom_configuration attribute.

Returns:

  • (Boolean)


42867
42868
42869
# File 'lib/ovirtsdk4/types.rb', line 42867

def custom_configuration
  @custom_configuration
end

#custom_configuration=(value) ⇒ Object

Sets the value of the custom_configuration attribute.

Parameters:

  • value (Boolean)


42876
42877
42878
# File 'lib/ovirtsdk4/types.rb', line 42876

def custom_configuration=(value)
  @custom_configuration = value
end

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)


42885
42886
42887
# File 'lib/ovirtsdk4/types.rb', line 42885

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


42894
42895
42896
# File 'lib/ovirtsdk4/types.rb', line 42894

def description=(value)
  @description = value
end

#hashObject

Generates a hash value for this object.



43453
43454
43455
43456
43457
43458
43459
43460
43461
43462
43463
43464
43465
43466
43467
43468
43469
43470
43471
43472
43473
43474
43475
43476
43477
43478
43479
# File 'lib/ovirtsdk4/types.rb', line 43453

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:



42903
42904
42905
# File 'lib/ovirtsdk4/types.rb', line 42903

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)


42916
42917
42918
42919
42920
42921
# File 'lib/ovirtsdk4/types.rb', line 42916

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)


42928
42929
42930
# File 'lib/ovirtsdk4/types.rb', line 42928

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


42937
42938
42939
# File 'lib/ovirtsdk4/types.rb', line 42937

def id=(value)
  @id = value
end

#ipIp

Returns the value of the ip attribute.

Returns:



42946
42947
42948
# File 'lib/ovirtsdk4/types.rb', line 42946

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)


42959
42960
42961
42962
42963
42964
# File 'lib/ovirtsdk4/types.rb', line 42959

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:



42971
42972
42973
# File 'lib/ovirtsdk4/types.rb', line 42971

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)


42984
42985
42986
42987
42988
42989
# File 'lib/ovirtsdk4/types.rb', line 42984

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:



42996
42997
42998
# File 'lib/ovirtsdk4/types.rb', line 42996

def ipv6_boot_protocol
  @ipv6_boot_protocol
end

#ipv6_boot_protocol=(value) ⇒ Object

Sets the value of the ipv6_boot_protocol attribute.

Parameters:



43005
43006
43007
# File 'lib/ovirtsdk4/types.rb', line 43005

def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end

#macMac

Returns the value of the mac attribute.

Returns:



43014
43015
43016
# File 'lib/ovirtsdk4/types.rb', line 43014

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)


43027
43028
43029
43030
43031
43032
# File 'lib/ovirtsdk4/types.rb', line 43027

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)


43039
43040
43041
# File 'lib/ovirtsdk4/types.rb', line 43039

def mtu
  @mtu
end

#mtu=(value) ⇒ Object

Sets the value of the mtu attribute.

Parameters:

  • value (Integer)


43048
43049
43050
# File 'lib/ovirtsdk4/types.rb', line 43048

def mtu=(value)
  @mtu = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


43057
43058
43059
# File 'lib/ovirtsdk4/types.rb', line 43057

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


43066
43067
43068
# File 'lib/ovirtsdk4/types.rb', line 43066

def name=(value)
  @name = value
end

#networkNetwork

Returns the value of the network attribute.

Returns:



43075
43076
43077
# File 'lib/ovirtsdk4/types.rb', line 43075

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:



43088
43089
43090
43091
43092
43093
# File 'lib/ovirtsdk4/types.rb', line 43088

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:



43100
43101
43102
# File 'lib/ovirtsdk4/types.rb', line 43100

def network_labels
  @network_labels
end

#network_labels=(list) ⇒ Object

Sets the value of the network_labels attribute.

Parameters:



43109
43110
43111
43112
43113
43114
43115
43116
43117
43118
43119
# File 'lib/ovirtsdk4/types.rb', line 43109

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)


43126
43127
43128
# File 'lib/ovirtsdk4/types.rb', line 43126

def override_configuration
  @override_configuration
end

#override_configuration=(value) ⇒ Object

Sets the value of the override_configuration attribute.

Parameters:

  • value (Boolean)


43135
43136
43137
# File 'lib/ovirtsdk4/types.rb', line 43135

def override_configuration=(value)
  @override_configuration = value
end

#physical_functionHostNic

Returns the value of the physical_function attribute.

Returns:



43144
43145
43146
# File 'lib/ovirtsdk4/types.rb', line 43144

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:



43157
43158
43159
43160
43161
43162
# File 'lib/ovirtsdk4/types.rb', line 43157

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:



43169
43170
43171
# File 'lib/ovirtsdk4/types.rb', line 43169

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
# File 'lib/ovirtsdk4/types.rb', line 43178

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:



43195
43196
43197
# File 'lib/ovirtsdk4/types.rb', line 43195

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)


43208
43209
43210
43211
43212
43213
# File 'lib/ovirtsdk4/types.rb', line 43208

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)


43220
43221
43222
# File 'lib/ovirtsdk4/types.rb', line 43220

def speed
  @speed
end

#speed=(value) ⇒ Object

Sets the value of the speed attribute.

Parameters:

  • value (Integer)


43229
43230
43231
# File 'lib/ovirtsdk4/types.rb', line 43229

def speed=(value)
  @speed = value
end

#statisticsArray<Statistic>

Returns the value of the statistics attribute.

Returns:



43238
43239
43240
# File 'lib/ovirtsdk4/types.rb', line 43238

def statistics
  @statistics
end

#statistics=(list) ⇒ Object

Sets the value of the statistics attribute.

Parameters:



43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
# File 'lib/ovirtsdk4/types.rb', line 43247

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:



43264
43265
43266
# File 'lib/ovirtsdk4/types.rb', line 43264

def status
  @status
end

#status=(value) ⇒ Object

Sets the value of the status attribute.

Parameters:



43273
43274
43275
# File 'lib/ovirtsdk4/types.rb', line 43273

def status=(value)
  @status = value
end

#virtual_functions_configurationHostNicVirtualFunctionsConfiguration

Returns the value of the virtual_functions_configuration attribute.



43282
43283
43284
# File 'lib/ovirtsdk4/types.rb', line 43282

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:



43295
43296
43297
43298
43299
43300
# File 'lib/ovirtsdk4/types.rb', line 43295

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:



43307
43308
43309
# File 'lib/ovirtsdk4/types.rb', line 43307

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)


43320
43321
43322
43323
43324
43325
# File 'lib/ovirtsdk4/types.rb', line 43320

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