Table Of Contents

Previous topic

Scheduler

Next topic

Common and Misc Libraries

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

Fake Drivers

Todo

document general info about fakes

When the real thing isn’t available and you have some development to do these fake implementations of various drivers let you get on with your day.

The cinder.virt.fake Module

The cinder.auth.fakeldap Module

The cinder.testing.fake.rabbit Module

The cinder.volume.driver.FakeAOEDriver Class

The cinder.tests.service_unittest.FakeManager Class

The cinder.tests.api.openstack.fakes Module

class Context

Bases: object

class FakeAuthDatabase

Bases: object

static FakeAuthDatabase.auth_token_create(context, token)
static FakeAuthDatabase.auth_token_destroy(context, token_id)
static FakeAuthDatabase.auth_token_get(context, token_hash)
FakeAuthDatabase.data = {}
class FakeRateLimiter(application)

Bases: object

class FakeRequestContext(*args, **kwargs)

Bases: cinder.context.RequestContext

class FakeRouter(ext_mgr=None)

Bases: cinder.wsgi.Router

class FakeToken(**kwargs)

Bases: object

FakeToken.id_count = 0
class HTTPRequest(environ, charset=None, unicode_errors=None, decode_param_names=None, **kw)

Bases: webob.request.Request

classmethod HTTPRequest.blank(*args, **kwargs)
class TestRouter(controller)

Bases: cinder.wsgi.Router

get_fake_uuid(token=0)
stub_out_rate_limiting(stubs)
stub_snapshot(id, **kwargs)
stub_snapshot_get_all(self)
stub_snapshot_get_all_by_project(self, context)
stub_volume(id, **kwargs)
stub_volume_create(self, context, size, name, description, snapshot, **param)
stub_volume_create_from_image(self, context, size, name, description, snapshot, volume_type, metadata, availability_zone)
stub_volume_delete(self, context, *args, **param)
stub_volume_get(self, context, volume_id)
stub_volume_get_all(context, search_opts=None)
stub_volume_get_all_by_project(self, context, search_opts=None)
stub_volume_get_notfound(self, context, volume_id)
stub_volume_update(self, context, *args, **param)
wsgi_app(inner_app_v1=None, fake_auth=True, fake_auth_context=None, use_no_auth=False, ext_mgr=None)