aboutsummaryrefslogtreecommitdiffstats
path: root/utils/openstack_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/openstack_utils.py')
-rw-r--r--utils/openstack_utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/openstack_utils.py b/utils/openstack_utils.py
index 2103c7fe..2af12e55 100644
--- a/utils/openstack_utils.py
+++ b/utils/openstack_utils.py
@@ -14,6 +14,7 @@ import subprocess
import sys
import time
+from cinderclient import client as cinderclient
from glanceclient import client as glanceclient
from keystoneclient.v2_0 import client as keystoneclient
from neutronclient.v2_0 import client as neutronclient
@@ -103,6 +104,15 @@ def get_nova_client():
return novaclient.Client('2', **creds_nova)
+def get_cinder_client():
+ creds_cinder = get_credentials("cinder")
+ return cinderclient.Client('2', creds_cinder['username'],
+ creds_cinder['api_key'],
+ creds_cinder['project_id'],
+ creds_cinder['auth_url'],
+ service_type="volume")
+
+
def get_neutron_client():
creds_neutron = get_credentials("neutron")
return neutronclient.Client(**creds_neutron)