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.

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.



54609
54610
54611
54612
54613
54614
54615
54616
# File 'lib/ovirtsdk4/types.rb', line 54609

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.



54621
54622
54623
54624
54625
54626
54627
54628
# File 'lib/ovirtsdk4/types.rb', line 54621

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.



54258
54259
54260
# File 'lib/ovirtsdk4/types.rb', line 54258

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.



54267
54268
54269
# File 'lib/ovirtsdk4/types.rb', line 54267

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.



54276
54277
54278
# File 'lib/ovirtsdk4/types.rb', line 54276

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.



54285
54286
54287
54288
54289
54290
54291
54292
54293
54294
54295
# File 'lib/ovirtsdk4/types.rb', line 54285

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.



54302
54303
54304
# File 'lib/ovirtsdk4/types.rb', line 54302

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.



54311
54312
54313
# File 'lib/ovirtsdk4/types.rb', line 54311

def comment=(value)
  @comment = value
end

#compute_resourcesArray<ExternalComputeResource>

Returns the value of the compute_resources attribute.



54320
54321
54322
# File 'lib/ovirtsdk4/types.rb', line 54320

def compute_resources
  @compute_resources
end

#compute_resources=(list) ⇒ Object

Sets the value of the compute_resources attribute.



54329
54330
54331
54332
54333
54334
54335
54336
54337
54338
54339
# File 'lib/ovirtsdk4/types.rb', line 54329

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.



54346
54347
54348
# File 'lib/ovirtsdk4/types.rb', line 54346

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.



54355
54356
54357
# File 'lib/ovirtsdk4/types.rb', line 54355

def description=(value)
  @description = value
end

#discovered_hostsArray<ExternalDiscoveredHost>

Returns the value of the discovered_hosts attribute.



54364
54365
54366
# File 'lib/ovirtsdk4/types.rb', line 54364

def discovered_hosts
  @discovered_hosts
end

#discovered_hosts=(list) ⇒ Object

Sets the value of the discovered_hosts attribute.



54373
54374
54375
54376
54377
54378
54379
54380
54381
54382
54383
# File 'lib/ovirtsdk4/types.rb', line 54373

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.



54633
54634
54635
54636
54637
54638
54639
54640
# File 'lib/ovirtsdk4/types.rb', line 54633

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.



54390
54391
54392
# File 'lib/ovirtsdk4/types.rb', line 54390

def host_groups
  @host_groups
end

#host_groups=(list) ⇒ Object

Sets the value of the host_groups attribute.



54399
54400
54401
54402
54403
54404
54405
54406
54407
54408
54409
# File 'lib/ovirtsdk4/types.rb', line 54399

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.



54416
54417
54418
# File 'lib/ovirtsdk4/types.rb', line 54416

def hosts
  @hosts
end

#hosts=(list) ⇒ Object

Sets the value of the hosts attribute.



54425
54426
54427
54428
54429
54430
54431
54432
54433
54434
54435
# File 'lib/ovirtsdk4/types.rb', line 54425

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.



54442
54443
54444
# File 'lib/ovirtsdk4/types.rb', line 54442

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.



54451
54452
54453
# File 'lib/ovirtsdk4/types.rb', line 54451

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.



54460
54461
54462
# File 'lib/ovirtsdk4/types.rb', line 54460

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.



54469
54470
54471
# File 'lib/ovirtsdk4/types.rb', line 54469

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.



54478
54479
54480
# File 'lib/ovirtsdk4/types.rb', line 54478

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.



54487
54488
54489
# File 'lib/ovirtsdk4/types.rb', line 54487

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.



54496
54497
54498
# File 'lib/ovirtsdk4/types.rb', line 54496

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.



54505
54506
54507
54508
54509
54510
54511
54512
54513
54514
54515
# File 'lib/ovirtsdk4/types.rb', line 54505

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.



54522
54523
54524
# File 'lib/ovirtsdk4/types.rb', line 54522

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.



54531
54532
54533
# File 'lib/ovirtsdk4/types.rb', line 54531

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.



54540
54541
54542
# File 'lib/ovirtsdk4/types.rb', line 54540

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.



54549
54550
54551
# File 'lib/ovirtsdk4/types.rb', line 54549

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.



54558
54559
54560
# File 'lib/ovirtsdk4/types.rb', line 54558

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.



54567
54568
54569
# File 'lib/ovirtsdk4/types.rb', line 54567

def username=(value)
  @username = value
end