Class: OvirtSDK4::Nic

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

Instance Method Summary (collapse)

Methods included from Type

#href, #href=

Constructor Details

- (Nic) initialize(opts = {})

Creates a new instance of the OvirtSDK4::Nic 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):

  • :boot_protocol (BootProtocol)

    The value of attribute boot_protocol.

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :instance_type (InstanceType, Hash)

    The value of attribute instance_type.

  • :interface (NicInterface)

    The value of attribute interface.

  • :linked (Boolean)

    The value of attribute linked.

  • :mac (Mac, Hash)

    The value of attribute mac.

  • :name (String)

    The value of attribute name.

  • :network (Network, Hash)

    The value of attribute network.

  • :network_attachments (Array<NetworkAttachment>, Array<Hash>)

    The values of attribute network_attachments.

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

    The values of attribute network_labels.

  • :on_boot (Boolean)

    The value of attribute on_boot.

  • :plugged (Boolean)

    The value of attribute plugged.

  • :reported_devices (Array<ReportedDevice>, Array<Hash>)

    The values of attribute reported_devices.

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

    The values of attribute statistics.

  • :template (Template, Hash)

    The value of attribute template.

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

    The values of attribute virtual_function_allowed_labels.

  • :virtual_function_allowed_networks (Array<Network>, Array<Hash>)

    The values of attribute virtual_function_allowed_networks.

  • :vm (Vm, Hash)

    The value of attribute vm.

  • :vms (Array<Vm>, Array<Hash>)

    The values of attribute vms.

  • :vnic_profile (VnicProfile, Hash)

    The value of attribute vnic_profile.



35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
# File 'lib/ovirtsdk4/types.rb', line 35928

def initialize(opts = {})
  super(opts)
  self.boot_protocol = opts[:boot_protocol]
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.id = opts[:id]
  self.instance_type = opts[:instance_type]
  self.interface = opts[:interface]
  self.linked = opts[:linked]
  self.mac = opts[:mac]
  self.name = opts[:name]
  self.network = opts[:network]
  self.network_attachments = opts[:network_attachments]
  self.network_labels = opts[:network_labels]
  self.on_boot = opts[:on_boot]
  self.plugged = opts[:plugged]
  self.reported_devices = opts[:reported_devices]
  self.statistics = opts[:statistics]
  self.template = opts[:template]
  self.virtual_function_allowed_labels = opts[:virtual_function_allowed_labels]
  self.virtual_function_allowed_networks = opts[:virtual_function_allowed_networks]
  self.vm = opts[:vm]
  self.vms = opts[:vms]
  self.vnic_profile = opts[:vnic_profile]
end

Instance Method Details

- (BootProtocol) boot_protocol

Returns the value of the boot_protocol attribute.

Returns:



35394
35395
35396
# File 'lib/ovirtsdk4/types.rb', line 35394

def boot_protocol
  return @boot_protocol
end

- (Object) boot_protocol=(value)

Sets the value of the boot_protocol attribute.

Parameters:



35403
35404
35405
# File 'lib/ovirtsdk4/types.rb', line 35403

def boot_protocol=(value)
  @boot_protocol = value
end

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


35412
35413
35414
# File 'lib/ovirtsdk4/types.rb', line 35412

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


35421
35422
35423
# File 'lib/ovirtsdk4/types.rb', line 35421

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


35430
35431
35432
# File 'lib/ovirtsdk4/types.rb', line 35430

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


35439
35440
35441
# File 'lib/ovirtsdk4/types.rb', line 35439

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


35448
35449
35450
# File 'lib/ovirtsdk4/types.rb', line 35448

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


35457
35458
35459
# File 'lib/ovirtsdk4/types.rb', line 35457

def id=(value)
  @id = value
end

- (InstanceType) instance_type

Returns the value of the instance_type attribute.

Returns:



35466
35467
35468
# File 'lib/ovirtsdk4/types.rb', line 35466

def instance_type
  return @instance_type
end

- (Object) instance_type=(value)

Sets the value of the instance_type attribute.

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



35479
35480
35481
35482
35483
35484
# File 'lib/ovirtsdk4/types.rb', line 35479

def instance_type=(value)
  if value.is_a?(Hash)
    value = InstanceType.new(value)
  end
  @instance_type = value
end

- (NicInterface) interface

Returns the value of the interface attribute.

Returns:



35491
35492
35493
# File 'lib/ovirtsdk4/types.rb', line 35491

def interface
  return @interface
end

- (Object) interface=(value)

Sets the value of the interface attribute.

Parameters:



35500
35501
35502
# File 'lib/ovirtsdk4/types.rb', line 35500

def interface=(value)
  @interface = value
end

- (Boolean) linked

Returns the value of the linked attribute.

Returns:

  • (Boolean)


35509
35510
35511
# File 'lib/ovirtsdk4/types.rb', line 35509

def linked
  return @linked
end

- (Object) linked=(value)

Sets the value of the linked attribute.

Parameters:

  • value (Boolean)


35518
35519
35520
# File 'lib/ovirtsdk4/types.rb', line 35518

def linked=(value)
  @linked = value
end

- (Mac) mac

Returns the value of the mac attribute.

Returns:



35527
35528
35529
# File 'lib/ovirtsdk4/types.rb', line 35527

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)


35540
35541
35542
35543
35544
35545
# File 'lib/ovirtsdk4/types.rb', line 35540

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

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


35552
35553
35554
# File 'lib/ovirtsdk4/types.rb', line 35552

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


35561
35562
35563
# File 'lib/ovirtsdk4/types.rb', line 35561

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



35570
35571
35572
# File 'lib/ovirtsdk4/types.rb', line 35570

def network
  return @network
end

- (Object) network=(value)

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

Parameters:



35583
35584
35585
35586
35587
35588
# File 'lib/ovirtsdk4/types.rb', line 35583

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

- (Array<NetworkAttachment>) network_attachments

Returns the value of the network_attachments attribute.

Returns:



35595
35596
35597
# File 'lib/ovirtsdk4/types.rb', line 35595

def network_attachments
  return @network_attachments
end

- (Object) network_attachments=(list)

Sets the value of the network_attachments attribute.

Parameters:



35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
# File 'lib/ovirtsdk4/types.rb', line 35603

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

- (Array<NetworkLabel>) network_labels

Returns the value of the network_labels attribute.

Returns:



35620
35621
35622
# File 'lib/ovirtsdk4/types.rb', line 35620

def network_labels
  return @network_labels
end

- (Object) network_labels=(list)

Sets the value of the network_labels attribute.

Parameters:



35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
# File 'lib/ovirtsdk4/types.rb', line 35628

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

Returns the value of the on_boot attribute.

Returns:

  • (Boolean)


35645
35646
35647
# File 'lib/ovirtsdk4/types.rb', line 35645

def on_boot
  return @on_boot
end

- (Object) on_boot=(value)

Sets the value of the on_boot attribute.

Parameters:

  • value (Boolean)


35654
35655
35656
# File 'lib/ovirtsdk4/types.rb', line 35654

def on_boot=(value)
  @on_boot = value
end

- (Boolean) plugged

Returns the value of the plugged attribute.

Returns:

  • (Boolean)


35663
35664
35665
# File 'lib/ovirtsdk4/types.rb', line 35663

def plugged
  return @plugged
end

- (Object) plugged=(value)

Sets the value of the plugged attribute.

Parameters:

  • value (Boolean)


35672
35673
35674
# File 'lib/ovirtsdk4/types.rb', line 35672

def plugged=(value)
  @plugged = value
end

- (Array<ReportedDevice>) reported_devices

Returns the value of the reported_devices attribute.

Returns:



35681
35682
35683
# File 'lib/ovirtsdk4/types.rb', line 35681

def reported_devices
  return @reported_devices
end

- (Object) reported_devices=(list)

Sets the value of the reported_devices attribute.

Parameters:



35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
# File 'lib/ovirtsdk4/types.rb', line 35689

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

- (Array<Statistic>) statistics

Returns the value of the statistics attribute.

Returns:



35706
35707
35708
# File 'lib/ovirtsdk4/types.rb', line 35706

def statistics
  return @statistics
end

- (Object) statistics=(list)

Sets the value of the statistics attribute.

Parameters:



35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
# File 'lib/ovirtsdk4/types.rb', line 35714

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

- (Template) template

Returns the value of the template attribute.

Returns:



35731
35732
35733
# File 'lib/ovirtsdk4/types.rb', line 35731

def template
  return @template
end

- (Object) template=(value)

Sets the value of the template attribute.

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



35744
35745
35746
35747
35748
35749
# File 'lib/ovirtsdk4/types.rb', line 35744

def template=(value)
  if value.is_a?(Hash)
    value = Template.new(value)
  end
  @template = value
end

- (Array<NetworkLabel>) virtual_function_allowed_labels

Returns the value of the virtual_function_allowed_labels attribute.

Returns:



35756
35757
35758
# File 'lib/ovirtsdk4/types.rb', line 35756

def virtual_function_allowed_labels
  return @virtual_function_allowed_labels
end

- (Object) virtual_function_allowed_labels=(list)

Sets the value of the virtual_function_allowed_labels attribute.

Parameters:



35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
# File 'lib/ovirtsdk4/types.rb', line 35764

def virtual_function_allowed_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
  @virtual_function_allowed_labels = list
end

- (Array<Network>) virtual_function_allowed_networks

Returns the value of the virtual_function_allowed_networks attribute.

Returns:



35781
35782
35783
# File 'lib/ovirtsdk4/types.rb', line 35781

def virtual_function_allowed_networks
  return @virtual_function_allowed_networks
end

- (Object) virtual_function_allowed_networks=(list)

Sets the value of the virtual_function_allowed_networks attribute.

Parameters:



35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
# File 'lib/ovirtsdk4/types.rb', line 35789

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

- (Vm) vm

Returns the value of the vm attribute.

Returns:



35806
35807
35808
# File 'lib/ovirtsdk4/types.rb', line 35806

def vm
  return @vm
end

- (Object) vm=(value)

Sets the value of the vm attribute.

The value parameter can be an instance of Vm 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 (Vm, Hash)


35819
35820
35821
35822
35823
35824
# File 'lib/ovirtsdk4/types.rb', line 35819

def vm=(value)
  if value.is_a?(Hash)
    value = Vm.new(value)
  end
  @vm = value
end

- (Array<Vm>) vms

Returns the value of the vms attribute.

Returns:

  • (Array<Vm>)


35831
35832
35833
# File 'lib/ovirtsdk4/types.rb', line 35831

def vms
  return @vms
end

- (Object) vms=(list)

Sets the value of the vms attribute.

Parameters:

  • list (Array<Vm>)


35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
# File 'lib/ovirtsdk4/types.rb', line 35839

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

- (VnicProfile) vnic_profile

Returns the value of the vnic_profile attribute.

Returns:



35856
35857
35858
# File 'lib/ovirtsdk4/types.rb', line 35856

def vnic_profile
  return @vnic_profile
end

- (Object) vnic_profile=(value)

Sets the value of the vnic_profile attribute.

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



35869
35870
35871
35872
35873
35874
# File 'lib/ovirtsdk4/types.rb', line 35869

def vnic_profile=(value)
  if value.is_a?(Hash)
    value = VnicProfile.new(value)
  end
  @vnic_profile = value
end