]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - python/list_servers.py
Fetch node informations from LDAP
[perso/Immae/Projets/Puppet.git] / python / list_servers.py
diff --git a/python/list_servers.py b/python/list_servers.py
new file mode 100644 (file)
index 0000000..9b8bc64
--- /dev/null
@@ -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)