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

#href, #href=

Constructor Details

- (HostNic) initialize(opts = {})

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):

  • :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.



34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
# File 'lib/ovirtsdk4/types.rb', line 34734

def initialize(opts = {})
  super(opts)
  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.comment = opts[:comment]
  self.custom_configuration = opts[:custom_configuration]
  self.description = opts[:description]
  self.host = opts[:host]
  self.id = opts[:id]
  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.name = opts[:name]
  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

- (String) base_interface

Returns the value of the base_interface attribute.

Returns:

  • (String)


34100
34101
34102
# File 'lib/ovirtsdk4/types.rb', line 34100

def base_interface
  return @base_interface
end

- (Object) base_interface=(value)

Sets the value of the base_interface attribute.

Parameters:

  • value (String)


34109
34110
34111
# File 'lib/ovirtsdk4/types.rb', line 34109

def base_interface=(value)
  @base_interface = value
end

- (Bonding) bonding

Returns the value of the bonding attribute.

Returns:



34118
34119
34120
# File 'lib/ovirtsdk4/types.rb', line 34118

def bonding
  return @bonding
end

- (Object) bonding=(value)

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:



34131
34132
34133
34134
34135
34136
# File 'lib/ovirtsdk4/types.rb', line 34131

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

- (BootProtocol) boot_protocol

Returns the value of the boot_protocol attribute.

Returns:



34143
34144
34145
# File 'lib/ovirtsdk4/types.rb', line 34143

def boot_protocol
  return @boot_protocol
end

- (Object) boot_protocol=(value)

Sets the value of the boot_protocol attribute.

Parameters:



34152
34153
34154
# File 'lib/ovirtsdk4/types.rb', line 34152

def boot_protocol=(value)
  @boot_protocol = value
end

- (Boolean) bridged

Returns the value of the bridged attribute.

Returns:

  • (Boolean)


34161
34162
34163
# File 'lib/ovirtsdk4/types.rb', line 34161

def bridged
  return @bridged
end

- (Object) bridged=(value)

Sets the value of the bridged attribute.

Parameters:

  • value (Boolean)


34170
34171
34172
# File 'lib/ovirtsdk4/types.rb', line 34170

def bridged=(value)
  @bridged = value
end

- (Boolean) check_connectivity

Returns the value of the check_connectivity attribute.

Returns:

  • (Boolean)


34179
34180
34181
# File 'lib/ovirtsdk4/types.rb', line 34179

def check_connectivity
  return @check_connectivity
end

- (Object) check_connectivity=(value)

Sets the value of the check_connectivity attribute.

Parameters:

  • value (Boolean)


34188
34189
34190
# File 'lib/ovirtsdk4/types.rb', line 34188

def check_connectivity=(value)
  @check_connectivity = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


34197
34198
34199
# File 'lib/ovirtsdk4/types.rb', line 34197

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


34206
34207
34208
# File 'lib/ovirtsdk4/types.rb', line 34206

def comment=(value)
  @comment = value
end

- (Boolean) custom_configuration

Returns the value of the custom_configuration attribute.

Returns:

  • (Boolean)


34215
34216
34217
# File 'lib/ovirtsdk4/types.rb', line 34215

def custom_configuration
  return @custom_configuration
end

- (Object) custom_configuration=(value)

Sets the value of the custom_configuration attribute.

Parameters:

  • value (Boolean)


34224
34225
34226
# File 'lib/ovirtsdk4/types.rb', line 34224

def custom_configuration=(value)
  @custom_configuration = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


34233
34234
34235
# File 'lib/ovirtsdk4/types.rb', line 34233

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


34242
34243
34244
# File 'lib/ovirtsdk4/types.rb', line 34242

def description=(value)
  @description = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



34251
34252
34253
# File 'lib/ovirtsdk4/types.rb', line 34251

def host
  return @host
end

- (Object) host=(value)

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)


34264
34265
34266
34267
34268
34269
# File 'lib/ovirtsdk4/types.rb', line 34264

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


34276
34277
34278
# File 'lib/ovirtsdk4/types.rb', line 34276

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


34285
34286
34287
# File 'lib/ovirtsdk4/types.rb', line 34285

def id=(value)
  @id = value
end

- (Ip) ip

Returns the value of the ip attribute.

Returns:



34294
34295
34296
# File 'lib/ovirtsdk4/types.rb', line 34294

def ip
  return @ip
end

- (Object) ip=(value)

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)


34307
34308
34309
34310
34311
34312
# File 'lib/ovirtsdk4/types.rb', line 34307

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

- (Ip) ipv6

Returns the value of the ipv6 attribute.

Returns:



34319
34320
34321
# File 'lib/ovirtsdk4/types.rb', line 34319

def ipv6
  return @ipv6
end

- (Object) ipv6=(value)

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)


34332
34333
34334
34335
34336
34337
# File 'lib/ovirtsdk4/types.rb', line 34332

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

- (BootProtocol) ipv6_boot_protocol

Returns the value of the ipv6_boot_protocol attribute.

Returns:



34344
34345
34346
# File 'lib/ovirtsdk4/types.rb', line 34344

def ipv6_boot_protocol
  return @ipv6_boot_protocol
end

- (Object) ipv6_boot_protocol=(value)

Sets the value of the ipv6_boot_protocol attribute.

Parameters:



34353
34354
34355
# File 'lib/ovirtsdk4/types.rb', line 34353

def ipv6_boot_protocol=(value)
  @ipv6_boot_protocol = value
end

- (Mac) mac

Returns the value of the mac attribute.

Returns:



34362
34363
34364
# File 'lib/ovirtsdk4/types.rb', line 34362

def mac
  return @mac
end

- (Object) mac=(value)

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)


34375
34376
34377
34378
34379
34380
# File 'lib/ovirtsdk4/types.rb', line 34375

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

- (Integer) mtu

Returns the value of the mtu attribute.

Returns:

  • (Integer)


34387
34388
34389
# File 'lib/ovirtsdk4/types.rb', line 34387

def mtu
  return @mtu
end

- (Object) mtu=(value)

Sets the value of the mtu attribute.

Parameters:

  • value (Integer)


34396
34397
34398
# File 'lib/ovirtsdk4/types.rb', line 34396

def mtu=(value)
  @mtu = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


34405
34406
34407
# File 'lib/ovirtsdk4/types.rb', line 34405

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


34414
34415
34416
# File 'lib/ovirtsdk4/types.rb', line 34414

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



34423
34424
34425
# File 'lib/ovirtsdk4/types.rb', line 34423

def network
  return @network
end

- (Object) network=(value)

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:



34436
34437
34438
34439
34440
34441
# File 'lib/ovirtsdk4/types.rb', line 34436

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

- (Array<NetworkLabel>) network_labels

Returns the value of the network_labels attribute.

Returns:



34448
34449
34450
# File 'lib/ovirtsdk4/types.rb', line 34448

def network_labels
  return @network_labels
end

- (Object) network_labels=(list)

Sets the value of the network_labels attribute.

Parameters:



34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
# File 'lib/ovirtsdk4/types.rb', line 34456

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

- (Boolean) override_configuration

Returns the value of the override_configuration attribute.

Returns:

  • (Boolean)


34473
34474
34475
# File 'lib/ovirtsdk4/types.rb', line 34473

def override_configuration
  return @override_configuration
end

- (Object) override_configuration=(value)

Sets the value of the override_configuration attribute.

Parameters:

  • value (Boolean)


34482
34483
34484
# File 'lib/ovirtsdk4/types.rb', line 34482

def override_configuration=(value)
  @override_configuration = value
end

- (HostNic) physical_function

Returns the value of the physical_function attribute.

Returns:



34491
34492
34493
# File 'lib/ovirtsdk4/types.rb', line 34491

def physical_function
  return @physical_function
end

- (Object) physical_function=(value)

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:



34504
34505
34506
34507
34508
34509
# File 'lib/ovirtsdk4/types.rb', line 34504

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

- (Array<Property>) properties

Returns the value of the properties attribute.

Returns:



34516
34517
34518
# File 'lib/ovirtsdk4/types.rb', line 34516

def properties
  return @properties
end

- (Object) properties=(list)

Sets the value of the properties attribute.

Parameters:



34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
# File 'lib/ovirtsdk4/types.rb', line 34524

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

- (Qos) qos

Returns the value of the qos attribute.

Returns:



34541
34542
34543
# File 'lib/ovirtsdk4/types.rb', line 34541

def qos
  return @qos
end

- (Object) qos=(value)

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)


34554
34555
34556
34557
34558
34559
# File 'lib/ovirtsdk4/types.rb', line 34554

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

- (Integer) speed

Returns the value of the speed attribute.

Returns:

  • (Integer)


34566
34567
34568
# File 'lib/ovirtsdk4/types.rb', line 34566

def speed
  return @speed
end

- (Object) speed=(value)

Sets the value of the speed attribute.

Parameters:

  • value (Integer)


34575
34576
34577
# File 'lib/ovirtsdk4/types.rb', line 34575

def speed=(value)
  @speed = value
end

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



34584
34585
34586
# File 'lib/ovirtsdk4/types.rb', line 34584

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
# File 'lib/ovirtsdk4/types.rb', line 34592

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

- (NicStatus) status

Returns the value of the status attribute.

Returns:



34609
34610
34611
# File 'lib/ovirtsdk4/types.rb', line 34609

def status
  return @status
end

- (Object) status=(value)

Sets the value of the status attribute.

Parameters:



34618
34619
34620
# File 'lib/ovirtsdk4/types.rb', line 34618

def status=(value)
  @status = value
end

- (HostNicVirtualFunctionsConfiguration) virtual_functions_configuration

Returns the value of the virtual_functions_configuration attribute.



34627
34628
34629
# File 'lib/ovirtsdk4/types.rb', line 34627

def virtual_functions_configuration
  return @virtual_functions_configuration
end

- (Object) virtual_functions_configuration=(value)

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:



34640
34641
34642
34643
34644
34645
# File 'lib/ovirtsdk4/types.rb', line 34640

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

- (Vlan) vlan

Returns the value of the vlan attribute.

Returns:



34652
34653
34654
# File 'lib/ovirtsdk4/types.rb', line 34652

def vlan
  return @vlan
end

- (Object) vlan=(value)

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)


34665
34666
34667
34668
34669
34670
# File 'lib/ovirtsdk4/types.rb', line 34665

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