Module: OSC::Reservations
- Defined in:
- lib/osc/reservations.rb,
lib/osc/reservations/node.rb,
lib/osc/reservations/batch.rb,
lib/osc/reservations/query.rb,
lib/osc/reservations/adapter.rb,
lib/osc/reservations/version.rb,
lib/osc/reservations/reservation.rb,
lib/osc/reservations/adapters/osc_moab.rb
Overview
The main namespace for OSC::Reservations. Provides the ability to submit and read back reservations to the local batch scheduler.
Defined Under Namespace
Modules: Adapters Classes: Adapter, Batch, Node, Query, Reservation
Constant Summary collapse
- CONFIG_ROOT =
Path to batch server configuration file.
File.("../../../config", __FILE__)
- VERSION =
The current version of OSC::Reservations.
"1.0.4"
Class Method Summary collapse
-
.batch_config ⇒ Hash
Hash generated from reading the batch config yaml file.
-
.batch_config_path ⇒ String
Path to the batch config yaml file describing the batch servers for local batch schedulers.
-
.batch_config_path=(path) ⇒ Object
Set the path to the batch config yaml file.
-
.default_batch_config_path ⇒ String
Default path to the batch config yaml file.
Class Method Details
.batch_config ⇒ Hash
Hash generated from reading the batch config yaml file.
41 42 43 |
# File 'lib/osc/reservations.rb', line 41 def self.batch_config YAML.load_file(batch_config_path) end |
.batch_config_path ⇒ String
Path to the batch config yaml file describing the batch servers for local batch schedulers.
29 30 31 |
# File 'lib/osc/reservations.rb', line 29 def self.batch_config_path @batch_config_path ||= default_batch_config_path end |
.batch_config_path=(path) ⇒ Object
Set the path to the batch config yaml file.
35 36 37 |
# File 'lib/osc/reservations.rb', line 35 def self.batch_config_path=(path) @batch_config_path = File.(path) end |
.default_batch_config_path ⇒ String
Default path to the batch config yaml file.
20 21 22 23 24 |
# File 'lib/osc/reservations.rb', line 20 def self.default_batch_config_path host_config = File.("#{CONFIG_ROOT}/#{Socket.gethostname}.yml") default_config = File.("#{CONFIG_ROOT}/batch.yml") File.file?(host_config) ? host_config : default_config end |