forked from p34709852/monkey
Agent: Change IAgentRepository to ccept OperatingSystems
This was missed ind59dd81f
andffd3464d
.
This commit is contained in:
parent
a3db4142bf
commit
7b4daaa40f
|
@ -1,6 +1,8 @@
|
||||||
import abc
|
import abc
|
||||||
import io
|
import io
|
||||||
|
|
||||||
|
from common import OperatingSystems
|
||||||
|
|
||||||
# TODO: The Island also has an IAgentRepository with a totally different interface. At the moment,
|
# 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.
|
# 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
|
@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.
|
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
|
:param str architecture: Reserved
|
||||||
:return: A file-like object for the requested agent binary
|
:return: A file-like object for the requested agent binary
|
||||||
:rtype: io.BytesIO
|
:rtype: io.BytesIO
|
||||||
|
|
Loading…
Reference in New Issue