From 7b4fb5d4f0c383c855eba52e4a75f149f528962d Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Mon, 11 Sep 2017 16:56:23 +0300 Subject: [PATCH] Don't return local IPs. Return computer fqdn for further information --- chaos_monkey/system_info/__init__.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/chaos_monkey/system_info/__init__.py b/chaos_monkey/system_info/__init__.py index 728dd8966..fd1aa807f 100644 --- a/chaos_monkey/system_info/__init__.py +++ b/chaos_monkey/system_info/__init__.py @@ -46,7 +46,11 @@ class InfoCollector(object): self.info = {} def get_hostname(self): - self.info['hostname'] = socket.gethostname() + """ + Adds the computer hostname to the system information. + :return: + """ + self.info['hostname'] = socket.getfqdn() def get_process_list(self): processes = {} @@ -72,4 +76,9 @@ class InfoCollector(object): self.info['process_list'] = processes def get_network_info(self): - self.info['network'] = {'subnets': get_host_subnets(), 'local_ips': local_ips()} + """ + Adds network information from the host to the system information. + Currently returns a list of networks accessible from host, containing host ip and the subnet range. + :return: None + """ + self.info['network_info'] = {'networks': get_host_subnets()}