From 34c012c709cc5ae577330c7d67ba060293158210 Mon Sep 17 00:00:00 2001 From: unicell Date: Mon, 13 Aug 2012 20:19:54 +0800 Subject: Implement project specific flavors API blueprint project-specific-flavors This change implements API extension to manage project specific flavor types, so that non-public flavor type can only see by projects with access rights. Change-Id: Ie2d2c605065b0c76897f843a4548a0c984a05f1a --- nova/exception.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 83c3f9c03..95a43a05f 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -776,6 +776,11 @@ class FlavorNotFound(NotFound): message = _("Flavor %(flavor_id)s could not be found.") +class FlavorAccessNotFound(NotFound): + message = _("Flavor access not found for %(flavor_id) / " + "%(project_id) combination.") + + class SchedulerHostFilterNotFound(NotFound): message = _("Scheduler Host Filter %(filter_name)s could not be found.") @@ -849,6 +854,11 @@ class InstanceTypeExists(Duplicate): message = _("Instance Type %(name)s already exists.") +class FlavorAccessExists(Duplicate): + message = _("Flavor access alreay exists for flavor %(flavor_id)s " + "and project %(project_id)s combination.") + + class VolumeTypeExists(Duplicate): message = _("Volume Type %(name)s already exists.") -- cgit