diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-04 21:20:20 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-04 21:20:20 +0100 |
commit | 89c7d1dea4af6026af00624af77bb1a08c8ebd53 (patch) | |
tree | 6c3b46adcdadcd75aada126cacf0a36202f31e3e /python | |
parent | a77b768abb31be9e19563e130d763f163496477d (diff) | |
parent | c17e63ed33a5260ea5bf0f869d7dce39676526cb (diff) | |
download | Puppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.tar.gz Puppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.tar.zst Puppet-89c7d1dea4af6026af00624af77bb1a08c8ebd53.zip |
Merge branch 'new_node'
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) | ||