Beispiel #1
0
 def setUp(self):
     super(DeleteSnapshotTestCase, self).setUp()
     self.controller = volumes.SnapshotController()
     self.stubs.Set(cinder.API, 'get', fake_get_volume)
     self.stubs.Set(cinder.API, 'create_snapshot_force',
                    fake_create_snapshot)
     self.stubs.Set(cinder.API, 'create_snapshot', fake_create_snapshot)
     self.stubs.Set(cinder.API, 'delete_snapshot', fake_delete_snapshot)
     self.req = fakes.HTTPRequest.blank('/v2/fake/os-snapshots')
Beispiel #2
0
 def setUp(self):
     super(CreateSnapshotTestCase, self).setUp()
     self.controller = volumes.SnapshotController()
     self.stubs.Set(cinder.API, 'get', fake_get_volume)
     self.stubs.Set(cinder.API, 'create_snapshot_force',
                    fake_create_snapshot)
     self.stubs.Set(cinder.API, 'create_snapshot', fake_create_snapshot)
     self.req = fakes.HTTPRequest.blank('/v2/fake/os-snapshots')
     self.req.method = 'POST'
     self.body = {'snapshot': {'volume_id': 1}}
Beispiel #3
0
 def setUp(self):
     super(ShowSnapshotTestCase, self).setUp()
     self.controller = volumes.SnapshotController()
     self.req = fakes.HTTPRequest.blank('/v2/fake/os-snapshots')
     self.req.method = 'GET'
Beispiel #4
0
class SnapshotApiTestV2(SnapshotApiTestV21):
    controller = volumes_v2.SnapshotController()
    validation_error = webob.exc.HTTPBadRequest