Allow to configure the pagination parameters
Change-Id: Icea00c0b21d164e9c0eb0b66ab8431d661893d71
diff --git a/README.rst b/README.rst
index 0bfdfbf..22ab068 100644
--- a/README.rst
+++ b/README.rst
@@ -72,6 +72,17 @@
public: true
audit:
enabled: false
+ api_limit_max: 100
+ limit_param_default: 50
+
+The pagination is controlled by the *api_limit_max* and *limit_param_default*
+parameters as shown above:
+
+* *api_limit_max* defines the maximum number of records that the server will
+ return.
+
+* *limit_param_default* is the default *limit* parameter that
+ applies if the request didn't defined it explicitly.
Client role
-----------
diff --git a/glance/files/liberty/glance-api.conf.Debian b/glance/files/liberty/glance-api.conf.Debian
index 3ecb86b..82d5470 100644
--- a/glance/files/liberty/glance-api.conf.Debian
+++ b/glance/files/liberty/glance-api.conf.Debian
@@ -39,6 +39,9 @@
# package, it is also possible to use: glance.db.registry.api
# data_api = glance.db.sqlalchemy.api
+limit_param_default = {{ server.limit_default|default('25') }}
+api_limit_max = {{ server.api_limit_max|default('1000') }}
+
# The number of child process workers that will be
# created to service API requests. The default will be
# equal to the number of CPUs available. (integer value)
diff --git a/glance/files/mitaka/glance-api.conf.Debian b/glance/files/mitaka/glance-api.conf.Debian
index ed410f8..7eaaea2 100644
--- a/glance/files/mitaka/glance-api.conf.Debian
+++ b/glance/files/mitaka/glance-api.conf.Debian
@@ -54,11 +54,11 @@
# Default value for the number of items returned by a request if not
# specified explicitly in the request (integer value)
-#limit_param_default = 25
+limit_param_default = {{ server.limit_default|default('25') }}
# Maximum permissible number of items that could be returned by a
# request (integer value)
-#api_limit_max = 1000
+api_limit_max = {{ server.api_limit_max|default('1000') }}
# Whether to include the backend image storage location in image
# properties. Revealing storage location can be a security risk, so