virtuaservices 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ffd83b8df86f7ab7232870ca7fe41f470cc5abd22a0e1897f676789e14e0fb65
|
|
4
|
+
data.tar.gz: 4e82e446842bec3b9a1910c0be183863d824dbb251ba2861097a401203d92edd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af088a54dff32f4aad0de454c0f30c2c40bddfc6238dd1c594285ce639e56a1ddbbb9b7ac3b8413611065a49576c44aabe86829396f14977d6a25f6502b8031f
|
|
7
|
+
data.tar.gz: b82e088353bf2b763056d67edd8fc0d6ea254c05b1e6283e08f84434692bfaefaafe7089ba7611349754ac740d4d62230d09c0a8671c9b52a781f2b099d99785
|
|
@@ -2,7 +2,6 @@ module Virtuaservices
|
|
|
2
2
|
# The monitoring module holds all the logic about the services so they can be activated or deactivated.
|
|
3
3
|
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
|
4
4
|
module Monitoring
|
|
5
|
-
autoload :Action , 'virtuaservices/monitoring/action'
|
|
6
5
|
autoload :Gateway , 'virtuaservices/monitoring/gateway'
|
|
7
6
|
autoload :Instance , 'virtuaservices/monitoring/instance'
|
|
8
7
|
autoload :Route , 'virtuaservices/monitoring/route'
|
|
@@ -23,9 +23,6 @@ module Virtuaservices
|
|
|
23
23
|
# @!attribute [r] service
|
|
24
24
|
# @return [Virtuaservices::Monitoring::Service] the service this instance is linked to.
|
|
25
25
|
embedded_in :service, class_name: 'Virtuaservices::Monitoring::Service', inverse_of: :instances
|
|
26
|
-
# @!attribute [rw] actions
|
|
27
|
-
# @return [Virtuaservices::Monitoring::Action] the actions that has been performed on the service.
|
|
28
|
-
embeds_many :actions, class_name: 'Virtuaservices::Monitoring::Action', inverse_of: :instance
|
|
29
26
|
|
|
30
27
|
validates :url,
|
|
31
28
|
presence: {message: 'required'},
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: virtuaservices
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vincent Courtois
|
|
@@ -268,7 +268,6 @@ files:
|
|
|
268
268
|
- lib/virtuaservices/concerns/sluggable.rb
|
|
269
269
|
- lib/virtuaservices/concerns/typable.rb
|
|
270
270
|
- lib/virtuaservices/monitoring.rb
|
|
271
|
-
- lib/virtuaservices/monitoring/action.rb
|
|
272
271
|
- lib/virtuaservices/monitoring/gateway.rb
|
|
273
272
|
- lib/virtuaservices/monitoring/instance.rb
|
|
274
273
|
- lib/virtuaservices/monitoring/route.rb
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
module Virtuaservices
|
|
2
|
-
module Monitoring
|
|
3
|
-
# An action is made by an authorized user on the instance of a server to perform a task.
|
|
4
|
-
# @author Vincent Courtois <courtois.vincent@outlook.com>
|
|
5
|
-
class Action
|
|
6
|
-
include Mongoid::Document
|
|
7
|
-
include Mongoid::Timestamps
|
|
8
|
-
include Virtuaservices::Concerns::Enumerable
|
|
9
|
-
|
|
10
|
-
# @!attribute [rw] type
|
|
11
|
-
# @return [Symbol] the type of action you're making on this instance
|
|
12
|
-
enum_field :type, [:restart]
|
|
13
|
-
# @!attribute [rw] success
|
|
14
|
-
# @return [Boolean] TRUE if the action succeeded (or at least was successfully launched), FALSE otherwise.
|
|
15
|
-
field :success, type: Boolean, default: false
|
|
16
|
-
|
|
17
|
-
# @!attribute [rw] user
|
|
18
|
-
# @return [Virtuaservices::Account] the user performing the action on the instance.
|
|
19
|
-
belongs_to :user, class_name: 'Virtuaservices::Account'
|
|
20
|
-
# @!attribute [rw] instance
|
|
21
|
-
# @return [Virtuaservices::Monitoring::Instance] the instance of a service on which the action is performed.
|
|
22
|
-
embedded_in :instance, class_name: 'Virtuaservices::Monitoring::Instance', inverse_of: :actions
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|