Island: Reword docstrings in ICredentialsRepository

This commit is contained in:
Mike Salvatore 2022-07-05 10:57:36 -04:00
parent 035734992c
commit cbed178549
1 changed files with 14 additions and 15 deletions

View File

@ -7,9 +7,9 @@ from monkey_island.cc.services.telemetry.processing.credentials import Credentia
class ICredentialsRepository(ABC):
def get_configured_credentials(self) -> Sequence[Credentials]:
"""
Retrieve all credentials that were configured.
Retrieve credentials that were configured.
:raises RetrievalError: If an error is encountered while attempting to retrieve configured
:raises RetrievalError: If an error is encountered while attempting to retrieve the
credentials
:return: Sequence of configured credentials
"""
@ -17,9 +17,9 @@ class ICredentialsRepository(ABC):
def save_configured_credentials(self, credentials: Credentials):
"""
Save credentials which are configured.
Save credentials that were configured.
:param credentials: Credentials that are going to be stored
:param credentials: Configured Credentials to store in the repository
:raises StorageError: If an error is encountered while attempting to store configured
credentials
"""
@ -27,28 +27,27 @@ class ICredentialsRepository(ABC):
def remove_configured_credentials(self):
"""
Remove all configured credentials.
Remove credentials that were configured from the repository.
:raises RemovalError: If an error is encountered while attempting to remove configured
credentials
:raises RemovalError: If an error is encountered while attempting to remove the credentials
"""
pass
def get_stolen_credentials(self) -> Sequence[Credentials]:
"""
Retrieve credentials that are stolen
Retrieve credentials that were stolen during a simulation.
:raises RetrievalError: If an error is encountered while attempting to retrieve stolen
:raises RetrievalError: If an error is encountered while attempting to retrieve the
credentials
:return: Sequence of all stolen credentials
:return: Sequence of stolen credentials
"""
pass
def save_stolen_credentials(self, credentials: Credentials):
"""
Save credentials which are stolen.
Save credentials that were stolen during a simulation.
:param credentials: Credentials that are going to be stored
:param credentials: Stolen Credentials to store in the repository
:raises StorageError: If an error is encountered while attempting to store stolen
credentials
"""
@ -56,7 +55,7 @@ class ICredentialsRepository(ABC):
def remove_stolen_credentials(self):
"""
Remove all credentials from the repository.
Remove stolen credentials from the repository.
:raises RemovalError: If an error is encountered while attempting to remove the credentials
"""
@ -64,7 +63,7 @@ class ICredentialsRepository(ABC):
def get_all_credentials(self) -> Sequence[Credentials]:
"""
Retrieve stolen and configured credentials.
Retrieve all credentials in the repository.
:raises RetrievalError: If an error is encountered while attempting to retrieve the
credentials
@ -74,7 +73,7 @@ class ICredentialsRepository(ABC):
def remove_all_credentials(self):
"""
Remove all the credentials in the repository.
Remove all credentials in the repository.
:raises RemovalError: If an error is encountered while attempting to remove the credentials
"""