diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-16 19:14:29 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-03-16 20:13:46 +0100 |
commit | 69da835d04e741f4e85da3c473ba86c8801931fd (patch) | |
tree | 0cfb28cfd468a5b681f2b5af2b935c81d2221950 /python/list_servers.py | |
parent | c15f2234474ff8a8266e26856702b3c561050667 (diff) | |
download | Puppet-69da835d04e741f4e85da3c473ba86c8801931fd.tar.gz Puppet-69da835d04e741f4e85da3c473ba86c8801931fd.tar.zst Puppet-69da835d04e741f4e85da3c473ba86c8801931fd.zip |
Merge install scripts
Diffstat (limited to 'python/list_servers.py')
-rw-r--r-- | python/list_servers.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/python/list_servers.py b/python/list_servers.py index 9b8bc64..e7bd2af 100644 --- a/python/list_servers.py +++ b/python/list_servers.py | |||
@@ -6,7 +6,18 @@ except ImportError: | |||
6 | 6 | ||
7 | client = ovh.Client() | 7 | client = ovh.Client() |
8 | 8 | ||
9 | print("OVH cloud instances:") | ||
10 | projects_list = client.get('/cloud/project/') | ||
11 | for project_id in projects_list: | ||
12 | project = client.get('/cloud/project/{}'.format(project_id)) | ||
13 | print("\t{}:".format(project["description"])) | ||
14 | instances_list = client.get('/cloud/project/{}/instance'.format(project_id)) | ||
15 | for instance in instances_list: | ||
16 | print("\t\t{}: {}".format(instance["name"], instance["id"])) | ||
17 | |||
9 | vps_list = client.get('/vps/') | 18 | vps_list = client.get('/vps/') |
10 | 19 | ||
20 | print("OVH VPS SSD servers:") | ||
11 | for vps in vps_list: | 21 | for vps in vps_list: |
12 | print(vps) | 22 | print("\t{}".format(vps)) |
23 | |||