Skip to content

Commit 7d356d8

Browse files
committed
Add list hosts
1 parent 866dccd commit 7d356d8

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

libcloud/compute/drivers/openstack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4436,6 +4436,7 @@ def _to_host(self, obj):
44364436
service_name=obj["service_name"],
44374437
)
44384438

4439+
44394440
class OpenStack_2_Host:
44404441
"""
44414442
Host info.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"hosts": [
3+
{
4+
"id": "1",
5+
"hypervisor_hostname": "compute-1",
6+
"hypervisor_type": "QEMU",
7+
"hypervisor_version": 2010001,
8+
"vcpus": 4,
9+
"cpu_info": "{'arch': 'x86_64', 'model': 'cpu64-rhel6', 'vendor': 'Intel'}",
10+
"memory_mb": 8192,
11+
"local_gb": 100,
12+
"service_name": "compute-1",
13+
"reservable": true,
14+
"status": null,
15+
"trust_id": "5f67f11215cf4c52906453a181bfcfea",
16+
"created_at": "2017-12-27 10:00:00",
17+
"updated_at": null,
18+
"extra_capability_sample": "foo"
19+
}
20+
]
21+
}

0 commit comments

Comments
 (0)