Class: IntersightClient::CondHclStatus

Inherits:
MoBaseMo
  • Object
show all
Defined in:
lib/intersight_client/models/cond_hcl_status.rb

Overview

The HCL status of a managed object after we have validated the managed object components’ firmware and drivers against the HCL.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Attributes inherited from MoBaseMo

#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CondHclStatus

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 188

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::CondHclStatus` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  # call parent's initialize
  super(attributes)

  if attributes.key?(:'class_id')
    self.class_id = attributes[:'class_id']
  else
    self.class_id = 'cond.HclStatus'
  end

  if attributes.key?(:'object_type')
    self.object_type = attributes[:'object_type']
  else
    self.object_type = 'cond.HclStatus'
  end

  if attributes.key?(:'component_status')
    self.component_status = attributes[:'component_status']
  else
    self.component_status = 'Incomplete'
  end

  if attributes.key?(:'hardware_status')
    self.hardware_status = attributes[:'hardware_status']
  else
    self.hardware_status = 'Incomplete'
  end

  if attributes.key?(:'hcl_firmware_version')
    self.hcl_firmware_version = attributes[:'hcl_firmware_version']
  end

  if attributes.key?(:'hcl_model')
    self.hcl_model = attributes[:'hcl_model']
  end

  if attributes.key?(:'hcl_os_vendor')
    self.hcl_os_vendor = attributes[:'hcl_os_vendor']
  end

  if attributes.key?(:'hcl_os_version')
    self.hcl_os_version = attributes[:'hcl_os_version']
  end

  if attributes.key?(:'hcl_processor')
    self.hcl_processor = attributes[:'hcl_processor']
  end

  if attributes.key?(:'inv_firmware_version')
    self.inv_firmware_version = attributes[:'inv_firmware_version']
  end

  if attributes.key?(:'inv_model')
    self.inv_model = attributes[:'inv_model']
  end

  if attributes.key?(:'inv_os_vendor')
    self.inv_os_vendor = attributes[:'inv_os_vendor']
  end

  if attributes.key?(:'inv_os_version')
    self.inv_os_version = attributes[:'inv_os_version']
  end

  if attributes.key?(:'inv_processor')
    self.inv_processor = attributes[:'inv_processor']
  end

  if attributes.key?(:'reason')
    self.reason = attributes[:'reason']
  else
    self.reason = 'Missing-Os-Info'
  end

  if attributes.key?(:'server_reason')
    self.server_reason = attributes[:'server_reason']
  else
    self.server_reason = 'Missing-Os-Driver-Info'
  end

  if attributes.key?(:'software_status')
    self.software_status = attributes[:'software_status']
  else
    self.software_status = 'Incomplete'
  end

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  else
    self.status = 'Incomplete'
  end

  if attributes.key?(:'details')
    if (value = attributes[:'details']).is_a?(Array)
      self.details = value
    end
  end

  if attributes.key?(:'managed_object')
    self.managed_object = attributes[:'managed_object']
  end

  if attributes.key?(:'registered_device')
    self.registered_device = attributes[:'registered_device']
  end
end

Instance Attribute Details

#class_idObject

The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.



20
21
22
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 20

def class_id
  @class_id
end

#component_statusObject

The overall status for the components found in the HCL. This will provide the HCL validation status for all the components. It can be one of the following. "Validated" - all the components hardware/software profiles are listed in the HCL. "Not-Listed" - one or more components hardware/software profiles are not listed in the HCL "Incomplete" - the components are not evaluated as the server’s software/hardware profiles are not listed in the HCL. "Not-Evaluated" - The components are not evaluated against the HCL because it is exempted. * Incomplete - This means we do not have os information in Intersight for this server. Either install ucstools vib or use power shell scripts to tag proper OS information. * Not-Found - At HclStatus level, this means that one of the components has failed validation. At HclStatusDetail level, this means that his component’s hardware or software profile was not found in the HCL. * Not-Listed - At the HclStatus level, this means that some part of the HCL validation has failed. This could be that either the server’s hardware or software profile was not listed in the HCL or one of the components’ hardware or software profile was not found in the HCL. * Validated - At the HclStatus level, this means that all of the components have passed validation. At HclStatusDetail level, this means that the component’s hardware or software profile was found in the HCL. * Not-Evaluated - At the HclStatus level this means that this means that SW or Component status has not been evaluated as the previous evaluation step has not passed yet. At the HclStatusDetail level this means that either HW or SW status has not been evaluted because a previous evaluation step has not passed yet.



26
27
28
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 26

def component_status
  @component_status
end

#detailsObject

An array of relationships to condHclStatusDetail resources.



74
75
76
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 74

def details
  @details
end

#hardware_statusObject

The server model, processor and firmware are considered as part of the hardware profile for the server. This will provide the HCL validation status for the hardware profile. For the failure reason see the serverReason property. The status can be one of the following "Validated" - The server model, processor and firmware combination is listed in the HCL "Not-Listed" - The server model, processor and firmware combination is not listed in the HCL. "Not-Evaluated" - The server is not evaluated against the HCL because it is exempted. * Incomplete - This means we do not have os information in Intersight for this server. Either install ucstools vib or use power shell scripts to tag proper OS information. * Not-Found - At HclStatus level, this means that one of the components has failed validation. At HclStatusDetail level, this means that his component’s hardware or software profile was not found in the HCL. * Not-Listed - At the HclStatus level, this means that some part of the HCL validation has failed. This could be that either the server’s hardware or software profile was not listed in the HCL or one of the components’ hardware or software profile was not found in the HCL. * Validated - At the HclStatus level, this means that all of the components have passed validation. At HclStatusDetail level, this means that the component’s hardware or software profile was found in the HCL. * Not-Evaluated - At the HclStatus level this means that this means that SW or Component status has not been evaluated as the previous evaluation step has not passed yet. At the HclStatusDetail level this means that either HW or SW status has not been evaluted because a previous evaluation step has not passed yet.



29
30
31
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 29

def hardware_status
  @hardware_status
end

#hcl_firmware_versionObject

The current CIMC version for the server normalized for querying HCL data. It is empty if we are missing this information.



32
33
34
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 32

def hcl_firmware_version
  @hcl_firmware_version
end

#hcl_modelObject

The managed object’s model to validate normalized for querying HCL data. It is empty if we are missing this information.



35
36
37
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 35

def hcl_model
  @hcl_model
end

#hcl_os_vendorObject

The OS Vendor for the managed object to validate normalized for querying HCL data. It is empty if we are missing this information.



38
39
40
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 38

def hcl_os_vendor
  @hcl_os_vendor
end

#hcl_os_versionObject

The OS Version for the managed object to validate normalized for querying HCL data. It is empty if we are missing this information.



41
42
43
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 41

def hcl_os_version
  @hcl_os_version
end

#hcl_processorObject

The managed object’s processor to validate if applicable normalized for querying HCL data. It is empty if we are missing this information.



44
45
46
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 44

def hcl_processor
  @hcl_processor
end

#inv_firmware_versionObject

The current CIMC version for the server as received from inventory. It is empty if we are missing this information.



47
48
49
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 47

def inv_firmware_version
  @inv_firmware_version
end

#inv_modelObject

The managed object’s model to validate as received from the inventory. It is empty if we are missing this information.



50
51
52
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 50

def inv_model
  @inv_model
end

#inv_os_vendorObject

The OS Vendor for the managed object to validate as received from inventory. It is empty if we are missing this information.



53
54
55
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 53

def inv_os_vendor
  @inv_os_vendor
end

#inv_os_versionObject

The OS Version for the managed object to validate as received from inventory. It is empty if we are missing this information.



56
57
58
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 56

def inv_os_version
  @inv_os_version
end

#inv_processorObject

The managed object’s processor to validate if applicable as received from inventory. It is empty if we are missing this information.



59
60
61
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 59

def inv_processor
  @inv_processor
end

#managed_objectObject

Returns the value of attribute managed_object.



76
77
78
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 76

def managed_object
  @managed_object
end

#object_typeObject

The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.



23
24
25
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 23

def object_type
  @object_type
end

#reasonObject

The reason for the HCL status. It will be one of the following "Missing-Os-Info" - we are missing os information in the inventory from the device connector "Incompatible-Components" - we have 1 or more components with "Not-Validated" status "Compatible" - all the components have "Validated" status. "Not-Evaluated" - The server is not evaluated against the HCL because it is exempted. * Missing-Os-Info - This means the HclStatus for the sever failed HCL validation because we have missing os information. Either install ucstools vib or use power shell scripts to tag proper OS information. * Incompatible-Components - This means the HclStatus for the sever failed HCL validation because one or more of its components failed validation. To see why components failed check the related HclStatusDetails. * Compatible - This means the HclStatus for the sever has passed HCL validation for all of its related components. * Not-Evaluated - This means the HclStatus for the sever has not been evaluated because it is exempted.



62
63
64
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 62

def reason
  @reason
end

#registered_deviceObject

Returns the value of attribute registered_device.



78
79
80
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 78

def registered_device
  @registered_device
end

#server_reasonObject

The reason generated by the server’s HCL validation. For HCL the evaluation can be seen in three logical stages 1. Evaluate the server’s hardware status 2. Evaluate the server’s software status 3. Evaluate the server’s components (each component has its own hardware/software evaluation) The evaluation does not proceed to the next stage until the previous stage is evaluated. Therefore there can be only one validation reason. "Incompatible-Server" - the server model is not listed in the HCL. "Incompatible-Processor" - the server model and processor combination is not listed in HCL. "Incompatible-Firmware" - the server model, processor and server firmware is not listed in HCL. "Missing-Os-Info" - the os vendor and version is not listed in HCL with the HW profile. "Incompatible-Os-Info" - the os vendor and version is not listed in HCL with the HW profile. "Incompatible-Components" - there is one or more components with "Not-Validated" status "Service-Unavailable" - HCL data service is unavailable at the moment (try again later). "Compatible" - the server and all its components are validated. "Not-Evaluated" - The server is not evaluated against the HCL because it is exempted. * Missing-Os-Driver-Info - The validation failed becaue the given server has no OS driver information available in the inventory. Either install UCS Tools VIB on the host ESXi or use OS Discovery Tool scripts to provide proper OS information. * Incompatible-Server - The validation failed for this server because the server’s model was not listed in the HCL. * Incompatible-Processor - The validation failed because the given processor was not listed for the given server model. * Incompatible-Os-Info - The validation failed because the given OS vendor or version was not listed in HCL for the server PID and processor combination. * Incompatible-Firmware - The validation failed because the given server firmware was not listed in the HCL for the given server PID, processor, OS vendor and version. * Service-Unavailable - The validation has failed because HCL data service is temporarily not available. The server will be re-evaluated once HCL data service is back online or finished importing new HCL data. * Service-Error - The validation has failed because the HCL data service has returned a service error or unrecognized result. * Not-Evaluated - This means the HclStatus for the sever has not been evaluated because it is exempted. * Incompatible-Components - The validation has failed for this server because one or more components have "Not-Listed" status. * Compatible - The validation has passed for this server’s model, processor, OS vendor and version.



65
66
67
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 65

def server_reason
  @server_reason
end

#software_statusObject

The OS vendor and version are considered part of the software profile for the server. This will provide the HCL validation status for the software profile. For the failure reason see the serverReason property. The status can be be one of the following "Validated" - The os vendor/version is listed in the HCL for the server model, processor and firmware "Not-Listed" - The os vendor/version is not listed in the HCL for the server model, processor and firmware "Incomplete" - The inventory is missing os vendor/version and HCL validation was not performed. "Not-Evaluated" - The server is not evaluated against the HCL because it is exempted. * Incomplete - This means we do not have os information in Intersight for this server. Either install ucstools vib or use power shell scripts to tag proper OS information. * Not-Found - At HclStatus level, this means that one of the components has failed validation. At HclStatusDetail level, this means that his component’s hardware or software profile was not found in the HCL. * Not-Listed - At the HclStatus level, this means that some part of the HCL validation has failed. This could be that either the server’s hardware or software profile was not listed in the HCL or one of the components’ hardware or software profile was not found in the HCL. * Validated - At the HclStatus level, this means that all of the components have passed validation. At HclStatusDetail level, this means that the component’s hardware or software profile was found in the HCL. * Not-Evaluated - At the HclStatus level this means that this means that SW or Component status has not been evaluated as the previous evaluation step has not passed yet. At the HclStatusDetail level this means that either HW or SW status has not been evaluted because a previous evaluation step has not passed yet.



68
69
70
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 68

def software_status
  @software_status
end

#statusObject

The HCL compatibility status of the managed object. The status can be one of the following "Incomplete" - there is no enough information to evaluate against the HCL data "Validated" - all components have been evaluated against the HCL and they all have "Validated" status "Not-Listed" - all components have been evaluated against the HCL and one or more have "Not-Listed" status. "Not-Evaluated" - server is not evaluated against the HCL because it is exempted. * Incomplete - This means we do not have os information in Intersight for this server. Either install ucstools vib or use power shell scripts to tag proper OS information. * Not-Found - At HclStatus level, this means that one of the components has failed validation. At HclStatusDetail level, this means that his component’s hardware or software profile was not found in the HCL. * Not-Listed - At the HclStatus level, this means that some part of the HCL validation has failed. This could be that either the server’s hardware or software profile was not listed in the HCL or one of the components’ hardware or software profile was not found in the HCL. * Validated - At the HclStatus level, this means that all of the components have passed validation. At HclStatusDetail level, this means that the component’s hardware or software profile was found in the HCL. * Not-Evaluated - At the HclStatus level this means that this means that SW or Component status has not been evaluated as the previous evaluation step has not passed yet. At the HclStatusDetail level this means that either HW or SW status has not been evaluted because a previous evaluation step has not passed yet.



71
72
73
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 71

def status
  @status
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)



135
136
137
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 135

def self.acceptable_attribute_map
  attribute_map.merge(superclass.acceptable_attribute_map)
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about, including the ones defined in its parent(s)



130
131
132
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 130

def self.acceptable_attributes
  attribute_map.values.concat(superclass.acceptable_attributes)
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 103

def self.attribute_map
  {
    :'class_id' => :'ClassId',
    :'object_type' => :'ObjectType',
    :'component_status' => :'ComponentStatus',
    :'hardware_status' => :'HardwareStatus',
    :'hcl_firmware_version' => :'HclFirmwareVersion',
    :'hcl_model' => :'HclModel',
    :'hcl_os_vendor' => :'HclOsVendor',
    :'hcl_os_version' => :'HclOsVersion',
    :'hcl_processor' => :'HclProcessor',
    :'inv_firmware_version' => :'InvFirmwareVersion',
    :'inv_model' => :'InvModel',
    :'inv_os_vendor' => :'InvOsVendor',
    :'inv_os_version' => :'InvOsVersion',
    :'inv_processor' => :'InvProcessor',
    :'reason' => :'Reason',
    :'server_reason' => :'ServerReason',
    :'software_status' => :'SoftwareStatus',
    :'status' => :'Status',
    :'details' => :'Details',
    :'managed_object' => :'ManagedObject',
    :'registered_device' => :'RegisteredDevice'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



469
470
471
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 469

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



174
175
176
177
178
179
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 174

def self.openapi_all_of
  [
  :'CondHclStatusAllOf',
  :'MoBaseMo'
  ]
end

.openapi_discriminator_nameObject

discriminator’s property name in OpenAPI v3



182
183
184
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 182

def self.openapi_discriminator_name
  :'ClassId'
end

.openapi_nullableObject

List of attributes with nullable: true



167
168
169
170
171
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 167

def self.openapi_nullable
  Set.new([
    :'details',
  ])
end

.openapi_typesObject

Attribute type mapping.



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 140

def self.openapi_types
  {
    :'class_id' => :'String',
    :'object_type' => :'String',
    :'component_status' => :'String',
    :'hardware_status' => :'String',
    :'hcl_firmware_version' => :'String',
    :'hcl_model' => :'String',
    :'hcl_os_vendor' => :'String',
    :'hcl_os_version' => :'String',
    :'hcl_processor' => :'String',
    :'inv_firmware_version' => :'String',
    :'inv_model' => :'String',
    :'inv_os_vendor' => :'String',
    :'inv_os_version' => :'String',
    :'inv_processor' => :'String',
    :'reason' => :'String',
    :'server_reason' => :'String',
    :'software_status' => :'String',
    :'status' => :'String',
    :'details' => :'Array<CondHclStatusDetailRelationship>',
    :'managed_object' => :'InventoryBaseRelationship',
    :'registered_device' => :'AssetDeviceRegistrationRelationship'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 428

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      class_id == o.class_id &&
      object_type == o.object_type &&
      component_status == o.component_status &&
      hardware_status == o.hardware_status &&
      hcl_firmware_version == o.hcl_firmware_version &&
      hcl_model == o.hcl_model &&
      hcl_os_vendor == o.hcl_os_vendor &&
      hcl_os_version == o.hcl_os_version &&
      hcl_processor == o.hcl_processor &&
      inv_firmware_version == o.inv_firmware_version &&
      inv_model == o.inv_model &&
      inv_os_vendor == o.inv_os_vendor &&
      inv_os_version == o.inv_os_version &&
      inv_processor == o.inv_processor &&
      reason == o.reason &&
      server_reason == o.server_reason &&
      software_status == o.software_status &&
      status == o.status &&
      details == o.details &&
      managed_object == o.managed_object &&
      registered_device == o.registered_device && super(o)
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 500

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = IntersightClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



571
572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 571

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 476

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  super(attributes)
  CondHclStatus.openapi_types.each_pair do |key, type|
    if attributes[CondHclStatus.attribute_map[key]].nil? && CondHclStatus.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[CondHclStatus.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[CondHclStatus.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[CondHclStatus.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[CondHclStatus.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


456
457
458
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 456

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



462
463
464
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 462

def hash
  [class_id, object_type, component_status, hardware_status, hcl_firmware_version, hcl_model, hcl_os_vendor, hcl_os_version, hcl_processor, inv_firmware_version, inv_model, inv_os_vendor, inv_os_version, inv_processor, reason, server_reason, software_status, status, details, managed_object, registered_device].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 309

def list_invalid_properties
  invalid_properties = super
  if @class_id.nil?
    invalid_properties.push('invalid value for "class_id", class_id cannot be nil.')
  end

  if @object_type.nil?
    invalid_properties.push('invalid value for "object_type", object_type cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



547
548
549
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 547

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 553

def to_hash
  hash = super
  CondHclStatus.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = CondHclStatus.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



541
542
543
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 541

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
# File 'lib/intersight_client/models/cond_hcl_status.rb', line 324

def valid?
  return false if @class_id.nil?
  class_id_validator = EnumAttributeValidator.new('String', ["cond.HclStatus"])
  return false unless class_id_validator.valid?(@class_id)
  return false if @object_type.nil?
  object_type_validator = EnumAttributeValidator.new('String', ["cond.HclStatus"])
  return false unless object_type_validator.valid?(@object_type)
  component_status_validator = EnumAttributeValidator.new('String', ["Incomplete", "Not-Found", "Not-Listed", "Validated", "Not-Evaluated"])
  return false unless component_status_validator.valid?(@component_status)
  hardware_status_validator = EnumAttributeValidator.new('String', ["Incomplete", "Not-Found", "Not-Listed", "Validated", "Not-Evaluated"])
  return false unless hardware_status_validator.valid?(@hardware_status)
  reason_validator = EnumAttributeValidator.new('String', ["Missing-Os-Info", "Incompatible-Components", "Compatible", "Not-Evaluated"])
  return false unless reason_validator.valid?(@reason)
  server_reason_validator = EnumAttributeValidator.new('String', ["Missing-Os-Driver-Info", "Incompatible-Server", "Incompatible-Processor", "Incompatible-Os-Info", "Incompatible-Firmware", "Service-Unavailable", "Service-Error", "Not-Evaluated", "Incompatible-Components", "Compatible"])
  return false unless server_reason_validator.valid?(@server_reason)
  software_status_validator = EnumAttributeValidator.new('String', ["Incomplete", "Not-Found", "Not-Listed", "Validated", "Not-Evaluated"])
  return false unless software_status_validator.valid?(@software_status)
  status_validator = EnumAttributeValidator.new('String', ["Incomplete", "Not-Found", "Not-Listed", "Validated", "Not-Evaluated"])
  return false unless status_validator.valid?(@status)
  true && super
end