Agent: Change IAgentRepository to ccept OperatingSystems

This was missed in d59dd81f and ffd3464d.
This commit is contained in:
Mike Salvatore 2022-06-24 07:40:24 -04:00
parent a3db4142bf
commit 7b4daaa40f
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,8 @@
import abc
import io
from common import OperatingSystems
# TODO: The Island also has an IAgentRepository with a totally different interface. At the moment,
# the Island and Agent have different needs, but at some point we should unify these.
@ -13,10 +15,12 @@ class IAgentRepository(metaclass=abc.ABCMeta):
"""
@abc.abstractmethod
def get_agent_binary(self, os: str, architecture: str = None) -> io.BytesIO:
def get_agent_binary(
self, operating_system: OperatingSystems, architecture: str = None
) -> io.BytesIO:
"""
Retrieve the appropriate agent binary from the repository.
:param str os: The name of the operating system on which the agent binary will run
:param operating_system: The name of the operating system on which the agent binary will run
:param str architecture: Reserved
:return: A file-like object for the requested agent binary
:rtype: io.BytesIO