diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-03 22:24:19 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-04 12:32:55 +0100 |
commit | 85abd2fdbad83430df4824843764719064afb9b4 (patch) | |
tree | 767792a5691b3b253508a87362cde079a4a6f8fb /python | |
parent | a77b768abb31be9e19563e130d763f163496477d (diff) | |
download | Puppet-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.py | 12 |
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 @@ | |||
1 | try: | ||
2 | from ovh import ovh | ||
3 | except ImportError: | ||
4 | # In case it's installed globally | ||
5 | import ovh | ||
6 | |||
7 | client = ovh.Client() | ||
8 | |||
9 | vps_list = client.get('/vps/') | ||
10 | |||
11 | for vps in vps_list: | ||
12 | print(vps) | ||