buildtest.config
¶
Module Contents¶
Classes¶
This class is an interface to buildtest configuration |
Attributes¶
- class buildtest.config.SiteConfiguration(settings_file=None)¶
This class is an interface to buildtest configuration
- _executor_check(self)¶
- _validate_cobalt_executors(self)¶
Validate cobalt queue property by running
`qstat -Ql <queue>
. If its a non-zero exit code then queue doesn’t exist otherwise it is a valid queue.
- _validate_lsf_executors(self)¶
This method validates all LSF executors. We check if queue is available and in
Open:Active
state.
- _validate_pbs_executors(self)¶
Validate pbs queue property by running by checking if queue is found and queue is ‘enabled’ and ‘started’ which are two properties found in pbs queue configuration that can be retrieved using
qstat -Q -f -F json
. The output is in the following format$ qstat -Q -f -F json { "timestamp":1615924938, "pbs_version":"19.0.0", "pbs_server":"pbs", "Queue":{ "workq":{ "queue_type":"Execution", "total_jobs":0, "state_count":"Transit:0 Queued:0 Held:0 Waiting:0 Running:0 Exiting:0 Begun:0 ", "resources_assigned":{ "mem":"0kb", "ncpus":0, "nodect":0 }, "hasnodes":"True", "enabled":"True", "started":"True" } } }
- _validate_slurm_executors(self)¶
This method will validate slurm executors, we check if partition, qos, and cluster fields are valid values by retrieving details from slurm configuration. These checks are performed on fields
partition
,qos
orcluster
if specified in executor section.
- detect_system(self)¶
This method gets current system by setting
self.target
by matchinghostnames
entry in each system list with actual system. We retrieve target hostname and determine which system configuration to use. If no system is found we raise an error.
- property file(self)¶
- load(self)¶
Loads configuration file
- name(self)¶
Return name of matched system from configuration file
- resolve(self)¶
This method will resolve path to configuration file. The order of precedence is as follows:
command line argument - Must be valid path
User Configuration: $HOME/.buildtest/config.yml
Default Configuration: $BUILDTEST_ROOT/buildtest/settings/config.yml
- validate(self, validate_executors=True)¶
This method validates the site configuration with schema
- buildtest.config.logger¶