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)
-
- (ResourceManager) initialize(type)
constructor
Initializes the ResourceManager with a matching adapter.
-
- (Integer) total_cpu_cores
Returns the total number of cpu cores available on the system.
Constructor Details
- (ResourceManager) initialize(type)
Initializes the ResourceManager with a matching adapter
36 37 38 39 40 41 42 43 44 |
# File 'lib/wf_node_api/resource_manager.rb', line 36 def initialize(type) @resman = nil if type == 'linux' @resman = ResourceManagerAdapter::Linux.new else raise ArgumentError, 'invalid resourcemanager type supplied' end end |
Instance Method Details
- (Integer) total_cpu_cores
Returns the total number of cpu cores available on the system
49 50 51 |
# File 'lib/wf_node_api/resource_manager.rb', line 49 def total_cpu_cores @resman.total_cpu_cores end |