Extended code documentation

pull/2/head
Thorsten Sick 4 years ago
parent 5436768e03
commit 39be15b150

@ -46,9 +46,9 @@ def create_parser():
# Sub parser for machine creation # Sub parser for machine creation
parser_run = subparsers.add_parser("run", help="run experiments") parser_run = subparsers.add_parser("run", help="run experiments")
parser_run.set_defaults(func=run) parser_run.set_defaults(func=run)
parser_run.add_argument("--configfile", default="experiment.yaml", help="Config file to create from") parser_run.add_argument("--configfile", default="experiment.yaml", help="Config file to create the experiment from")
parser_run.add_argument("--caldera_attack", default=None, help="The id of a specific caldera attack to run") parser_run.add_argument("--caldera_attack", default=None, help="The id of a specific caldera attack to run, will override experiment configuration for attacks")
parser_run.add_argument("--caldera_attack_file", default=None, help="The file name containing a list of caldera attacks to run") parser_run.add_argument("--caldera_attack_file", default=None, help="The file name containing a list of caldera attacks to run, will override experiment configuration for attacks")
return parser return parser

@ -105,12 +105,12 @@ class MachineryPlugin(BasePlugin):
raise NotImplementedError raise NotImplementedError
def get_playground(self): def get_playground(self):
""" path where all the attack tools will be copied to on a client. Your specific machine plugin can overwrite it. """ """ Path on the machine where all the attack tools will be copied to. """
return self.config.get_playground() return self.config.get_playground()
def get_vm_name(self): def get_vm_name(self):
""" Get the name of the machine """ """ Get the specific name of the machine """
return self.config.vmname() return self.config.vmname()
@ -122,7 +122,7 @@ class MachineryPlugin(BasePlugin):
raise NotImplementedError raise NotImplementedError
def get_machine_path_external(self): def get_machine_path_external(self):
""" The path external to the vm where specific data is stored """ """ The path on the controlling host where vm specific data is stored """
return os.path.join(self.config.vagrantfilepath(), self.config.machinepath()) return os.path.join(self.config.vagrantfilepath(), self.config.machinepath())
############### ###############

Loading…
Cancel
Save