monkey/envs/monkey_zoo/blackbox/analyzers/communication_analyzer.py

17 lines
528 B
Python
Raw Normal View History

2019-08-29 23:18:25 +08:00
class CommunicationAnalyzer(object):
def __init__(self, island_client, machines):
self.island_client = island_client
self.machines = machines
def analyze_test_results(self):
for machine in self.machines:
if self.did_monkey_communicate_back(machine):
print("Monkey from {} communicated back".format(machine))
def did_monkey_communicate_back(self, monkey_ip):
request = self.island_client.send_get_request("api/telemetry", {'telem_category': 'state'})