]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Last driver sync for Folsom and Grizzly
authorjohn-griffith <john.griffith@solidfire.com>
Sat, 23 Mar 2013 00:01:02 +0000 (18:01 -0600)
committerjohn-griffith <john.griffith@solidfire.com>
Sun, 24 Mar 2013 17:23:45 +0000 (11:23 -0600)
This is the last of the updates that I've been putting
off while trying to handle the core items in Cinder.

This change fixes the ctxt ordering error in volume_types
and also fixes and also changes the internal SolidFire
metadata storage to a single dict instead of a dict of dicts.

Change-Id: I002a591bc109ae1ab625c89f6ad841f60e464a40
(cherry picked from commit f53d48ebd9ff0e3b99470a9b95527c7054709c12)

cinder/volume/drivers/solidfire.py

index 0b7966cbf08f070abbfac435f7f4ad9e943f8473..8d0c55280761f031d6dd027b49c2a322e4085178 100644 (file)
@@ -312,7 +312,8 @@ class SolidFire(SanISCSIDriver):
                       'src_uuid': 'src_uuid'}
 
         if qos:
-            attributes['qos'] = qos
+            for k, v in qos.items():
+                            attributes[k] = str(v)
 
         params = {'volumeID': int(sf_vol['volumeID']),
                   'name': 'UUID-%s' % v_ref['id'],
@@ -363,7 +364,7 @@ class SolidFire(SanISCSIDriver):
                     qos[i.key] = int(i.value)
         return qos
 
-    def _set_qos_by_volume_type(self, type_id, ctxt):
+    def _set_qos_by_volume_type(self, ctxt, type_id):
         qos = {}
         volume_type = volume_types.get_volume_type(ctxt, type_id)
         specs = volume_type.get('extra_specs')
@@ -432,7 +433,8 @@ class SolidFire(SanISCSIDriver):
         attributes = {'uuid': volume['id'],
                       'is_clone': 'False'}
         if qos:
-            attributes['qos'] = qos
+            for k, v in qos.items():
+                            attributes[k] = str(v)
 
         params = {'name': 'UUID-%s' % volume['id'],
                   'accountID': None,