def setUp(self):
     super(SnapshotApiTest, self).setUp()
     self.mock_object(volume.api.API, 'get', fake_get)
     self.mock_object(db.sqlalchemy.api, 'volume_type_get',
                      v2_fakes.fake_volume_type_get)
     self.patch('cinder.quota.QUOTAS.reserve')
     self.mock_object(scheduler_rpcapi.SchedulerAPI, 'create_snapshot')
     self.controller = snapshots.SnapshotsController()
     self.ctx = context.RequestContext(fake.USER_ID, fake.PROJECT_ID, True)
Beispiel #2
0
 def setUp(self,
           enforce_scope=False,
           enforce_new_defaults=False,
           *args,
           **kwargs):
     super().setUp(enforce_scope, enforce_new_defaults, *args, **kwargs)
     self.controller = snapshots.SnapshotsController()
     self.api_path = '/v3/%s/snapshots' % (self.project_id)
     self.api_version = mv.BASE_VERSION
     self.vol_type = test_utils.create_volume_type(
         self.project_admin_context,
         name='fake_vol_type',
         testcase_instance=self)
Beispiel #3
0
 def setUp(self):
     super(SnapshotApiTest, self).setUp()
     self.stubs.Set(volume.api.API, 'get', stub_get)
     self.controller = snapshots.SnapshotsController()
     self.ctx = context.RequestContext(fake.USER_ID, fake.PROJECT_ID, True)
Beispiel #4
0
 def setUp(self):
     super(SnapshotApiTest, self).setUp()
     self.controller = snapshots.SnapshotsController()
     self.ctx = context.RequestContext(fake.USER_ID, fake.PROJECT_ID, True)
Beispiel #5
0
 def setUp(self):
     super(SnapshotApiTest, self).setUp()
     self.mock_object(volume.api.API, 'get', fake_get)
     self.mock_object(scheduler_rpcapi.SchedulerAPI, 'create_snapshot')
     self.controller = snapshots.SnapshotsController()
     self.ctx = context.RequestContext(fake.USER_ID, fake.PROJECT_ID, True)