Implement volume quota support in Cinder
parital fix for bug 1023311 * To use needs cinderclient https://review.openstack.org/#/c/11509/ * Updates quota classes with changes in Nova * Adds needed quota related DB tables * Updates test_quota to reflect changes in Nova * Adds absolute limits and empty rate limit functions * Updates test/integration/test_volume to make it work w/ above changes Change-Id: I221c7a9dc51a2bb9bf7228c056f63ba9546cf5f9
This commit is contained in:
@@ -295,10 +295,23 @@ class HostBinaryNotFound(NotFound):
|
||||
message = _("Could not find binary %(binary)s on host %(host)s.")
|
||||
|
||||
|
||||
class InvalidReservationExpiration(Invalid):
|
||||
message = _("Invalid reservation expiration %(expire)s.")
|
||||
|
||||
|
||||
class InvalidQuotaValue(Invalid):
|
||||
message = _("Change would make usage less than 0 for the following "
|
||||
"resources: %(unders)s")
|
||||
|
||||
|
||||
class QuotaNotFound(NotFound):
|
||||
message = _("Quota could not be found")
|
||||
|
||||
|
||||
class QuotaResourceUnknown(QuotaNotFound):
|
||||
message = _("Unknown quota resources %(unknown)s.")
|
||||
|
||||
|
||||
class ProjectQuotaNotFound(QuotaNotFound):
|
||||
message = _("Quota for project %(project_id)s could not be found.")
|
||||
|
||||
@@ -307,6 +320,18 @@ class QuotaClassNotFound(QuotaNotFound):
|
||||
message = _("Quota class %(class_name)s could not be found.")
|
||||
|
||||
|
||||
class QuotaUsageNotFound(QuotaNotFound):
|
||||
message = _("Quota usage for project %(project_id)s could not be found.")
|
||||
|
||||
|
||||
class ReservationNotFound(QuotaNotFound):
|
||||
message = _("Quota reservation %(uuid)s could not be found.")
|
||||
|
||||
|
||||
class OverQuota(CinderException):
|
||||
message = _("Quota exceeded for resources: %(overs)s")
|
||||
|
||||
|
||||
class MigrationNotFound(NotFound):
|
||||
message = _("Migration %(migration_id)s could not be found.")
|
||||
|
||||
@@ -372,6 +397,18 @@ class QuotaError(CinderException):
|
||||
safe = True
|
||||
|
||||
|
||||
class VolumeSizeExceedsAvailableQuota(QuotaError):
|
||||
message = _("Requested volume exceeds allowed volume size quota")
|
||||
|
||||
|
||||
class VolumeSizeExceedsQuota(QuotaError):
|
||||
message = _("Maximum volume size exceeded")
|
||||
|
||||
|
||||
class VolumeLimitExceeded(QuotaError):
|
||||
message = _("Maximum number of volumes allowed (%(allowed)d) exceeded")
|
||||
|
||||
|
||||
class DuplicateSfVolumeNames(Duplicate):
|
||||
message = _("Detected more than one volume with name %(vol_name)s")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user