Class: OvirtSDK4::NetworkAttachment

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

- (NetworkAttachment) initialize(opts = {})

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

  • :comment (String)

    The value of attribute comment.

  • :description (String)

    The value of attribute description.

  • :host (Host, Hash)

    The value of attribute host.

  • :host_nic (HostNic, Hash)

    The value of attribute host_nic.

  • :id (String)

    The value of attribute id.

  • :in_sync (Boolean)

    The value of attribute in_sync.

  • :ip_address_assignments (Array<IpAddressAssignment>, Array<Hash>)

    The values of attribute ip_address_assignments.

  • :name (String)

    The value of attribute name.

  • :network (Network, Hash)

    The value of attribute network.

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

    The values of attribute properties.

  • :qos (Qos, Hash)

    The value of attribute qos.

  • :reported_configurations (Array<ReportedConfiguration>, Array<Hash>)

    The values of attribute reported_configurations.



7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
# File 'lib/ovirtsdk4/types.rb', line 7581

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.description = opts[:description]
  self.host = opts[:host]
  self.host_nic = opts[:host_nic]
  self.id = opts[:id]
  self.in_sync = opts[:in_sync]
  self.ip_address_assignments = opts[:ip_address_assignments]
  self.name = opts[:name]
  self.network = opts[:network]
  self.properties = opts[:properties]
  self.qos = opts[:qos]
  self.reported_configurations = opts[:reported_configurations]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


7289
7290
7291
# File 'lib/ovirtsdk4/types.rb', line 7289

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


7298
7299
7300
# File 'lib/ovirtsdk4/types.rb', line 7298

def comment=(value)
  @comment = value
end

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


7307
7308
7309
# File 'lib/ovirtsdk4/types.rb', line 7307

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


7316
7317
7318
# File 'lib/ovirtsdk4/types.rb', line 7316

def description=(value)
  @description = value
end

- (Host) host

Returns the value of the host attribute.

Returns:



7325
7326
7327
# File 'lib/ovirtsdk4/types.rb', line 7325

def host
  return @host
end

- (Object) host=(value)

Sets the value of the host attribute.

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


7338
7339
7340
7341
7342
7343
# File 'lib/ovirtsdk4/types.rb', line 7338

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

- (HostNic) host_nic

Returns the value of the host_nic attribute.

Returns:



7350
7351
7352
# File 'lib/ovirtsdk4/types.rb', line 7350

def host_nic
  return @host_nic
end

- (Object) host_nic=(value)

Sets the value of the host_nic attribute.

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



7363
7364
7365
7366
7367
7368
# File 'lib/ovirtsdk4/types.rb', line 7363

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

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


7375
7376
7377
# File 'lib/ovirtsdk4/types.rb', line 7375

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


7384
7385
7386
# File 'lib/ovirtsdk4/types.rb', line 7384

def id=(value)
  @id = value
end

- (Boolean) in_sync

Returns the value of the in_sync attribute.

Returns:

  • (Boolean)


7393
7394
7395
# File 'lib/ovirtsdk4/types.rb', line 7393

def in_sync
  return @in_sync
end

- (Object) in_sync=(value)

Sets the value of the in_sync attribute.

Parameters:

  • value (Boolean)


7402
7403
7404
# File 'lib/ovirtsdk4/types.rb', line 7402

def in_sync=(value)
  @in_sync = value
end

- (Array<IpAddressAssignment>) ip_address_assignments

Returns the value of the ip_address_assignments attribute.

Returns:



7411
7412
7413
# File 'lib/ovirtsdk4/types.rb', line 7411

def ip_address_assignments
  return @ip_address_assignments
end

- (Object) ip_address_assignments=(list)

Sets the value of the ip_address_assignments attribute.

Parameters:



7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
# File 'lib/ovirtsdk4/types.rb', line 7419

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

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


7436
7437
7438
# File 'lib/ovirtsdk4/types.rb', line 7436

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


7445
7446
7447
# File 'lib/ovirtsdk4/types.rb', line 7445

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



7454
7455
7456
# File 'lib/ovirtsdk4/types.rb', line 7454

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:



7467
7468
7469
7470
7471
7472
# File 'lib/ovirtsdk4/types.rb', line 7467

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

- (Array<Property>) properties

Returns the value of the properties attribute.

Returns:



7479
7480
7481
# File 'lib/ovirtsdk4/types.rb', line 7479

def properties
  return @properties
end

- (Object) properties=(list)

Sets the value of the properties attribute.

Parameters:



7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
# File 'lib/ovirtsdk4/types.rb', line 7487

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:



7504
7505
7506
# File 'lib/ovirtsdk4/types.rb', line 7504

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)


7517
7518
7519
7520
7521
7522
# File 'lib/ovirtsdk4/types.rb', line 7517

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

- (Array<ReportedConfiguration>) reported_configurations

Returns the value of the reported_configurations attribute.

Returns:



7529
7530
7531
# File 'lib/ovirtsdk4/types.rb', line 7529

def reported_configurations
  return @reported_configurations
end

- (Object) reported_configurations=(list)

Sets the value of the reported_configurations attribute.

Parameters:



7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
# File 'lib/ovirtsdk4/types.rb', line 7537

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