Class: OvirtSDK4::ExternalHostProvider

Inherits:
ExternalProvider 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 = {}) ⇒ ExternalHostProvider

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

  • :authentication_url (String)

    The value of attribute authentication_url.

  • :certificates (Array<Certificate>, Array<Hash>)

    The values of attribute certificates.

  • :comment (String)

    The value of attribute comment.

  • :compute_resources (Array<ExternalComputeResource>, Array<Hash>)

    The values of attribute compute_resources.

  • :description (String)

    The value of attribute description.

  • :discovered_hosts (Array<ExternalDiscoveredHost>, Array<Hash>)

    The values of attribute discovered_hosts.

  • :host_groups (Array<ExternalHostGroup>, Array<Hash>)

    The values of attribute host_groups.

  • :hosts (Array<Host>, Array<Hash>)

    The values of attribute hosts.

  • :id (String)

    The value of attribute id.

  • :name (String)

    The value of attribute name.

  • :password (String)

    The value of attribute password.

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

    The values of attribute properties.

  • :requires_authentication (Boolean)

    The value of attribute requires_authentication.

  • :url (String)

    The value of attribute url.

  • :username (String)

    The value of attribute username.


51703
51704
51705
51706
51707
51708
51709
51710
# File 'lib/ovirtsdk4/types.rb', line 51703

def initialize(opts = {})
  super(opts)
  self.certificates = opts[:certificates]
  self.compute_resources = opts[:compute_resources]
  self.discovered_hosts = opts[:discovered_hosts]
  self.host_groups = opts[:host_groups]
  self.hosts = opts[:hosts]
end

Instance Method Details

#==(other) ⇒ Object

Returns true if self and other have the same attributes and values.


51715
51716
51717
51718
51719
51720
51721
51722
# File 'lib/ovirtsdk4/types.rb', line 51715

def ==(other)
  super &&
  @certificates == other.certificates &&
  @compute_resources == other.compute_resources &&
  @discovered_hosts == other.discovered_hosts &&
  @host_groups == other.host_groups &&
  @hosts == other.hosts
end

#authentication_urlString

Returns the value of the authentication_url attribute.

Returns:

  • (String)

51352
51353
51354
# File 'lib/ovirtsdk4/types.rb', line 51352

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)

51361
51362
51363
# File 'lib/ovirtsdk4/types.rb', line 51361

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:


51370
51371
51372
# File 'lib/ovirtsdk4/types.rb', line 51370

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:


51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
# File 'lib/ovirtsdk4/types.rb', line 51379

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

#commentString

Returns the value of the comment attribute.

Returns:

  • (String)

51396
51397
51398
# File 'lib/ovirtsdk4/types.rb', line 51396

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)

51405
51406
51407
# File 'lib/ovirtsdk4/types.rb', line 51405

def comment=(value)
  @comment = value
end

#compute_resourcesArray<ExternalComputeResource>

Returns the value of the compute_resources attribute.

Returns:


51414
51415
51416
# File 'lib/ovirtsdk4/types.rb', line 51414

def compute_resources
  @compute_resources
end

#compute_resources=(list) ⇒ Object

Sets the value of the compute_resources attribute.

Parameters:


51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
# File 'lib/ovirtsdk4/types.rb', line 51423

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

#descriptionString

Returns the value of the description attribute.

Returns:

  • (String)

51440
51441
51442
# File 'lib/ovirtsdk4/types.rb', line 51440

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)

51449
51450
51451
# File 'lib/ovirtsdk4/types.rb', line 51449

def description=(value)
  @description = value
end

#discovered_hostsArray<ExternalDiscoveredHost>

Returns the value of the discovered_hosts attribute.

Returns:


51458
51459
51460
# File 'lib/ovirtsdk4/types.rb', line 51458

def discovered_hosts
  @discovered_hosts
end

#discovered_hosts=(list) ⇒ Object

Sets the value of the discovered_hosts attribute.

Parameters:


51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
# File 'lib/ovirtsdk4/types.rb', line 51467

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

#hashObject

Generates a hash value for this object.


51727
51728
51729
51730
51731
51732
51733
51734
# File 'lib/ovirtsdk4/types.rb', line 51727

def hash
  super +
  @certificates.hash +
  @compute_resources.hash +
  @discovered_hosts.hash +
  @host_groups.hash +
  @hosts.hash
end

#host_groupsArray<ExternalHostGroup>

Returns the value of the host_groups attribute.

Returns:


51484
51485
51486
# File 'lib/ovirtsdk4/types.rb', line 51484

def host_groups
  @host_groups
end

#host_groups=(list) ⇒ Object

Sets the value of the host_groups attribute.

Parameters:


51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
# File 'lib/ovirtsdk4/types.rb', line 51493

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

#hostsArray<Host>

Returns the value of the hosts attribute.

Returns:


51510
51511
51512
# File 'lib/ovirtsdk4/types.rb', line 51510

def hosts
  @hosts
end

#hosts=(list) ⇒ Object

Sets the value of the hosts attribute.

Parameters:

  • list (Array<Host>)

51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
# File 'lib/ovirtsdk4/types.rb', line 51519

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

#idString

Returns the value of the id attribute.

Returns:

  • (String)

51536
51537
51538
# File 'lib/ovirtsdk4/types.rb', line 51536

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)

51545
51546
51547
# File 'lib/ovirtsdk4/types.rb', line 51545

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)

51554
51555
51556
# File 'lib/ovirtsdk4/types.rb', line 51554

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)

51563
51564
51565
# File 'lib/ovirtsdk4/types.rb', line 51563

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)

51572
51573
51574
# File 'lib/ovirtsdk4/types.rb', line 51572

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)

51581
51582
51583
# File 'lib/ovirtsdk4/types.rb', line 51581

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:


51590
51591
51592
# File 'lib/ovirtsdk4/types.rb', line 51590

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:


51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
# File 'lib/ovirtsdk4/types.rb', line 51599

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

#requires_authenticationBoolean

Returns the value of the requires_authentication attribute.

Returns:

  • (Boolean)

51616
51617
51618
# File 'lib/ovirtsdk4/types.rb', line 51616

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)

51625
51626
51627
# File 'lib/ovirtsdk4/types.rb', line 51625

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)

51634
51635
51636
# File 'lib/ovirtsdk4/types.rb', line 51634

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)

51643
51644
51645
# File 'lib/ovirtsdk4/types.rb', line 51643

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)

51652
51653
51654
# File 'lib/ovirtsdk4/types.rb', line 51652

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)

51661
51662
51663
# File 'lib/ovirtsdk4/types.rb', line 51661

def username=(value)
  @username = value
end