aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-03 22:24:19 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-03-04 12:32:55 +0100
commit85abd2fdbad83430df4824843764719064afb9b4 (patch)
tree767792a5691b3b253508a87362cde079a4a6f8fb /python
parenta77b768abb31be9e19563e130d763f163496477d (diff)
downloadPuppet-85abd2fdbad83430df4824843764719064afb9b4.tar.gz
Puppet-85abd2fdbad83430df4824843764719064afb9b4.tar.zst
Puppet-85abd2fdbad83430df4824843764719064afb9b4.zip
Fetch node informations from LDAP
environment, hostname
Diffstat (limited to 'python')
-rw-r--r--python/list_servers.py12
1 files changed, 12 insertions, 0 deletions
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 @@
1try:
2 from ovh import ovh
3except ImportError:
4 # In case it's installed globally
5 import ovh
6
7client = ovh.Client()
8
9vps_list = client.get('/vps/')
10
11for vps in vps_list:
12 print(vps)