Previous topic

The cinder.tests.image.fake Module

Next topic

The cinder.tests.integrated.api.client 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.image.test_glance Module

class NullWriter

Bases: object

Used to test ImageService.get which takes a writer object

write(*arg, **kwargs)
class TestGlanceImageService(methodName='runTest')

Bases: cinder.test.TestCase

Tests the Glance image service.

At a high level, the translations involved are:

  1. Glance -> ImageService - This is needed so we can support multple ImageServices (Glance, Local, etc)
  2. ImageService -> API - This is needed so we can support multple APIs (OpenStack, EC2)
NOW_DATETIME = datetime.datetime(2010, 10, 11, 10, 30, 22, tzinfo=<cinder.tests.image.test_glance.tzinfo object at 0xce2c4ec>)
NOW_GLANCE_FORMAT = '2010-10-11T10:30:22.000000'
NOW_GLANCE_OLD_FORMAT = '2010-10-11T10:30:22'
setUp()
test_client_forbidden_converts_to_imagenotauthed()
test_client_httpforbidden_converts_to_imagenotauthed()
test_client_httpnotfound_converts_to_imagenotfound()
test_client_notfound_converts_to_imagenotfound()
test_create()
test_create_and_show_non_existing_image()
test_create_with_instance_id()

Ensure instance_id is persisted as an image-property

test_create_without_instance_id()

Ensure we can create an image without having to specify an instance_id. Public images are an example of an image not tied to an instance.

test_delete()
test_detail_default_limit()
test_detail_invalid_marker()
test_detail_limit()
test_detail_makes_datetimes()
test_detail_marker()
test_detail_marker_and_limit()
test_detail_passes_through_to_client()
test_detail_private_image()
test_download_with_retries()
test_glance_client_image_id()
test_glance_client_image_ref()
test_show_makes_datetimes()
test_show_passes_through_to_client()
test_show_raises_when_no_authtoken_in_the_context()
test_update()
class tzinfo

Bases: datetime.tzinfo

static utcoffset(*args, **kwargs)
class TestGlanceSerializer(methodName='runTest')

Bases: cinder.test.TestCase

test_serialize()