Class: Arkaan::Monitoring::Action

Inherits:
Object
  • Object
show all
Includes:
Concerns::Enumerable, Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/arkaan/monitoring/action.rb

Overview

An action is made by an authorized user on the instance of a server to perform a task.

Author:

Instance Attribute Summary collapse

Instance Attribute Details

#instanceArkaan::Monitoring::Instance

Returns the instance of a service on which the action is performed.

Returns:



22
# File 'lib/arkaan/monitoring/action.rb', line 22

embedded_in :instance, class_name: 'Arkaan::Monitoring::Instance', inverse_of: :actions

#successBoolean

Returns TRUE if the action succeeded (or at least was successfully launched), FALSE otherwise.

Returns:

  • (Boolean)

    TRUE if the action succeeded (or at least was successfully launched), FALSE otherwise.



15
# File 'lib/arkaan/monitoring/action.rb', line 15

field :success, type: Boolean, default: false

#typeSymbol

Returns the type of action you’re making on this instance.

Returns:

  • (Symbol)

    the type of action you’re making on this instance



12
# File 'lib/arkaan/monitoring/action.rb', line 12

enum_field :type, [:restart]

#userArkaan::Account

Returns the user performing the action on the instance.

Returns:



19
# File 'lib/arkaan/monitoring/action.rb', line 19

belongs_to :user, class_name: 'Arkaan::Account'