CLI Package¶
CLI Package¶
This package contains all CLI related modules:
- The applications
- The argument parser
- The application launcher
HPCStatsApp Module¶
This module contains the HPCStatsApp class.
- 
class HPCStats.CLI.HPCStatsApp.HPCStatsApp(conf, cluster_name)¶
- Bases: - object- Abstract HPCStats application class, parent of all real application classes (Importer, Reporter). - 
new_db()¶
- Returns a new HPCStatsDB object. 
 - 
run()¶
- Run method that should be implemented by all real App classes. For this abstract class, it raises NotImplementedError. 
 - 
run_check()¶
- Pre-run checks 
 
- 
HPCStatsArgumentParser Module¶
This module contains the HPCStatsArgumentParser class.
- 
class HPCStats.CLI.HPCStatsArgumentParser.HPCStatsArgumentParser(*args, **kwargs)¶
- Bases: - argparse.ArgumentParser- This class inherits the Python standard ArgumentParser class, it implements the CLI argument parser for the HPCStats program. - 
add_args()¶
- Add all arguments with their constraints to the parser. 
 - 
parse_args(*args, **kwargs)¶
- Call parent class parse_args() method and do more specifics arguments coherency checks. 
 
- 
HPCStatsChecker Module¶
This module contains the HPCStatsChecker class.
- 
class HPCStats.CLI.HPCStatsChecker.HPCStatsChecker(conf, cluster_name)¶
- Bases: - HPCStats.CLI.HPCStatsApp.HPCStatsApp- HPCStats Checker application which checks all data sources availability. - 
check_cluster_sources(db, cluster_name)¶
- Check data sources for a cluster. 
 - 
cleanup()¶
- Clean-up the application before exit. 
 - 
run()¶
- Run HPCStats Checker application. 
 
- 
HPCStatsImporter Module¶
This module contains the HPCStatsImporter class.
- 
class HPCStats.CLI.HPCStatsImporter.HPCStatsImporter(conf, cluster_name, params)¶
- Bases: - HPCStats.CLI.HPCStatsApp.HPCStatsApp- HPCStats Importer application which import data from various sources and update the database. - 
cleanup()¶
- Clean-up the application before exit. 
 - 
import_cluster_data(db, cluster_name)¶
- Import from sources all data specific to a cluster. 
 - 
run()¶
- Run HPCStats Importer application. 
 
- 
HPCStatsLauncher Module¶
HPCStatsModifier Module¶
This module contains the HPCStatsModifier class.
- 
class HPCStats.CLI.HPCStatsModifier.HPCStatsModifier(conf, cluster_name, params)¶
- Bases: - HPCStats.CLI.HPCStatsApp.HPCStatsApp- HPCStats Modifier application is used to modify BusinessCodes, Projects and Domains data in HPCStats DB. - 
cleanup()¶
- Clean-up the application before exit. 
 - 
create_domain(domain_key, domain_name)¶
- Creates the domain whose key and name are given in parameters. It raises HPCStatsRuntimeError if another Domain with the same key already exists in DB. 
 - 
run()¶
- Run HPCStats Updater application. 
 - 
set_business_code_description(business_code, description)¶
- Modify in DB the description of the Business code given in parameter. It raises HPCStatsRuntimeError if the Business code is not found in DB. 
 - 
set_project_description(project_code, description)¶
- Modify in DB the description of the Project given in parameter. It raises HPCStatsRuntimeError if the Project is not found in DB. 
 - 
set_project_domain(project_code, domain_key)¶
- Modify the Domain of the Project whose code is given in parameter. It raises HPCStatsRuntimeError if either the Project code or the Domain key are not found in DB. 
 
-