Class: MiqAeMethodService::MiqAeServiceEmsCluster

Inherits:
MiqAeServiceModelBase show all
Defined in:
lib/miq_automation_engine/service_models/miq_ae_service_ems_cluster.rb

Constant Summary

Constants inherited from MiqAeServiceModelBase

MiqAeMethodService::MiqAeServiceModelBase::DELIMS, MiqAeMethodService::MiqAeServiceModelBase::EXPOSED_ATTR_BLACK_LIST, MiqAeMethodService::MiqAeServiceModelBase::SERVICE_MODEL_GLOB, MiqAeMethodService::MiqAeServiceModelBase::SERVICE_MODEL_PATH, MiqAeMethodService::MiqAeServiceModelBase::UNWISE

Instance Method Summary collapse

Methods inherited from MiqAeServiceModelBase

ar_base_model, ar_method, #ar_method, association, association=, associations, #associations, base_class, base_model, inherited, #initialize, #inspect, #inspect_all, method_missing, #method_missing, model_name_from_active_record_model, model_name_from_file, #model_suffix, normalize, #object_class, #object_send, #reload, respond_to_missing?, service_models, #tag_assign, #tag_unassign, #taggable?, taggable?, #tagged_with?, #tags, #virtual_column_names, #virtual_columns_inspect, wrap_results, #wrap_results

Methods included from Vmdb::Logging

#_log

Methods included from MiqAeServiceObjectCommon

#[], #[]=, #attributes, #attributes=, #class_name, #current_field_name, #current_field_type, #current_message, #decrypt, #id, #instance_name, #name, #namespace, #parent

Constructor Details

This class inherits a constructor from MiqAeMethodService::MiqAeServiceModelBase

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MiqAeMethodService::MiqAeServiceModelBase

Instance Method Details

#register_host(host) ⇒ Object


14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/miq_automation_engine/service_models/miq_ae_service_ems_cluster.rb', line 14

def register_host(host)
  ar_method do
    MiqQueue.put(
      :class_name  => @object.class.name,
      :instance_id => @object.id,
      :method_name => "register_host",
      :zone        => @object.my_zone,
      :role        => "ems_operations",
      :args        => [host.id]
    )
    true
  end
end