diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-19 16:04:51 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-03-19 20:40:45 -0700 |
| commit | ca989b683a34ba3d64cac5a492ab221490a36c52 (patch) | |
| tree | 0bd55bc374634e20730231236d931ab3ceae053f /nova | |
| parent | 1f1b9de4bf6ee69a0baaa9171cc163bd790ec2da (diff) | |
Allow rate limiting to be disabled via flag
* fixes bug 947776
Change-Id: I892394ead2d1921ac8390e54312c5229929042f5
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/auth.py | 6 | ||||
| -rw-r--r-- | nova/flags.py | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/nova/api/auth.py b/nova/api/auth.py index 2d66c0d76..7106bee7f 100644 --- a/nova/api/auth.py +++ b/nova/api/auth.py @@ -40,7 +40,11 @@ LOG = logging.getLogger(__name__) def pipeline_factory(loader, global_conf, **local_conf): """A paste pipeline replica that keys off of auth_strategy.""" - pipeline = local_conf[FLAGS.auth_strategy].split() + pipeline = local_conf[FLAGS.auth_strategy] + if not FLAGS.api_rate_limit: + limit_name = FLAGS.auth_strategy + '_nolimit' + pipeline = local_conf.get(limit_name, pipeline) + pipeline = pipeline.split() filters = [loader.get_filter(n) for n in pipeline[:-1]] app = loader.get_app(pipeline[-1]) filters.reverse() diff --git a/nova/flags.py b/nova/flags.py index d669e23f9..fb73182cf 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -220,6 +220,9 @@ global_opts = [ cfg.BoolOpt('rabbit_durable_queues', default=False, help='use durable queues in RabbitMQ'), + cfg.BoolOpt('api_rate_limit', + default=True, + help='whether to rate limit the api'), cfg.ListOpt('enabled_apis', default=['ec2', 'osapi_compute', 'osapi_volume', 'metadata'], help='a list of APIs to enable by default'), |
