X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=python%2Flist_servers.py;h=6d22a563bfe1acacfde52224a72a6876e1717af9;hb=367c391a61091817cf34475f91a23ca286eec334;hp=e7bd2af9a27ed5c5a205dc60678a77bffd30da10;hpb=69da835d04e741f4e85da3c473ba86c8801931fd;p=perso%2FImmae%2FProjets%2FPuppet.git diff --git a/python/list_servers.py b/python/list_servers.py index e7bd2af..6d22a56 100644 --- a/python/list_servers.py +++ b/python/list_servers.py @@ -21,3 +21,9 @@ print("OVH VPS SSD servers:") for vps in vps_list: print("\t{}".format(vps)) +import hetzner_helper + +print("Hetzner VPS servers:") +return_code, json = hetzner_helper.call("servers") +for server in json["servers"]: + print("\t{}: {}".format(server["name"], server["id"]))