Class: Orchestrator::Module
- Inherits:
-
Couchbase::Model
- Object
- Couchbase::Model
- Orchestrator::Module
- Includes:
- CouchbaseId::Generator
- Defined in:
- app/models/orchestrator/module.rb
Class Method Summary collapse
-
.all ⇒ Object
Loads all the modules for this node.
-
.dependent_on(dep_id) ⇒ Object
Finds all the modules belonging to a particular dependency.
Instance Method Summary collapse
-
#hostname ⇒ Object
Device module.
- #hostname=(host) ⇒ Object
-
#manager ⇒ Object
helper method for looking up the manager.
Class Method Details
.all ⇒ Object
Loads all the modules for this node
49 50 51 52 |
# File 'app/models/orchestrator/module.rb', line 49 def self.all # ascending order by default (device, service then logic) by_module_type(stale: false) end |
.dependent_on(dep_id) ⇒ Object
Finds all the modules belonging to a particular dependency
56 57 58 |
# File 'app/models/orchestrator/module.rb', line 56 def self.dependent_on(dep_id) by_dependency({key: dep_id, stale: false}) end |
Instance Method Details
#hostname ⇒ Object
Device module
18 |
# File 'app/models/orchestrator/module.rb', line 18 def hostname; ip; end |
#hostname=(host) ⇒ Object
19 |
# File 'app/models/orchestrator/module.rb', line 19 def hostname=(host); ip = host; end |
#manager ⇒ Object
helper method for looking up the manager
43 44 45 |
# File 'app/models/orchestrator/module.rb', line 43 def manager ::Orchestrator::Control.instance.loaded? self.id end |