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.



50351
50352
50353
50354
50355
50356
50357
50358
# File 'lib/ovirtsdk4/types.rb', line 50351

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.



50363
50364
50365
50366
50367
50368
50369
50370
# File 'lib/ovirtsdk4/types.rb', line 50363

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)


50000
50001
50002
# File 'lib/ovirtsdk4/types.rb', line 50000

def authentication_url
  @authentication_url
end

#authentication_url=(value) ⇒ Object

Sets the value of the authentication_url attribute.

Parameters:

  • value (String)


50009
50010
50011
# File 'lib/ovirtsdk4/types.rb', line 50009

def authentication_url=(value)
  @authentication_url = value
end

#certificatesArray<Certificate>

Returns the value of the certificates attribute.

Returns:



50018
50019
50020
# File 'lib/ovirtsdk4/types.rb', line 50018

def certificates
  @certificates
end

#certificates=(list) ⇒ Object

Sets the value of the certificates attribute.

Parameters:



50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
# File 'lib/ovirtsdk4/types.rb', line 50027

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)


50044
50045
50046
# File 'lib/ovirtsdk4/types.rb', line 50044

def comment
  @comment
end

#comment=(value) ⇒ Object

Sets the value of the comment attribute.

Parameters:

  • value (String)


50053
50054
50055
# File 'lib/ovirtsdk4/types.rb', line 50053

def comment=(value)
  @comment = value
end

#compute_resourcesArray<ExternalComputeResource>

Returns the value of the compute_resources attribute.

Returns:



50062
50063
50064
# File 'lib/ovirtsdk4/types.rb', line 50062

def compute_resources
  @compute_resources
end

#compute_resources=(list) ⇒ Object

Sets the value of the compute_resources attribute.

Parameters:



50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
# File 'lib/ovirtsdk4/types.rb', line 50071

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)


50088
50089
50090
# File 'lib/ovirtsdk4/types.rb', line 50088

def description
  @description
end

#description=(value) ⇒ Object

Sets the value of the description attribute.

Parameters:

  • value (String)


50097
50098
50099
# File 'lib/ovirtsdk4/types.rb', line 50097

def description=(value)
  @description = value
end

#discovered_hostsArray<ExternalDiscoveredHost>

Returns the value of the discovered_hosts attribute.

Returns:



50106
50107
50108
# File 'lib/ovirtsdk4/types.rb', line 50106

def discovered_hosts
  @discovered_hosts
end

#discovered_hosts=(list) ⇒ Object

Sets the value of the discovered_hosts attribute.

Parameters:



50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
# File 'lib/ovirtsdk4/types.rb', line 50115

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.



50375
50376
50377
50378
50379
50380
50381
50382
# File 'lib/ovirtsdk4/types.rb', line 50375

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:



50132
50133
50134
# File 'lib/ovirtsdk4/types.rb', line 50132

def host_groups
  @host_groups
end

#host_groups=(list) ⇒ Object

Sets the value of the host_groups attribute.

Parameters:



50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
# File 'lib/ovirtsdk4/types.rb', line 50141

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:



50158
50159
50160
# File 'lib/ovirtsdk4/types.rb', line 50158

def hosts
  @hosts
end

#hosts=(list) ⇒ Object

Sets the value of the hosts attribute.

Parameters:

  • list (Array<Host>)


50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
# File 'lib/ovirtsdk4/types.rb', line 50167

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)


50184
50185
50186
# File 'lib/ovirtsdk4/types.rb', line 50184

def id
  @id
end

#id=(value) ⇒ Object

Sets the value of the id attribute.

Parameters:

  • value (String)


50193
50194
50195
# File 'lib/ovirtsdk4/types.rb', line 50193

def id=(value)
  @id = value
end

#nameString

Returns the value of the name attribute.

Returns:

  • (String)


50202
50203
50204
# File 'lib/ovirtsdk4/types.rb', line 50202

def name
  @name
end

#name=(value) ⇒ Object

Sets the value of the name attribute.

Parameters:

  • value (String)


50211
50212
50213
# File 'lib/ovirtsdk4/types.rb', line 50211

def name=(value)
  @name = value
end

#passwordString

Returns the value of the password attribute.

Returns:

  • (String)


50220
50221
50222
# File 'lib/ovirtsdk4/types.rb', line 50220

def password
  @password
end

#password=(value) ⇒ Object

Sets the value of the password attribute.

Parameters:

  • value (String)


50229
50230
50231
# File 'lib/ovirtsdk4/types.rb', line 50229

def password=(value)
  @password = value
end

#propertiesArray<Property>

Returns the value of the properties attribute.

Returns:



50238
50239
50240
# File 'lib/ovirtsdk4/types.rb', line 50238

def properties
  @properties
end

#properties=(list) ⇒ Object

Sets the value of the properties attribute.

Parameters:



50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
# File 'lib/ovirtsdk4/types.rb', line 50247

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)


50264
50265
50266
# File 'lib/ovirtsdk4/types.rb', line 50264

def requires_authentication
  @requires_authentication
end

#requires_authentication=(value) ⇒ Object

Sets the value of the requires_authentication attribute.

Parameters:

  • value (Boolean)


50273
50274
50275
# File 'lib/ovirtsdk4/types.rb', line 50273

def requires_authentication=(value)
  @requires_authentication = value
end

#urlString

Returns the value of the url attribute.

Returns:

  • (String)


50282
50283
50284
# File 'lib/ovirtsdk4/types.rb', line 50282

def url
  @url
end

#url=(value) ⇒ Object

Sets the value of the url attribute.

Parameters:

  • value (String)


50291
50292
50293
# File 'lib/ovirtsdk4/types.rb', line 50291

def url=(value)
  @url = value
end

#usernameString

Returns the value of the username attribute.

Returns:

  • (String)


50300
50301
50302
# File 'lib/ovirtsdk4/types.rb', line 50300

def username
  @username
end

#username=(value) ⇒ Object

Sets the value of the username attribute.

Parameters:

  • value (String)


50309
50310
50311
# File 'lib/ovirtsdk4/types.rb', line 50309

def username=(value)
  @username = value
end