From 860eb1b65c9c2be0f9a18c0d46ab4daee810eac7 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Thu, 4 Aug 2022 12:43:24 +0530 Subject: [PATCH] Island: Simply return IPs list instead of mapping in IpAddresses resource --- monkey/monkey_island/cc/resources/ip_addresses.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/resources/ip_addresses.py b/monkey/monkey_island/cc/resources/ip_addresses.py index 653aaf93d..b64a032f9 100644 --- a/monkey/monkey_island/cc/resources/ip_addresses.py +++ b/monkey/monkey_island/cc/resources/ip_addresses.py @@ -1,4 +1,4 @@ -from typing import Mapping, Sequence +from typing import Sequence from monkey_island.cc.resources.AbstractResource import AbstractResource from monkey_island.cc.resources.request_authentication import jwt_required @@ -11,11 +11,11 @@ class IpAddresses(AbstractResource): self._local_ips = local_ip_addresses @jwt_required - def get(self) -> Mapping[str, Sequence[str]]: + def get(self) -> Sequence[str]: """ Gets the IP addresses of the Island network interfaces :return: a dictionary with "ip_addresses" key that points to a list of IP's """ - return {"ip_addresses": self._local_ips} + return self._local_ips