bugscpp.processor.core.command.DockerCommand¶
- class DockerCommand(parser: argparse.ArgumentParser)[source]¶
Bases:
bugscpp.processor.core.command.Command
Executes each command of DockerCommandLine one by one inside a docker container. Inherit from this class to implement a new command that should be run inside a docker.
- __call__ : None
Execute commands.
Methods
__init__
(parser)create_script_generator
(args)Return DockerExecInfo which has information of a command list to run inside docker container.
setup
(generator)Invoked before container is created.
teardown
(generator)Invoked after container is destroyed.
Attributes
SCRIPT_NAME
Represent the group of this command.
Description of this command.
- abstract create_script_generator(args: argparse.Namespace) bugscpp.processor.core.command.DockerCommandScriptGenerator [source]¶
Return DockerExecInfo which has information of a command list to run inside docker container.
- Parameters
args (argparse.Namespace) – argparse.Namespace instance.
- Returns
An instance of generator class which is used to create DockerCommandScript.
- Return type
- property group: str¶
Represent the group of this command. It is not meaningful yet.
- property help: str¶
Description of this command.
- abstract setup(generator: bugscpp.processor.core.command.DockerCommandScriptGenerator)[source]¶
Invoked before container is created.
- Parameters
generator (DockerCommandScriptGenerator) – The current instance being used.
- abstract teardown(generator: bugscpp.processor.core.command.DockerCommandScriptGenerator)[source]¶
Invoked after container is destroyed.
- Parameters
generator (DockerCommandScriptGenerator) – The current instance being used.