forked from p15670423/monkey
Island: Add reset_machine_repository
This commit is contained in:
parent
36142774dd
commit
35025ead18
|
@ -1 +1,2 @@
|
|||
from .reset_agent_configuration import reset_agent_configuration
|
||||
from .reset_machine_repository import reset_machine_repository
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
from monkey_island.cc.repository import IMachineRepository, initialize_machine_repository
|
||||
|
||||
|
||||
class reset_machine_repository:
|
||||
"""
|
||||
Callable class that handles reset and reinitialization of IMachineRepository
|
||||
"""
|
||||
|
||||
def __init__(self, machine_repository: IMachineRepository):
|
||||
self._machine_repository = machine_repository
|
||||
|
||||
def __call__(self):
|
||||
self._machine_repository.reset()
|
||||
initialize_machine_repository(self._machine_repository)
|
Loading…
Reference in New Issue