]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix ordering of function args
authorJohn Griffith <john.griffith@solidfire.com>
Fri, 15 Feb 2013 03:41:15 +0000 (03:41 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Fri, 15 Feb 2013 03:43:06 +0000 (03:43 +0000)
Previous change swapped context and type-id params in function
declaration.  Put it back.

Also, no reason for storing the qos dict in the parameters, if
it's stored then we continuously have to update it, remove that
for now and come up with a cleaner method later.

Change-Id: I0820a48660bdfd0481be3681e33d7e2ff3246bb1

cinder/volume/drivers/solidfire.py

index a1f042507b2a8f56caf7fc24deb1e671b5372786..800ac2413d38de6bb79b3ad79cb738589ed9b786 100644 (file)
@@ -282,9 +282,6 @@ class SolidFire(SanISCSIDriver):
                       'is_clone': 'True',
                       'src_uuid': 'src_uuid'}
 
-        if qos:
-            attributes['qos'] = qos
-
         params = {'volumeID': int(sf_vol['volumeID']),
                   'name': 'UUID-%s' % v_ref['id'],
                   'attributes': attributes,
@@ -331,7 +328,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')
@@ -399,8 +396,6 @@ class SolidFire(SanISCSIDriver):
 
         attributes = {'uuid': volume['id'],
                       'is_clone': 'False'}
-        if qos:
-            attributes['qos'] = qos
 
         params = {'name': 'UUID-%s' % volume['id'],
                   'accountID': None,