Created
December 10, 2011 21:08
-
-
Save vishvananda/1456420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nova/compute/api.py b/nova/compute/api.py | |
index f65b5ce..01f5488 100644 | |
--- a/nova/compute/api.py | |
+++ b/nova/compute/api.py | |
@@ -29,6 +29,7 @@ from nova import flags | |
import nova.image | |
from nova import log as logging | |
from nova import network | |
+from nova import policy | |
from nova import quota | |
from nova import rpc | |
from nova import utils | |
@@ -543,6 +544,9 @@ class API(base.Base): | |
we waited for information from the scheduler or not. | |
""" | |
+ policy.enforce(context, | |
+ 'compute.create_instance', | |
+ {'project_id': context.project_id}) | |
# We can create the DB entry for the instance here if we're | |
# only going to create 1 instance and we're in a single | |
# zone deployment. This speeds up API responses for builds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should be compute:create_instance, not with a dot.