From 85abd2fdbad83430df4824843764719064afb9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 3 Mar 2018 22:24:19 +0100 Subject: Fetch node informations from LDAP environment, hostname --- python/list_servers.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 python/list_servers.py (limited to 'python') diff --git a/python/list_servers.py b/python/list_servers.py new file mode 100644 index 0000000..9b8bc64 --- /dev/null +++ b/python/list_servers.py @@ -0,0 +1,12 @@ +try: + from ovh import ovh +except ImportError: + # In case it's installed globally + import ovh + +client = ovh.Client() + +vps_list = client.get('/vps/') + +for vps in vps_list: + print(vps) -- cgit v1.2.3