flux.cli.plugins.shape module
- class flux.cli.plugins.shape.ShapePlugin(prog, prefix='resources')
Bases:
CLIPluginWrap the functionality provided by the command-line job shape parser into a command-line plugin users can optionally prepend to their FLUX_CLI_PLUGINPATH. As a convenience for users, also provide options for specifying json files on the command-line that will get absorbed into the submitted jobspec.
- modify_jobspec(args, jobspec)
Allow plugin to modify jobspec
This function is called after arguments have been parsed and jobspec has mostly been initialized.
- Parameters
args (
Namespace) -- Namespace result fromArgparse.ArgumentParser.parse_args().jobspec (
flux.job.Jobspec) -- instantiated jobspec object. This plugin can modify this object directly to enact changes in the current programs generated jobspec.
- preinit(args)
After parsing options, before jobspec is initialized