Class: OvirtSDK4::VnicProfile

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

- (VnicProfile) initialize(opts = {})

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

  • :custom_properties (Array<CustomProperty>, Array<Hash>)

    The values of attribute custom_properties.

  • :description (String)

    The value of attribute description.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :network (Network, Hash)

    The value of attribute network.

  • :network_filter (NetworkFilter, Hash)

    The value of attribute network_filter.

  • :pass_through (VnicPassThrough, Hash)

    The value of attribute pass_through.

  • :permissions (Array<Permission>, Array<Hash>)

    The values of attribute permissions.

  • :port_mirroring (Boolean)

    The value of attribute port_mirroring.

  • :qos (Qos, Hash)

    The value of attribute qos.



20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
# File 'lib/ovirtsdk4/types.rb', line 20513

def initialize(opts = {})
  super(opts)
  self.comment = opts[:comment]
  self.custom_properties = opts[:custom_properties]
  self.description = opts[:description]
  self.id = opts[:id]
  self.name = opts[:name]
  self.network = opts[:network]
  self.network_filter = opts[:network_filter]
  self.pass_through = opts[:pass_through]
  self.permissions = opts[:permissions]
  self.port_mirroring = opts[:port_mirroring]
  self.qos = opts[:qos]
end

Instance Method Details

- (String) comment

Returns the value of the comment attribute.

Returns:

  • (String)


20248
20249
20250
# File 'lib/ovirtsdk4/types.rb', line 20248

def comment
  return @comment
end

- (Object) comment=(value)

Sets the value of the comment attribute.

Parameters:

  • value (String)


20257
20258
20259
# File 'lib/ovirtsdk4/types.rb', line 20257

def comment=(value)
  @comment = value
end

- (Array<CustomProperty>) custom_properties

Returns the value of the custom_properties attribute.

Returns:



20266
20267
20268
# File 'lib/ovirtsdk4/types.rb', line 20266

def custom_properties
  return @custom_properties
end

- (Object) custom_properties=(list)

Sets the value of the custom_properties attribute.

Parameters:



20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
# File 'lib/ovirtsdk4/types.rb', line 20274

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

- (String) description

Returns the value of the description attribute.

Returns:

  • (String)


20291
20292
20293
# File 'lib/ovirtsdk4/types.rb', line 20291

def description
  return @description
end

- (Object) description=(value)

Sets the value of the description attribute.

Parameters:

  • value (String)


20300
20301
20302
# File 'lib/ovirtsdk4/types.rb', line 20300

def description=(value)
  @description = value
end

- (String) id

Returns the value of the id attribute.

Returns:

  • (String)


20309
20310
20311
# File 'lib/ovirtsdk4/types.rb', line 20309

def id
  return @id
end

- (Object) id=(value)

Sets the value of the id attribute.

Parameters:

  • value (String)


20318
20319
20320
# File 'lib/ovirtsdk4/types.rb', line 20318

def id=(value)
  @id = value
end

- (String) name

Returns the value of the name attribute.

Returns:

  • (String)


20327
20328
20329
# File 'lib/ovirtsdk4/types.rb', line 20327

def name
  return @name
end

- (Object) name=(value)

Sets the value of the name attribute.

Parameters:

  • value (String)


20336
20337
20338
# File 'lib/ovirtsdk4/types.rb', line 20336

def name=(value)
  @name = value
end

- (Network) network

Returns the value of the network attribute.

Returns:



20345
20346
20347
# File 'lib/ovirtsdk4/types.rb', line 20345

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:



20358
20359
20360
20361
20362
20363
# File 'lib/ovirtsdk4/types.rb', line 20358

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

- (NetworkFilter) network_filter

Returns the value of the network_filter attribute.

Returns:



20370
20371
20372
# File 'lib/ovirtsdk4/types.rb', line 20370

def network_filter
  return @network_filter
end

- (Object) network_filter=(value)

Sets the value of the network_filter attribute.

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



20383
20384
20385
20386
20387
20388
# File 'lib/ovirtsdk4/types.rb', line 20383

def network_filter=(value)
  if value.is_a?(Hash)
    value = NetworkFilter.new(value)
  end
  @network_filter = value
end

- (VnicPassThrough) pass_through

Returns the value of the pass_through attribute.

Returns:



20395
20396
20397
# File 'lib/ovirtsdk4/types.rb', line 20395

def pass_through
  return @pass_through
end

- (Object) pass_through=(value)

Sets the value of the pass_through attribute.

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



20408
20409
20410
20411
20412
20413
# File 'lib/ovirtsdk4/types.rb', line 20408

def pass_through=(value)
  if value.is_a?(Hash)
    value = VnicPassThrough.new(value)
  end
  @pass_through = value
end

- (Array<Permission>) permissions

Returns the value of the permissions attribute.

Returns:



20420
20421
20422
# File 'lib/ovirtsdk4/types.rb', line 20420

def permissions
  return @permissions
end

- (Object) permissions=(list)

Sets the value of the permissions attribute.

Parameters:



20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
# File 'lib/ovirtsdk4/types.rb', line 20428

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

- (Boolean) port_mirroring

Returns the value of the port_mirroring attribute.

Returns:

  • (Boolean)


20445
20446
20447
# File 'lib/ovirtsdk4/types.rb', line 20445

def port_mirroring
  return @port_mirroring
end

- (Object) port_mirroring=(value)

Sets the value of the port_mirroring attribute.

Parameters:

  • value (Boolean)


20454
20455
20456
# File 'lib/ovirtsdk4/types.rb', line 20454

def port_mirroring=(value)
  @port_mirroring = value
end

- (Qos) qos

Returns the value of the qos attribute.

Returns:



20463
20464
20465
# File 'lib/ovirtsdk4/types.rb', line 20463

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)


20476
20477
20478
20479
20480
20481
# File 'lib/ovirtsdk4/types.rb', line 20476

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