Method: ManageEngine::APMConnector#response_action

Defined in:
lib/agent/server/am_connector.rb

#response_action(rCode) ⇒ Object



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/agent/server/am_connector.rb', line 141

def response_action rCode
  case rCode
  when @obj.constants.licence_expired then
    @obj.log.info "License Expired. Going to shutdown"
    raise Exception.new("License Expired. Going to shutdown")
  when @obj.constants.licence_exceeds then
    @obj.log.info "License Exceeds. Going to shutdown"
    raise Exception.new("License Exceeds. Going to shutdown")
  when @obj.constants.delete_agent then
    @obj.log.info "Action from Server - Delete the Agent. Going to shutdown and remove the Agent"
    deleteAgent
    raise Exception.new("Action from Server - Delete the Agent. Going to shutdown and remove the Agent")
  when @obj.constants.unmanage_agent then
    @obj.log.info "Action from Server - Unmanage the Agent. Going to  Stop the DC - Disabling the Agent"
    unManage
  when @obj.constants.manage_agent then
    @obj.log.info "Action from Server - Manage the Agent. Going to Sart the DC - Enabling the Agent"
    manage  
  end
end