Previous topic

The cinder.tests.test_misc Module

Next topic

The cinder.tests.test_netapp_nfs Module

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.

The cinder.tests.test_netapp Module

Tests for NetApp volume driver

class FakeCMODEServerHandler(request, client_address, server)

Bases: BaseHTTPServer.BaseHTTPRequestHandler

HTTP handler that fakes enough stuff to allow the driver to run

do_GET(s)

Respond to a GET request.

do_POST(s)

Respond to a POST request.

class FakeCmodeHTTPConnection(host, timeout=None)

Bases: object

A fake httplib.HTTPConnection for netapp tests

Requests made via this connection actually get translated and routed into the fake Dfm handler above, we then turn the response into the httplib.HTTPResponse that the caller expects.

getresponse()
getresponsebody()
request(method, path, data=None, headers=None)
set_debuglevel(level)
class FakeDfmServerHandler(request, client_address, server)

Bases: BaseHTTPServer.BaseHTTPRequestHandler

HTTP handler that fakes enough stuff to allow the driver to run

do_GET(s)

Respond to a GET request.

do_POST(s)

Respond to a POST request.

class FakeHTTPConnection(host, timeout=None)

Bases: object

A fake httplib.HTTPConnection for netapp tests

Requests made via this connection actually get translated and routed into the fake Dfm handler above, we then turn the response into the httplib.HTTPResponse that the caller expects.

getresponse()
getresponsebody()
request(method, path, data=None, headers=None)
set_debuglevel(level)
class FakeHttplibSocket(value)

Bases: object

A fake socket implementation for httplib.HTTPResponse

makefile(mode, _other)

Returns the socket’s internal buffer

class NetAppCmodeISCSIDriverTestCase(methodName='runTest')

Bases: cinder.test.TestCase

Test case for NetAppISCSIDriver

setUp()
snapshot = {'volume_size': 1, 'project_id': 'project', 'volume_name': 'lun1', 'name': 'lun2', 'size': 1}
test_connect()
test_create_destroy()
test_create_vol_snapshot_destroy()
test_map_unmap()
volume = {'volume_type_id': None, 'provider_location': 'lun1', 'provider_auth': None, 'id': 'lun1', 'size': 1, 'display_name': None, 'name': 'lun1', 'display_description': 'lun1', 'volume_name': 'lun1', 'os_type': 'linux', 'project_id': 'project'}
volume_sec = {'volume_type_id': None, 'provider_location': 'lun1', 'provider_auth': None, 'id': 'lun1', 'size': 1, 'display_name': None, 'name': 'vol_snapshot', 'display_description': 'lun1', 'volume_name': 'lun1', 'os_type': 'linux', 'project_id': 'project'}
class NetAppDriverTestCase(methodName='runTest')

Bases: cinder.test.TestCase

Test case for NetAppISCSIDriver

INITIATOR = 'iqn.1993-08.org.debian:01:23456789'
PROJECT_ID = 'testproj'
STORAGE_SERVICE = 'Openstack Service'
STORAGE_SERVICE_PREFIX = 'Openstack Service-'
VOLUME_NAME = 'volume-00000001'
VOLUME_SIZE = 2147483648L
VOLUME_TYPE = ''
setUp()
test_connect()
test_create_destroy()
test_destroy_uncreated_volume()
test_map_unmap()