Class: ResourceManager
- Inherits:
-
Object
- Object
- ResourceManager
- Defined in:
- lib/wf_node_api/resource_manager.rb
Overview
Top level class for resource management
Instance Method Summary collapse
-
#initialize(type) ⇒ ResourceManager
constructor
Initializes the ResourceManager with a matching adapter.
-
#total_cpu_cores ⇒ Integer
Returns the total number of cpu cores available on the system.
Constructor Details
#initialize(type) ⇒ ResourceManager
Initializes the ResourceManager with a matching adapter
32 33 34 35 36 37 38 39 40 |
# File 'lib/wf_node_api/resource_manager.rb', line 32 def initialize(type) @resman = nil if type == 'linux' @resman = ResourceManagerAdapter::Linux.new else raise ArgumentError, 'invalid resourcemanager type supplied' end end |
Instance Method Details
#total_cpu_cores ⇒ Integer
Returns the total number of cpu cores available on the system
45 46 47 |
# File 'lib/wf_node_api/resource_manager.rb', line 45 def total_cpu_cores @resman.total_cpu_cores end |