Add db table for Glance Metadata

This commit implements the blueprint
https://blueprints.launchpad.net/cinder/+spec/retain-glance-metadata-for-billing

It creates the new table volume_glance_metadata in the cinder
database, provides the CRUD methods for it, and populates the table
when a volume or snapshot is created from a Glance image.

Patch set 2: remove superflous line

Patch set 3: Fix incorrect column types in sqlalchemy/models.py

Patch set 4: Define exception class GlanceMetadataExists

Change-Id: I8f98f6eaae005a33bfd49cea783774407b7aa120
This commit is contained in:
Ollie Leahy
2012-11-15 11:48:27 +00:00
parent ceee1fdaf2
commit 1a431edff6
7 changed files with 424 additions and 1 deletions

View File

@@ -490,3 +490,8 @@ class NfsNoSharesMounted(NotFound):
class NfsNoSuitableShareFound(NotFound):
message = _("There is no share which can host %(volume_size)sG")
class GlanceMetadataExists(Invalid):
message = _("Glance metadata cannot be updated, key %(key)s"
" exists for volume id %(volume_id)s")