]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Merge "On Volume list only retrieve needed data from DB"
authorJenkins <jenkins@review.openstack.org>
Fri, 14 Aug 2015 23:32:29 +0000 (23:32 +0000)
committerGerrit Code Review <review@openstack.org>
Fri, 14 Aug 2015 23:32:29 +0000 (23:32 +0000)
1  2 
cinder/api/v2/volumes.py
cinder/db/sqlalchemy/api.py
cinder/tests/unit/api/v1/test_volumes.py
cinder/tests/unit/api/v2/stubs.py
cinder/tests/unit/api/v2/test_volumes.py
cinder/volume/api.py

Simple merge
Simple merge
index 23504ac44fc6c81697350658fb31722a700e25a9,ef4184fdb90e07d1eb324952feeffccbe8760495..9e9192be839854bdae0c8a04d86aac4757524f4b
@@@ -158,9 -148,9 +158,9 @@@ def stub_volume_get_all(context, search
  def stub_volume_get_all_by_project(self, context, marker, limit,
                                     sort_keys=None, sort_dirs=None,
                                     filters=None,
-                                    viewable_admin_meta=False):
+                                    viewable_admin_meta=False, offset=None):
      filters = filters or {}
 -    return [stub_volume_get(self, context, '1')]
 +    return [stub_volume_get(self, context, '1', viewable_admin_meta=True)]
  
  
  def stub_snapshot(id, **kwargs):
index 1259dd167dbc10428ee3c8a8c168278cb7814626,69e1422a5a94d7d304af04e62f41f5d418128b18..5b8ad4c11bb479c6f5998d810591959df32708b8
@@@ -61,10 -62,9 +63,11 @@@ class VolumeApiTest(test.TestCase)
          self.stubs.Set(db, 'service_get_all_by_topic',
                         stubs.stub_service_get_all_by_topic)
          self.maxDiff = None
+         self.ctxt = context.RequestContext('admin', 'fakeproject', True)
  
 -    def test_volume_create(self):
 +    @mock.patch(
 +        'cinder.api.openstack.wsgi.Controller.validate_name_and_description')
 +    def test_volume_create(self, mock_validate):
          self.stubs.Set(volume_api.API, 'get', stubs.stub_volume_get)
          self.stubs.Set(volume_api.API, "create", stubs.stub_volume_create)
  
Simple merge