Island: Simply return IPs list instead of mapping in IpAddresses resource

This commit is contained in:
Shreya Malviya 2022-08-04 12:43:24 +05:30
parent 637c466822
commit 860eb1b65c
1 changed files with 3 additions and 3 deletions

View File

@ -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.AbstractResource import AbstractResource
from monkey_island.cc.resources.request_authentication import jwt_required from monkey_island.cc.resources.request_authentication import jwt_required
@ -11,11 +11,11 @@ class IpAddresses(AbstractResource):
self._local_ips = local_ip_addresses self._local_ips = local_ip_addresses
@jwt_required @jwt_required
def get(self) -> Mapping[str, Sequence[str]]: def get(self) -> Sequence[str]:
""" """
Gets the IP addresses of the Island network interfaces 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: a dictionary with "ip_addresses" key that points to a list of IP's
""" """
return {"ip_addresses": self._local_ips} return self._local_ips