diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2010-12-09 14:34:26 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-12-09 14:34:26 +0000 |
| commit | c5b1fd0424cec19be44751b6f4f2aeec13752733 (patch) | |
| tree | df2d66c6c03d328069f4a8524dbaa897afd65f81 /nova/api | |
| parent | 3c114a7dd596dfb12de42577711d97d1a98d10ec (diff) | |
| parent | e6079449dc034234dc24e77b94bbcc4a257387d9 (diff) | |
Flag to define which operations are exposed in the OpenStack API, disabling all others.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index 4ca108c4e..c9efe5222 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -48,6 +48,10 @@ flags.DEFINE_string('nova_api_auth', 'nova.api.openstack.auth.BasicApiAuthManager', 'The auth mechanism to use for the OpenStack API implemenation') +flags.DEFINE_bool('allow_admin_api', + False, + 'When True, this API service will accept admin operations.') + class API(wsgi.Middleware): """WSGI entry point for all OpenStack API requests.""" @@ -183,6 +187,10 @@ class APIRouter(wsgi.Router): mapper.resource("sharedipgroup", "sharedipgroups", controller=sharedipgroups.Controller()) + if FLAGS.allow_admin_api: + logging.debug("Including admin operations in API.") + # TODO: Place routes for admin operations here. + super(APIRouter, self).__init__(mapper) |
