Added list hypervisors sample · openstackdev86/openstack-samples@98583c0 · GitHub
Skip to content

Commit 98583c0

Browse files
committed
Added list hypervisors sample
1 parent a832340 commit 98583c0

4 files changed

Lines changed: 44 additions & 4 deletions

File tree

lab1/credentials.py

Lines changed: 8 additions & 0 deletions

lab1/novasamples/__init__.pyc

0 Bytes
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from credentials import get_nova_credentials_v2
2+
from novaclient.client import Client
3+
from utils import print_values_hypervisor
4+
5+
credentials = get_nova_credentials_v2()
6+
nova_client = Client(**credentials)
7+
8+
hyp_list = nova_client.hypervisors.list()
9+
10+
print_values_hypervisor(hyp_list)

lab1/utils.py

Lines changed: 26 additions & 4 deletions

0 commit comments

Comments
 (0)