From 9733cc25522b1cef83d090617a425efc5364d35b Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Tue, 14 Jun 2016 16:27:51 +0200 Subject: [PATCH] Enable sorting and pagination by default Now that we have a decent api test coverage for those features, as well as a way to detect the features via REST API, we should be safe and thrilled to enable them by default in all installations. Depends-On: I0aaaa037a8ad52060a68dd75c0a1accc6add238e Depends-On: I5e68f471a641a34100aba31cb2c4a815c7220014 Depends-On: I648851b48d0481c97054e1280b60a119b42dfd38 Depends-On: Ic04cd125dd715ae0694fbf24d8193abe3151ffd1 Depends-On: Ib3709d15fd87b93285dadf78cce73ee37e8898e2 Depends-On: Ie3a66d2a7c05143df3da1c56c8e8a5308d4bae91 DocImpact Update configuration documentation to cover new defaults. UpgradeImpact To retain the original default behaviour, set allow_sorting and allow_pagination to False. Closes-Bug: #1566514 Change-Id: I3820bec029b3895913b034b718116c95b4942ed0 --- neutron/conf/common.py | 4 ++-- neutron/tests/contrib/gate_hook.sh | 2 -- neutron/tests/contrib/hooks/pagination | 9 --------- neutron/tests/contrib/hooks/sorting | 9 --------- .../enable-sorting-pagination-754390289d3311fa.yaml | 3 +++ 5 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 neutron/tests/contrib/hooks/pagination delete mode 100644 neutron/tests/contrib/hooks/sorting create mode 100644 releasenotes/notes/enable-sorting-pagination-754390289d3311fa.yaml diff --git a/neutron/conf/common.py b/neutron/conf/common.py index 3c07faaf737..0c32e493c4f 100644 --- a/neutron/conf/common.py +++ b/neutron/conf/common.py @@ -53,9 +53,9 @@ core_opts = [ "removed in the Ocata release.")), cfg.BoolOpt('allow_bulk', default=True, help=_("Allow the usage of the bulk API")), - cfg.BoolOpt('allow_pagination', default=False, + cfg.BoolOpt('allow_pagination', default=True, help=_("Allow the usage of the pagination")), - cfg.BoolOpt('allow_sorting', default=False, + cfg.BoolOpt('allow_sorting', default=True, help=_("Allow the usage of the sorting")), cfg.StrOpt('pagination_max_limit', default="-1", help=_("The maximum number of items returned in a single " diff --git a/neutron/tests/contrib/gate_hook.sh b/neutron/tests/contrib/gate_hook.sh index abcfcf75bc2..69c703f0e93 100644 --- a/neutron/tests/contrib/gate_hook.sh +++ b/neutron/tests/contrib/gate_hook.sh @@ -63,8 +63,6 @@ case $VENV in # NOTE(ihrachys): note the order of hook post-* sections is significant: [quotas] hook should # go before other hooks modifying [DEFAULT]. See LP#1583214 for details. load_conf_hook quotas - load_conf_hook sorting - load_conf_hook pagination load_rc_hook qos load_rc_hook trunk load_conf_hook osprofiler diff --git a/neutron/tests/contrib/hooks/pagination b/neutron/tests/contrib/hooks/pagination deleted file mode 100644 index 71b9b99fb7c..00000000000 --- a/neutron/tests/contrib/hooks/pagination +++ /dev/null @@ -1,9 +0,0 @@ -[[post-extra|$TEMPEST_CONFIG]] - -[neutron_plugin_options] -validate_pagination = True - -[[post-config|$NEUTRON_CONF]] - -[DEFAULT] -allow_pagination=True diff --git a/neutron/tests/contrib/hooks/sorting b/neutron/tests/contrib/hooks/sorting deleted file mode 100644 index ab0682e0485..00000000000 --- a/neutron/tests/contrib/hooks/sorting +++ /dev/null @@ -1,9 +0,0 @@ -[[post-extra|$TEMPEST_CONFIG]] - -[neutron_plugin_options] -validate_sorting = True - -[[post-config|$NEUTRON_CONF]] - -[DEFAULT] -allow_sorting=True diff --git a/releasenotes/notes/enable-sorting-pagination-754390289d3311fa.yaml b/releasenotes/notes/enable-sorting-pagination-754390289d3311fa.yaml new file mode 100644 index 00000000000..b9f951eb08e --- /dev/null +++ b/releasenotes/notes/enable-sorting-pagination-754390289d3311fa.yaml @@ -0,0 +1,3 @@ +--- +upgrade: + - API sorting and pagination features are now enabled by default.