def proxies(self):
""" Returns all the proxies registered in the server """
proxies = APIConsumer.get("/proxies").json()
proxies_dict = {}
for name, values in viewitems(proxies):
# Lets create a Proxy object to hold all its data
proxy = Proxy(**values)
# Add the new proxy to the toxiproxy proxies collection
proxies_dict.update({name: proxy})
return proxies_dict
评论列表
文章目录