Hello community, here is the log from the commit of package python-oslo.middleware for openSUSE:Factory checked in at 2015-09-09 20:20:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-oslo.middleware (Old) and /work/SRC/openSUSE:Factory/.python-oslo.middleware.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.middleware" Changes: -------- --- /work/SRC/openSUSE:Factory/python-oslo.middleware/python-oslo.middleware.changes 2015-08-27 08:54:50.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-oslo.middleware.new/python-oslo.middleware.changes 2015-09-09 20:20:57.000000000 +0200 @@ -1,0 +2,28 @@ +Sat Aug 29 17:24:28 UTC 2015 - tbecht...@suse.com + +- update to 2.8.0: + * Split option discovery function by middleware + * Updated from global requirements + * Updated from global requirements + * Fix remarks missed on #209817 + * Added new test for CORS Simple Headers + * Restore backward compat of paste factory + * Do not dump HealthcheckResult class source + * Updated from global requirements + * Renamed latent_configuration to _latent_configuration + * Added latent properties to CORS middleware + * Declare some methods static + * Allow to get option from paste-deploy + * Remove usage of oslo.config global + * Imported Translations from Transifex + * Updated from global requirements + * Imported Translations from Transifex + * Updated from global requirements + * Imported Translations from Transifex + * Updated from global requirements + * Updated from global requirements + * Updated from global requirements + * Added verbose debug logging to CORS +- Adjust Requires according to requirements.txt + +------------------------------------------------------------------- Old: ---- oslo.middleware-2.4.0.tar.gz New: ---- oslo.middleware-2.8.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-oslo.middleware.spec ++++++ --- /var/tmp/diff_new_pack.ZAmsi5/_old 2015-09-09 20:20:57.000000000 +0200 +++ /var/tmp/diff_new_pack.ZAmsi5/_new 2015-09-09 20:20:57.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-oslo.middleware -Version: 2.4.0 +Version: 2.8.0 Release: 0 Summary: oslo.middleware library License: Apache-2.0 @@ -39,7 +39,7 @@ BuildRequires: python-testtools Requires: python-Babel >= 1.3 Requires: python-WebOb >= 1.2.3 -Requires: python-oslo.config >= 1.11.0 +Requires: python-oslo.config >= 2.3.0 Requires: python-oslo.context >= 0.2.0 Requires: python-oslo.i18n >= 1.5.0 Requires: python-six >= 1.9.0 ++++++ oslo.middleware-2.4.0.tar.gz -> oslo.middleware-2.8.0.tar.gz ++++++ ++++ 1674 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/AUTHORS new/oslo.middleware-2.8.0/AUTHORS --- old/oslo.middleware-2.4.0/AUTHORS 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/AUTHORS 2015-08-27 18:26:29.000000000 +0200 @@ -25,6 +25,7 @@ Kamil Rykowski <kamil.rykow...@intel.com> Mark McLoughlin <mar...@redhat.com> Mehdi Abaakouk <mehdi.abaak...@enovance.com> +Mehdi Abaakouk <sil...@redhat.com> Michael Krotscheck <krotsch...@gmail.com> Noorul Islam K M <noo...@noorul.com> Sergey Kraynev <skray...@mirantis.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/ChangeLog new/oslo.middleware-2.8.0/ChangeLog --- old/oslo.middleware-2.4.0/ChangeLog 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/ChangeLog 2015-08-27 18:26:29.000000000 +0200 @@ -1,6 +1,48 @@ CHANGES ======= +2.8.0 +----- + +* Split option discovery function by middleware +* Updated from global requirements +* Updated from global requirements + +2.7.0 +----- + +* Fix remarks missed on #209817 + +2.6.1 +----- + +* Added new test for CORS Simple Headers +* Restore backward compat of paste factory + +2.6.0 +----- + +* Do not dump HealthcheckResult class source +* Updated from global requirements +* Renamed latent_configuration to _latent_configuration +* Added latent properties to CORS middleware +* Declare some methods static +* Allow to get option from paste-deploy +* Remove usage of oslo.config global +* Imported Translations from Transifex +* Updated from global requirements + +2.5.0 +----- + +* Imported Translations from Transifex +* Updated from global requirements +* Imported Translations from Transifex +* Updated from global requirements +* Updated from global requirements +* Updated from global requirements +* Added verbose debug logging to CORS + 2.4.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/PKG-INFO new/oslo.middleware-2.8.0/PKG-INFO --- old/oslo.middleware-2.4.0/PKG-INFO 2015-07-13 20:35:02.000000000 +0200 +++ new/oslo.middleware-2.8.0/PKG-INFO 2015-08-27 18:26:29.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslo.middleware -Version: 2.4.0 +Version: 2.8.0 Summary: Oslo Middleware library Home-page: http://launchpad.net/oslo Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/api.rst new/oslo.middleware-2.8.0/doc/source/api.rst --- old/oslo.middleware-2.4.0/doc/source/api.rst 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/doc/source/api.rst 2015-08-27 18:26:00.000000000 +0200 @@ -4,3 +4,16 @@ .. automodule:: oslo_middleware :members: + +Configuration Options +===================== + +RequestBodySizeLimiter +~~~~~~~~~~~~~~~~~~~~~~ + +.. show-options:: oslo.middleware.sizelimit + +SSLMiddleware +~~~~~~~~~~~~~ + +.. show-options:: oslo.middleware.ssl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/conf.py new/oslo.middleware-2.8.0/doc/source/conf.py --- old/oslo.middleware-2.4.0/doc/source/conf.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/doc/source/conf.py 2015-08-27 18:26:00.000000000 +0200 @@ -23,7 +23,8 @@ extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx' + 'oslosphinx', + 'oslo_config.sphinxext', ] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -72,4 +73,4 @@ ] # Example configuration for intersphinx: refer to the Python standard library. -#intersphinx_mapping = {'http://docs.python.org/': None} \ No newline at end of file +#intersphinx_mapping = {'http://docs.python.org/': None} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/cors.rst new/oslo.middleware-2.8.0/doc/source/cors.rst --- old/oslo.middleware-2.4.0/doc/source/cors.rst 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/doc/source/cors.rst 2015-08-27 18:26:00.000000000 +0200 @@ -78,6 +78,17 @@ allowed_origin=* allow_methods=GET +If your software requires specific headers or methods for proper operation, you +may include these as latent properties. These will be evaluated in addition +to any found in configuration:: + + from oslo_middleware import cors + + app = cors.CORS(your_wsgi_application) + app.set_latent(allow_headers=['X-System-Header'], + expose_headers=['X-System-Header'], + allow_methods=['GET','PATCH']) + Configuration for pastedeploy ----------------------------- @@ -94,6 +105,11 @@ expose_headers=Content-Type,Cache-Control,Content-Language,Expires,Last-Modified,Pragma,X-Custom-Header +Configuration Options +--------------------- + +.. show-options:: oslo.middleware.cors + Module Documentation -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/healthcheck_plugins.rst new/oslo.middleware-2.8.0/doc/source/healthcheck_plugins.rst --- old/oslo.middleware-2.4.0/doc/source/healthcheck_plugins.rst 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/doc/source/healthcheck_plugins.rst 2015-08-27 18:26:00.000000000 +0200 @@ -2,5 +2,8 @@ Healthcheck middleware plugins ================================ +.. automodule:: oslo_middleware.healthcheck + :members: + .. automodule:: oslo_middleware.healthcheck.disable_by_file :members: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/index.rst new/oslo.middleware-2.8.0/doc/source/index.rst --- old/oslo.middleware-2.4.0/doc/source/index.rst 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/doc/source/index.rst 2015-08-27 18:26:00.000000000 +0200 @@ -10,4 +10,5 @@ api healthcheck_plugins cors + oslo_config contributing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/doc/source/oslo_config.rst new/oslo.middleware-2.8.0/doc/source/oslo_config.rst --- old/oslo.middleware-2.4.0/doc/source/oslo_config.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.middleware-2.8.0/doc/source/oslo_config.rst 2015-08-27 18:26:00.000000000 +0200 @@ -0,0 +1,53 @@ +============================= +Middlewares and configuration +============================= + +Middlewares can be configured in multiple fashion depending of the +application needs. Here is some use-cases: + +Configuration from the application +---------------------------------- + +The application code will looks like:: + + from oslo_middleware import sizelimit + from oslo_config import cfg + + conf = cfg.ConfigOpts() + app = sizelimit.RequestBodySizeLimiter(your_wsgi_application, conf) + + +Configuration with paste-deploy and the oslo.config +--------------------------------------------------- + +The paste filter (in /etc/my_app/api-paste.ini) will looks like:: + + [filter:sizelimit] + paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory + # In case of the application doesn't use the global oslo.config + # object. The middleware must known the app name to load + # the application configuration, by setting this: + # oslo_config_project = my_app + +The oslo.config file of the application (eg: /etc/my_app/my_app.conf) will looks like:: + + [oslo_middleware] + max_request_body_size=1000 + + +Configuration with pastedeploy only +----------------------------------- + +The paste filter (in /etc/my_app/api-paste.ini) will looks like:: + + [filter:sizelimit] + paste.filter_factory = oslo_middleware.sizelimit:RequestBodySizeLimiter.factory + max_request_body_size=1000 + +This will override any configuration done via oslo.config + + +.. note:: + + healtcheck middleware does not yet use oslo.config, see :doc:`healthcheck_plugins` + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware-log-error.po new/oslo.middleware-2.8.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware-log-error.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware-log-error.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware-log-error.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-09-07 20:10+0000\n" "Last-Translator: Andreas Jaeger <jaegera...@gmail.com>\n" -"Language-Team: German (http://www.transifex.com/p/oslomiddleware/language/" -"de/)\n" +"Language-Team: German (http://www.transifex.com/openstack/oslomiddleware/" +"language/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #, python-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware.po new/oslo.middleware-2.8.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/de/LC_MESSAGES/oslo.middleware.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-09-07 20:09+0000\n" "Last-Translator: Andreas Jaeger <jaegera...@gmail.com>\n" -"Language-Team: German (http://www.transifex.com/p/oslomiddleware/language/" -"de/)\n" +"Language-Team: German (http://www.transifex.com/openstack/oslomiddleware/" +"language/de/)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" msgid "Request is too large." msgstr "Die Anfrage ist zu groß." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware-log-error.po new/oslo.middleware-2.8.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware-log-error.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware-log-error.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware-log-error.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-11-03 23:03+0000\n" "Last-Translator: Andi Chandler <a...@gowling.com>\n" -"Language-Team: English (United Kingdom) (http://www.transifex.com/p/" +"Language-Team: English (United Kingdom) (http://www.transifex.com/openstack/" "oslomiddleware/language/en_GB/)\n" "Language: en_GB\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #, python-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware.po new/oslo.middleware-2.8.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/en_GB/LC_MESSAGES/oslo.middleware.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-11-03 23:03+0000\n" "Last-Translator: Andi Chandler <a...@gowling.com>\n" -"Language-Team: English (United Kingdom) (http://www.transifex.com/p/" +"Language-Team: English (United Kingdom) (http://www.transifex.com/openstack/" "oslomiddleware/language/en_GB/)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" msgid "Request is too large." msgstr "Request is too large." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware-log-error.po new/oslo.middleware-2.8.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware-log-error.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware-log-error.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware-log-error.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-09-25 09:01+0000\n" "Last-Translator: Maxime COQUEREL <max.coque...@gmail.com>\n" -"Language-Team: French (http://www.transifex.com/p/oslomiddleware/language/" -"fr/)\n" +"Language-Team: French (http://www.transifex.com/openstack/oslomiddleware/" +"language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #, python-format diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware.po new/oslo.middleware-2.8.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware.po --- old/oslo.middleware-2.4.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware.po 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware/locale/fr/LC_MESSAGES/oslo.middleware.po 2015-08-27 18:26:00.000000000 +0200 @@ -9,16 +9,16 @@ msgstr "" "Project-Id-Version: oslo.middleware\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-07-09 06:02+0000\n" +"POT-Creation-Date: 2015-08-04 06:15+0000\n" "PO-Revision-Date: 2014-09-17 21:06+0000\n" "Last-Translator: Maxime COQUEREL <max.coque...@gmail.com>\n" -"Language-Team: French (http://www.transifex.com/p/oslomiddleware/language/" -"fr/)\n" +"Language-Team: French (http://www.transifex.com/openstack/oslomiddleware/" +"language/fr/)\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 1.3\n" +"Generated-By: Babel 2.0\n" msgid "Request is too large." msgstr "Demande trop importante." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware.egg-info/PKG-INFO new/oslo.middleware-2.8.0/oslo.middleware.egg-info/PKG-INFO --- old/oslo.middleware-2.4.0/oslo.middleware.egg-info/PKG-INFO 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware.egg-info/PKG-INFO 2015-08-27 18:26:29.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: oslo.middleware -Version: 2.4.0 +Version: 2.8.0 Summary: Oslo Middleware library Home-page: http://launchpad.net/oslo Author: OpenStack diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware.egg-info/SOURCES.txt new/oslo.middleware-2.8.0/oslo.middleware.egg-info/SOURCES.txt --- old/oslo.middleware-2.4.0/oslo.middleware.egg-info/SOURCES.txt 2015-07-13 20:35:02.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware.egg-info/SOURCES.txt 2015-08-27 18:26:29.000000000 +0200 @@ -22,6 +22,7 @@ doc/source/healthcheck_plugins.rst doc/source/index.rst doc/source/installation.rst +doc/source/oslo_config.rst oslo/__init__.py oslo.middleware.egg-info/PKG-INFO oslo.middleware.egg-info/SOURCES.txt @@ -70,6 +71,7 @@ oslo_middleware/tests/test_correlation_id.py oslo_middleware/tests/test_cors.py oslo_middleware/tests/test_healthcheck.py +oslo_middleware/tests/test_opts.py oslo_middleware/tests/test_request_id.py oslo_middleware/tests/test_sizelimit.py oslo_middleware/tests/test_ssl.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware.egg-info/entry_points.txt new/oslo.middleware-2.8.0/oslo.middleware.egg-info/entry_points.txt --- old/oslo.middleware-2.4.0/oslo.middleware.egg-info/entry_points.txt 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware.egg-info/entry_points.txt 2015-08-27 18:26:29.000000000 +0200 @@ -1,5 +1,8 @@ [oslo.config.opts] oslo.middleware = oslo_middleware.opts:list_opts +oslo.middleware.cors = oslo_middleware.opts:list_opts_cors +oslo.middleware.sizelimit = oslo_middleware.opts:list_opts_sizelimit +oslo.middleware.ssl = oslo_middleware.opts:list_opts_ssl [oslo.middleware.healthcheck] disable_by_file = oslo_middleware.healthcheck.disable_by_file:DisableByFileHealthcheck diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware.egg-info/pbr.json new/oslo.middleware-2.8.0/oslo.middleware.egg-info/pbr.json --- old/oslo.middleware-2.4.0/oslo.middleware.egg-info/pbr.json 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware.egg-info/pbr.json 2015-08-27 18:26:29.000000000 +0200 @@ -1 +1 @@ -{"git_version": "393f799", "is_release": true} \ No newline at end of file +{"git_version": "b73aa5c", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo.middleware.egg-info/requires.txt new/oslo.middleware-2.8.0/oslo.middleware.egg-info/requires.txt --- old/oslo.middleware-2.4.0/oslo.middleware.egg-info/requires.txt 2015-07-13 20:35:01.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo.middleware.egg-info/requires.txt 2015-08-27 18:26:29.000000000 +0200 @@ -1,8 +1,8 @@ -pbr<2.0,>=0.11 +pbr<2.0,>=1.6 Babel>=1.3 -oslo.config>=1.11.0 # Apache-2.0 -oslo.context>=0.2.0 # Apache-2.0 -oslo.i18n>=1.5.0 # Apache-2.0 +oslo.config>=2.3.0 +oslo.context>=0.2.0 +oslo.i18n>=1.5.0 six>=1.9.0 -stevedore>=1.5.0 # Apache-2.0 +stevedore>=1.5.0 WebOb>=1.2.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/base.py new/oslo.middleware-2.8.0/oslo_middleware/base.py --- old/oslo.middleware-2.4.0/oslo_middleware/base.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/base.py 2015-08-27 18:26:00.000000000 +0200 @@ -18,8 +18,10 @@ from inspect import getargspec import webob.dec +from oslo_config import cfg -class Middleware(object): + +class ConfigurableMiddleware(object): """Base WSGI middleware wrapper. These classes require an application to be initialized that will be called @@ -29,13 +31,60 @@ @classmethod def factory(cls, global_conf, **local_conf): - """Factory method for paste.deploy.""" - return cls + """Factory method for paste.deploy. + + :param global_conf: dict of options for all middlewares + (usually the [DEFAULT] section of the paste deploy + configuration file) + :param local_conf: options dedicated to this middleware + (usually the option defined in the middleware + section of the paste deploy configuration file) + """ + conf = global_conf.copy() if global_conf else {} + conf.update(local_conf) - def __init__(self, application): + def middleware_filter(app): + return cls(app, conf) + + return middleware_filter + + def __init__(self, application, conf=None): + """Base middleware constructor + + :param conf: a dict of options or a cfg.ConfigOpts object + """ self.application = application - def process_request(self, req): + # NOTE(sileht): If the configuration come from oslo.config + # just use it. + if isinstance(conf, cfg.ConfigOpts): + self.conf = {} + self.oslo_conf = conf + else: + self.conf = conf or {} + if "oslo_config_project" in self.conf: + if 'oslo_config_file' in self.conf: + default_config_files = [self.conf['oslo_config_file']] + else: + default_config_files = None + self.oslo_conf = cfg.ConfigOpts() + self.oslo_conf([], project=self.conf['oslo_config_project'], + default_config_files=default_config_files, + validate_default_values=True) + + else: + # Fallback to global object + self.oslo_conf = cfg.CONF + + def _conf_get(self, key, group="oslo_middleware"): + if key in self.conf: + # Validate value type + self.oslo_conf.set_override(key, self.conf[key], group=group, + enforce_type=True) + return getattr(getattr(self.oslo_conf, group), key) + + @staticmethod + def process_request(req): """Called on each request. If this returns None, the next application down the stack will be @@ -44,7 +93,8 @@ """ return None - def process_response(self, response, request=None): + @staticmethod + def process_response(response, request=None): """Do whatever you'd like to the response.""" return response @@ -59,3 +109,16 @@ if 'request' in args: return self.process_response(response, request=req) return self.process_response(response) + + +class Middleware(ConfigurableMiddleware): + """Legacy base WSGI middleware wrapper. + + Legacy interface that doesn't pass configuration options + to the middleware when it's loaded via paste.deploy. + """ + + @classmethod + def factory(cls, global_conf, **local_conf): + """Factory method for paste.deploy.""" + return cls diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/catch_errors.py new/oslo.middleware-2.8.0/oslo_middleware/catch_errors.py --- old/oslo.middleware-2.4.0/oslo_middleware/catch_errors.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/catch_errors.py 2015-08-27 18:26:00.000000000 +0200 @@ -25,7 +25,7 @@ LOG = logging.getLogger(__name__) -class CatchErrors(base.Middleware): +class CatchErrors(base.ConfigurableMiddleware): """Middleware that provides high-level error handling. It catches all exceptions from subsequent applications in WSGI pipeline diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/correlation_id.py new/oslo.middleware-2.8.0/oslo_middleware/correlation_id.py --- old/oslo.middleware-2.4.0/oslo_middleware/correlation_id.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/correlation_id.py 2015-08-27 18:26:00.000000000 +0200 @@ -18,7 +18,7 @@ from oslo_middleware import base -class CorrelationId(base.Middleware): +class CorrelationId(base.ConfigurableMiddleware): "Middleware that attaches a correlation id to WSGI request" def process_request(self, req): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/cors.py new/oslo.middleware-2.8.0/oslo_middleware/cors.py --- old/oslo.middleware-2.4.0/oslo_middleware/cors.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/cors.py 2015-08-27 18:26:00.000000000 +0200 @@ -22,7 +22,6 @@ import webob.exc import webob.response - LOG = logging.getLogger(__name__) CORS_OPTS = [ @@ -54,39 +53,7 @@ ] -def filter_factory(global_conf, - allowed_origin, - allow_credentials=True, - expose_headers=None, - max_age=None, - allow_methods=None, - allow_headers=None): - '''Factory to support paste.deploy - - :param global_conf: The paste.ini global configuration object (not used). - :param allowed_origin: Protocol, host, and port for the allowed origin. - :param allow_credentials: Whether to permit credentials. - :param expose_headers: A list of headers to expose. - :param max_age: Maximum cache duration. - :param allow_methods: List of HTTP methods to permit. - :param allow_headers: List of HTTP headers to permit from the client. - :return: - ''' - - def filter(app): - cors_app = CORS(app) - cors_app.add_origin(allowed_origin=allowed_origin, - allow_credentials=allow_credentials, - expose_headers=expose_headers, - max_age=max_age, - allow_methods=allow_methods, - allow_headers=allow_headers) - return cors_app - - return filter - - -class CORS(base.Middleware): +class CORS(base.ConfigurableMiddleware): """CORS Middleware. This middleware allows a WSGI app to serve CORS headers for multiple @@ -96,6 +63,8 @@ """ simple_headers = [ + 'Accept', + 'Accept-Language', 'Content-Type', 'Cache-Control', 'Content-Language', @@ -104,22 +73,48 @@ 'Pragma' ] - def __init__(self, application, conf=None): - super(CORS, self).__init__(application) - + def __init__(self, application, *args, **kwargs): + super(CORS, self).__init__(application, *args, **kwargs) # Begin constructing our configuration hash. self.allowed_origins = {} + self._init_conf() - # Sanity check. Do we have an oslo.config? If so, load it. Else, assume - # that we'll use add_config. - if conf: - self._init_from_oslo(conf) + @classmethod + def factory(cls, global_conf, allowed_origin, **local_conf): + """factory method for paste.deploy + + allowed_origin: Protocol, host, and port for the allowed origin. + allow_credentials: Whether to permit credentials. + expose_headers: A list of headers to expose. + max_age: Maximum cache duration. + allow_methods: List of HTTP methods to permit. + allow_headers: List of HTTP headers to permit from the client. + """ + + # Ensures allowed_origin config exists + return super(CORS, cls).factory(global_conf, + allowed_origin=allowed_origin, + **local_conf) - def _init_from_oslo(self, conf): + def _init_conf(self): '''Initialize this middleware from an oslo.config instance.''' + # Set up a location for our latent configuration options + self._latent_configuration = { + 'allow_headers': [], + 'expose_headers': [], + 'methods': [] + } + # First, check the configuration and register global options. - conf.register_opts(CORS_OPTS, 'cors') + self.oslo_conf.register_opts(CORS_OPTS, 'cors') + + allowed_origin = self._conf_get('allowed_origin', 'cors') + allow_credentials = self._conf_get('allow_credentials', 'cors') + expose_headers = self._conf_get('expose_headers', 'cors') + max_age = self._conf_get('max_age', 'cors') + allow_methods = self._conf_get('allow_methods', 'cors') + allow_headers = self._conf_get('allow_headers', 'cors') # Clone our original CORS_OPTS, and set the defaults to whatever is # set in the global conf instance. This is done explicitly (instead @@ -127,24 +122,29 @@ # allowed_origin. subgroup_opts = copy.deepcopy(CORS_OPTS) cfg.set_defaults(subgroup_opts, - allow_credentials=conf.cors.allow_credentials, - expose_headers=conf.cors.expose_headers, - max_age=conf.cors.max_age, - allow_methods=conf.cors.allow_methods, - allow_headers=conf.cors.allow_headers) + allow_credentials=allow_credentials, + expose_headers=expose_headers, + max_age=max_age, + allow_methods=allow_methods, + allow_headers=allow_headers) # If the default configuration contains an allowed_origin, don't # forget to register that. - if conf.cors.allowed_origin: - self.add_origin(**conf.cors) + if allowed_origin: + self.add_origin(allowed_origin=allowed_origin, + allow_credentials=allow_credentials, + expose_headers=expose_headers, + max_age=max_age, + allow_methods=allow_methods, + allow_headers=allow_headers) # Iterate through all the loaded config sections, looking for ones # prefixed with 'cors.' - for section in conf.list_all_sections(): + for section in self.oslo_conf.list_all_sections(): if section.startswith('cors.'): # Register with the preconstructed defaults - conf.register_opts(subgroup_opts, section) - self.add_origin(**conf[section]) + self.oslo_conf.register_opts(subgroup_opts, section) + self.add_origin(**self.oslo_conf[section]) def add_origin(self, allowed_origin, allow_credentials=True, expose_headers=None, max_age=None, allow_methods=None, @@ -173,6 +173,39 @@ 'allow_headers': allow_headers } + def set_latent(self, allow_headers=None, allow_methods=None, + expose_headers=None): + '''Add a new latent property for this middleware. + + Latent properties are those values which a system requires for + operation. API-specific headers, for example, may be added by an + engineer so that they ship with the codebase, and thus do not require + extra documentation or passing of institutional knowledge. + + :param allow_headers: HTTP headers permitted in client requests. + :param allow_methods: HTTP methods permitted in client requests. + :param expose_headers: HTTP Headers exposed to clients. + ''' + + if allow_headers: + if isinstance(allow_headers, list): + self._latent_configuration['allow_headers'] = allow_headers + else: + raise TypeError("allow_headers must be a list or None.") + + if expose_headers: + if isinstance(expose_headers, list): + self._latent_configuration['expose_headers'] = expose_headers + else: + raise TypeError("expose_headers must be a list or None.") + + if allow_methods: + if isinstance(allow_methods, list): + self._latent_configuration['methods'] = allow_methods + else: + raise TypeError("allow_methods parameter must be a list or" + " None.") + def process_response(self, response, request=None): '''Check for CORS headers, and decorate if necessary. @@ -201,7 +234,8 @@ # Finally, return the response. return response - def _split_header_values(self, request, header_name): + @staticmethod + def _split_header_values(request, header_name): """Convert a comma-separated header value into a list of values.""" values = [] if header_name in request.headers: @@ -241,6 +275,8 @@ # If there's no request method, exit. (Section 6.2.3) if 'Access-Control-Request-Method' not in request.headers: + LOG.debug('CORS request does not contain ' + 'Access-Control-Request-Method header.') return response request_method = request.headers['Access-Control-Request-Method'] @@ -254,17 +290,26 @@ return response # Compare request method to permitted methods (Section 6.2.5) - if request_method not in cors_config['allow_methods']: + permitted_methods = ( + cors_config['allow_methods'] + + self._latent_configuration['methods'] + ) + if request_method not in permitted_methods: + LOG.debug('Request method \'%s\' not in permitted list: %s' + % (request_method, permitted_methods)) return response # Compare request headers to permitted headers, case-insensitively. # (Section 6.2.6) + permitted_headers = [header.upper() for header in + (cors_config['allow_headers'] + + self.simple_headers + + self._latent_configuration['allow_headers'])] for requested_header in request_headers: upper_header = requested_header.upper() - permitted_headers = (cors_config['allow_headers'] + - self.simple_headers) - if upper_header not in (header.upper() for header in - permitted_headers): + if upper_header not in permitted_headers: + LOG.debug('Request header \'%s\' not in permitted list: %s' + % (requested_header, permitted_headers)) return response # Set the default origin permission headers. (Sections 6.2.7, 6.4) @@ -320,4 +365,8 @@ # Attach the exposed headers and exit. (Section 6.1.4) if cors_config['expose_headers']: response.headers['Access-Control-Expose-Headers'] = \ - ','.join(cors_config['expose_headers']) + ','.join(cors_config['expose_headers'] + + self._latent_configuration['expose_headers']) + +# NOTE(sileht): Shortcut for backwards compatibility +filter_factory = CORS.factory diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/debug.py new/oslo.middleware-2.8.0/oslo_middleware/debug.py --- old/oslo.middleware-2.4.0/oslo_middleware/debug.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/debug.py 2015-08-27 18:26:00.000000000 +0200 @@ -25,7 +25,7 @@ from oslo_middleware import base -class Debug(base.Middleware): +class Debug(base.ConfigurableMiddleware): """Helper class that returns debug information. Can be inserted into any WSGI application chain to get information about diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/healthcheck/__init__.py new/oslo.middleware-2.8.0/oslo_middleware/healthcheck/__init__.py --- old/oslo.middleware-2.4.0/oslo_middleware/healthcheck/__init__.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/healthcheck/__init__.py 2015-08-27 18:26:00.000000000 +0200 @@ -21,7 +21,7 @@ from oslo_middleware import base -class Healthcheck(base.Middleware): +class Healthcheck(base.ConfigurableMiddleware): """Healthcheck middleware used for monitoring. If the path is /healthcheck, it will respond 200 with "OK" as the body. @@ -72,16 +72,6 @@ NAMESPACE = "oslo.middleware.healthcheck" - @classmethod - def factory(cls, global_conf, **local_conf): - """Factory method for paste.deploy.""" - conf = global_conf.copy() - conf.update(local_conf) - - def healthcheck_filter(app): - return cls(app, conf) - return healthcheck_filter - def __init__(self, application, conf): super(Healthcheck, self).__init__(application) self._path = conf.get('path', '/healthcheck') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/healthcheck/pluginbase.py new/oslo.middleware-2.8.0/oslo_middleware/healthcheck/pluginbase.py --- old/oslo.middleware-2.4.0/oslo_middleware/healthcheck/pluginbase.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/healthcheck/pluginbase.py 2015-08-27 18:26:00.000000000 +0200 @@ -19,7 +19,7 @@ import six HealthcheckResult = collections.namedtuple( - 'HealthcheckResult', ['available', 'reason'], verbose=True) + 'HealthcheckResult', ['available', 'reason']) @six.add_metaclass(abc.ABCMeta) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/opts.py new/oslo.middleware-2.8.0/oslo_middleware/opts.py --- old/oslo.middleware-2.4.0/oslo_middleware/opts.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/opts.py 2015-08-27 18:26:00.000000000 +0200 @@ -15,10 +15,14 @@ __all__ = [ 'list_opts', + 'list_opts_sizelimit', + 'list_opts_ssl', + 'list_opts_cors' ] import copy +import itertools from oslo_middleware import cors from oslo_middleware import sizelimit @@ -26,7 +30,83 @@ def list_opts(): - """Return a list of oslo.config options available in the library. + """Return a list of oslo.config options for ALL of the middleware classes. + + The returned list includes all oslo.config options which may be registered + at runtime by the library. + + Each element of the list is a tuple. The first element is the name of the + group under which the list of elements in the second element will be + registered. A group name of None corresponds to the [DEFAULT] group in + config files. + + This function is also discoverable via the 'oslo.concurrency' entry point + under the 'oslo.config.opts' namespace. + + The purpose of this is to allow tools like the Oslo sample config file + generator to discover the options exposed to users by this library. + + :returns: a list of (group_name, opts) tuples + """ + return list( + itertools.chain( + list_opts_sizelimit(), + list_opts_ssl(), + list_opts_cors(), + ) + ) + + +def list_opts_sizelimit(): + """Return a list of oslo.config options for the sizelimit middleware. + + The returned list includes all oslo.config options which may be registered + at runtime by the library. + + Each element of the list is a tuple. The first element is the name of the + group under which the list of elements in the second element will be + registered. A group name of None corresponds to the [DEFAULT] group in + config files. + + This function is also discoverable via the 'oslo.concurrency' entry point + under the 'oslo.config.opts' namespace. + + The purpose of this is to allow tools like the Oslo sample config file + generator to discover the options exposed to users by this library. + + :returns: a list of (group_name, opts) tuples + """ + return [ + ('oslo_middleware', copy.deepcopy(sizelimit._opts)), + ] + + +def list_opts_ssl(): + """Return a list of oslo.config options for the sizelimit middleware. + + The returned list includes all oslo.config options which may be registered + at runtime by the library. + + Each element of the list is a tuple. The first element is the name of the + group under which the list of elements in the second element will be + registered. A group name of None corresponds to the [DEFAULT] group in + config files. + + This function is also discoverable via the 'oslo.concurrency' entry point + under the 'oslo.config.opts' namespace. + + The purpose of this is to allow tools like the Oslo sample config file + generator to discover the options exposed to users by this library. + + :returns: a list of (group_name, opts) tuples + """ + return [ + ('oslo_middleware', copy.deepcopy(ssl.OPTS)), + ] + + +def list_opts_cors(): + """Return a list of oslo.config options for the cors middleware. The returned list includes all oslo.config options which may be registered at runtime by the library. @@ -45,7 +125,6 @@ :returns: a list of (group_name, opts) tuples """ return [ - ('oslo_middleware', copy.deepcopy(sizelimit._opts + ssl.OPTS)), ('cors', copy.deepcopy(cors.CORS_OPTS)), ('cors.subdomain', copy.deepcopy(cors.CORS_OPTS)) ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/request_id.py new/oslo.middleware-2.8.0/oslo_middleware/request_id.py --- old/oslo.middleware-2.4.0/oslo_middleware/request_id.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/request_id.py 2015-08-27 18:26:00.000000000 +0200 @@ -23,7 +23,7 @@ HTTP_RESP_HEADER_REQUEST_ID = 'x-openstack-request-id' -class RequestId(base.Middleware): +class RequestId(base.ConfigurableMiddleware): """Middleware that ensures request ID. It ensures to assign request ID for each API request and set it to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/sizelimit.py new/oslo.middleware-2.8.0/oslo_middleware/sizelimit.py --- old/oslo.middleware-2.4.0/oslo_middleware/sizelimit.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/sizelimit.py 2015-08-27 18:26:00.000000000 +0200 @@ -18,7 +18,6 @@ """ from oslo_config import cfg -from oslo_config import cfgfilter import webob.dec import webob.exc @@ -40,9 +39,6 @@ deprecated_opts=_oldopts) ] -CONF = cfgfilter.ConfigFilter(cfg.CONF) -CONF.register_opts(_opts, group='oslo_middleware') - class LimitingReader(object): """Reader to limit the size of an incoming request.""" @@ -79,12 +75,16 @@ return result -class RequestBodySizeLimiter(base.Middleware): +class RequestBodySizeLimiter(base.ConfigurableMiddleware): """Limit the size of incoming requests.""" + def __init__(self, application, conf=None): + super(RequestBodySizeLimiter, self).__init__(application, conf) + self.oslo_conf.register_opts(_opts, group='oslo_middleware') + @webob.dec.wsgify def __call__(self, req): - max_size = CONF.oslo_middleware.max_request_body_size + max_size = self._conf_get('max_request_body_size') if (req.content_length is not None and req.content_length > max_size): msg = _("Request is too large.") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/ssl.py new/oslo.middleware-2.8.0/oslo_middleware/ssl.py --- old/oslo.middleware-2.4.0/oslo_middleware/ssl.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/ssl.py 2015-08-27 18:26:00.000000000 +0200 @@ -21,10 +21,9 @@ "the original request protocol scheme was, even if it was " "hidden by an SSL termination proxy.") ] -cfg.CONF.register_opts(OPTS, group='oslo_middleware') -class SSLMiddleware(base.Middleware): +class SSLMiddleware(base.ConfigurableMiddleware): """SSL termination proxies middleware. This middleware overloads wsgi.url_scheme with the one provided in @@ -32,12 +31,13 @@ termination proxy. """ - def __init__(self, application): - super(SSLMiddleware, self).__init__(application) - self.header_name = 'HTTP_{0}'.format( - cfg.CONF.oslo_middleware.secure_proxy_ssl_header.upper() - .replace('-', '_')) + def __init__(self, application, *args, **kwargs): + super(SSLMiddleware, self).__init__(application, *args, **kwargs) + self.oslo_conf.register_opts(OPTS, group='oslo_middleware') def process_request(self, req): + self.header_name = 'HTTP_{0}'.format( + self._conf_get('secure_proxy_ssl_header').upper() + .replace('-', '_')) req.environ['wsgi.url_scheme'] = req.environ.get( self.header_name, req.environ['wsgi.url_scheme']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/tests/test_base.py new/oslo.middleware-2.8.0/oslo_middleware/tests/test_base.py --- old/oslo.middleware-2.4.0/oslo_middleware/tests/test_base.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/tests/test_base.py 2015-08-27 18:26:00.000000000 +0200 @@ -14,28 +14,25 @@ import webob +from oslo_middleware.base import ConfigurableMiddleware from oslo_middleware.base import Middleware from oslotest.base import BaseTestCase +@webob.dec.wsgify +def application(req): + return 'Hello, World!!!' + + class TestBase(BaseTestCase): """Test the base middleware class.""" - def setUp(self): - """Setup the tests.""" - super(BaseTestCase, self).setUp() - def test_extend_with_request(self): """Assert that a newer middleware behaves as appropriate. This tests makes sure that the request is passed to the middleware's implementation. """ - # Create an application. - @webob.dec.wsgify - def application(req): - return 'Hello, World!!!' - # Bootstrap the application self.application = RequestBase(application) @@ -52,11 +49,6 @@ middleware's implementation, and that there are no other expected errors. """ - # Create an application. - @webob.dec.wsgify - def application(req): - return 'Hello, World!!!' - # Bootstrap the application self.application = NoRequestBase(application) @@ -66,6 +58,16 @@ self.assertTrue(self.application.called_without_request) + def test_paste_deploy_legacy(self): + app = LegacyMiddlewareTest.factory( + {'global': True}, local=True)(application) + self.assertEqual(app.conf, {}) + + def test_paste_deploy_configurable(self): + app = ConfigurableMiddlewareTest.factory( + {'global': True}, local=True)(application) + self.assertEqual(app.conf, {'global': True, 'local': True}) + class NoRequestBase(Middleware): """Test middleware, implements old model.""" @@ -79,3 +81,11 @@ def process_response(self, response, request): self.called_with_request = True return response + + +class ConfigurableMiddlewareTest(ConfigurableMiddleware): + pass + + +class LegacyMiddlewareTest(Middleware): + pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/tests/test_cors.py new/oslo.middleware-2.8.0/oslo_middleware/tests/test_cors.py --- old/oslo.middleware-2.4.0/oslo_middleware/tests/test_cors.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/tests/test_cors.py 2015-08-27 18:26:00.000000000 +0200 @@ -115,6 +115,8 @@ """Test the CORS filter_factory method.""" def test_filter_factory(self): + self.useFixture(fixture.Config()).conf([]) + # Test a valid filter. filter = cors.filter_factory(None, allowed_origin='http://valid.example.com', @@ -128,11 +130,11 @@ self.assertIn('http://valid.example.com', application.allowed_origins) config = application.allowed_origins['http://valid.example.com'] - self.assertEqual('False', config['allow_credentials']) - self.assertEqual('', config['max_age']) - self.assertEqual('', config['expose_headers']) - self.assertEqual('GET', config['allow_methods']) - self.assertEqual('', config['allow_headers']) + self.assertEqual(False, config['allow_credentials']) + self.assertEqual(None, config['max_age']) + self.assertEqual([], config['expose_headers']) + self.assertEqual(['GET'], config['allow_methods']) + self.assertEqual([], config['allow_headers']) def test_no_origin_fail(self): '''Assert that a filter factory with no allowed_origin fails.''' @@ -583,6 +585,41 @@ allow_credentials=None, expose_headers=None) + def test_simple_header_response(self): + """CORS Specification Section 3 + + A header is said to be a simple header if the header field name is an + ASCII case-insensitive match for Accept, Accept-Language, or + Content-Language or if it is an ASCII case-insensitive match for + Content-Type and the header field value media type (excluding + parameters) is an ASCII case-insensitive match for + application/x-www-form-urlencoded, multipart/form-data, or text/plain. + + NOTE: We are not testing the media type cases. + """ + + simple_headers = ','.join([ + 'accept', + 'accept-language', + 'content-language', + 'content-type' + ]) + + request = webob.Request.blank('/') + request.method = "OPTIONS" + request.headers['Origin'] = 'http://valid.example.com' + request.headers['Access-Control-Request-Method'] = 'GET' + request.headers['Access-Control-Request-Headers'] = simple_headers + response = request.get_response(self.application) + self.assertCORSResponse(response, + status='200 OK', + allow_origin='http://valid.example.com', + max_age=None, + allow_methods='GET', + allow_headers=simple_headers, + allow_credentials=None, + expose_headers=None) + def test_no_request_method(self): """CORS Specification Section 6.2.3 @@ -996,3 +1033,113 @@ allow_headers='', allow_credentials='true', expose_headers=None) + + +class CORSTestLatentProperties(CORSTestBase): + """Test the CORS wildcard specification.""" + + def setUp(self): + super(CORSTestLatentProperties, self).setUp() + + # Set up the config fixture. + config = self.useFixture(fixture.Config(cfg.CONF)) + + config.load_raw_values(group='cors', + allowed_origin='http://default.example.com', + allow_credentials='True', + max_age='', + expose_headers='X-Configured', + allow_methods='GET', + allow_headers='X-Configured') + + # Now that the config is set up, create our application. + self.application = cors.CORS(test_application, cfg.CONF) + + def test_latent_methods(self): + """Assert that latent HTTP methods are permitted.""" + + self.application.set_latent(allow_headers=None, + expose_headers=None, + allow_methods=['POST']) + + request = webob.Request.blank('/') + request.method = "OPTIONS" + request.headers['Origin'] = 'http://default.example.com' + request.headers['Access-Control-Request-Method'] = 'POST' + response = request.get_response(self.application) + self.assertCORSResponse(response, + status='200 OK', + allow_origin='http://default.example.com', + max_age=None, + allow_methods='POST', + allow_headers='', + allow_credentials='true', + expose_headers=None) + + def test_invalid_latent_methods(self): + """Assert that passing a non-list is caught.""" + + self.assertRaises(TypeError, + self.application.set_latent, + allow_methods='POST') + + def test_latent_allow_headers(self): + """Assert that latent HTTP headers are permitted.""" + + self.application.set_latent(allow_headers=['X-Latent'], + expose_headers=None, + allow_methods=None) + + request = webob.Request.blank('/') + request.method = "OPTIONS" + request.headers['Origin'] = 'http://default.example.com' + request.headers['Access-Control-Request-Method'] = 'GET' + request.headers[ + 'Access-Control-Request-Headers'] = 'X-Latent,X-Configured' + response = request.get_response(self.application) + self.assertCORSResponse(response, + status='200 OK', + allow_origin='http://default.example.com', + max_age=None, + allow_methods='GET', + allow_headers='X-Latent,X-Configured', + allow_credentials='true', + expose_headers=None) + + def test_invalid_latent_allow_headers(self): + """Assert that passing a non-list is caught in allow headers.""" + + self.assertRaises(TypeError, + self.application.set_latent, + allow_headers='X-Latent') + + def test_latent_expose_headers(self): + """Assert that latent HTTP headers are exposed.""" + + self.application.set_latent(allow_headers=None, + expose_headers=[ + 'X-Server-Generated-Response'], + allow_methods=None) + + request = webob.Request.blank('/') + request.method = "GET" + request.headers['Origin'] = 'http://default.example.com' + response = request.get_response(self.application) + self.assertCORSResponse(response, + status='200 OK', + allow_origin='http://default.example.com', + max_age=None, + allow_methods=None, + allow_headers=None, + allow_credentials='true', + expose_headers='X-Configured,' + 'X-Server-Generated-Response') + + def test_invalid_latent_expose_headers(self): + """Assert that passing a non-list is caught in expose headers.""" + + # Add headers to the application. + + self.assertRaises(TypeError, + self.application.set_latent, + expose_headers='X-Latent') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/tests/test_opts.py new/oslo.middleware-2.8.0/oslo_middleware/tests/test_opts.py --- old/oslo.middleware-2.4.0/oslo_middleware/tests/test_opts.py 1970-01-01 01:00:00.000000000 +0100 +++ new/oslo.middleware-2.8.0/oslo_middleware/tests/test_opts.py 2015-08-27 18:26:00.000000000 +0200 @@ -0,0 +1,31 @@ +# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from oslo_middleware import opts +from oslotest.base import BaseTestCase + + +class TestOptionDiscovery(BaseTestCase): + + def test_all(self): + opts.list_opts() + + def test_sizelimit(self): + opts.list_opts_sizelimit() + + def test_cors(self): + opts.list_opts_cors() + + def test_ssl(self): + opts.list_opts_ssl() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/tests/test_sizelimit.py new/oslo.middleware-2.8.0/oslo_middleware/tests/test_sizelimit.py --- old/oslo.middleware-2.4.0/oslo_middleware/tests/test_sizelimit.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/tests/test_sizelimit.py 2015-08-27 18:26:00.000000000 +0200 @@ -78,15 +78,15 @@ def setUp(self): super(TestRequestBodySizeLimiter, self).setUp() - fixture = self.useFixture(config.Config(sizelimit.CONF)) - self.MAX_REQUEST_BODY_SIZE = \ - fixture.conf.oslo_middleware.max_request_body_size + self.useFixture(config.Config()) @webob.dec.wsgify() def fake_app(req): return webob.Response(req.body) self.middleware = sizelimit.RequestBodySizeLimiter(fake_app) + self.MAX_REQUEST_BODY_SIZE = ( + self.middleware.oslo_conf.oslo_middleware.max_request_body_size) self.request = webob.Request.blank('/', method='POST') def test_content_length_acceptable(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/oslo_middleware/tests/test_ssl.py new/oslo.middleware-2.8.0/oslo_middleware/tests/test_ssl.py --- old/oslo.middleware-2.4.0/oslo_middleware/tests/test_ssl.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/oslo_middleware/tests/test_ssl.py 2015-08-27 18:26:00.000000000 +0200 @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_config import cfg from oslo_config import fixture as config from oslotest import base import webob @@ -27,8 +26,12 @@ super(SSLMiddlewareTest, self).setUp() self.useFixture(config.Config()) - def _test_scheme(self, expected, headers): + def _test_scheme(self, expected, headers, secure_proxy_ssl_header=None): middleware = ssl.SSLMiddleware(None) + if secure_proxy_ssl_header: + middleware.oslo_conf.set_override( + 'secure_proxy_ssl_header', secure_proxy_ssl_header, + group='oslo_middleware') request = webob.Request.blank('http://example.com/', headers=headers) # Ensure ssl middleware does not stop pipeline execution @@ -44,13 +47,11 @@ self._test_scheme('https', headers) def test_with_custom_header(self): - cfg.CONF.set_override('secure_proxy_ssl_header', 'X-My-Header', - group='oslo_middleware') headers = {'X-Forwarded-Proto': 'https'} - self._test_scheme('http', headers) + self._test_scheme('http', headers, + secure_proxy_ssl_header='X-My-Header') def test_with_custom_header_and_forwarded_protocol(self): - cfg.CONF.set_override('secure_proxy_ssl_header', 'X-My-Header', - group='oslo_middleware') headers = {'X-My-Header': 'https'} - self._test_scheme('https', headers) + self._test_scheme('https', headers, + secure_proxy_ssl_header='X-My-Header') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/requirements.txt new/oslo.middleware-2.8.0/requirements.txt --- old/oslo.middleware-2.4.0/requirements.txt 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/requirements.txt 2015-08-27 18:26:00.000000000 +0200 @@ -2,9 +2,9 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -pbr<2.0,>=0.11 +pbr<2.0,>=1.6 Babel>=1.3 -oslo.config>=1.11.0 # Apache-2.0 +oslo.config>=2.3.0 # Apache-2.0 oslo.context>=0.2.0 # Apache-2.0 oslo.i18n>=1.5.0 # Apache-2.0 six>=1.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/setup.cfg new/oslo.middleware-2.8.0/setup.cfg --- old/oslo.middleware-2.4.0/setup.cfg 2015-07-13 20:35:02.000000000 +0200 +++ new/oslo.middleware-2.8.0/setup.cfg 2015-08-27 18:26:29.000000000 +0200 @@ -30,6 +30,9 @@ [entry_points] oslo.config.opts = oslo.middleware = oslo_middleware.opts:list_opts + oslo.middleware.cors = oslo_middleware.opts:list_opts_cors + oslo.middleware.sizelimit = oslo_middleware.opts:list_opts_sizelimit + oslo.middleware.ssl = oslo_middleware.opts:list_opts_ssl oslo.middleware.healthcheck = disable_by_file = oslo_middleware.healthcheck.disable_by_file:DisableByFileHealthcheck @@ -63,6 +66,6 @@ [egg_info] tag_date = 0 -tag_build = tag_svn_revision = 0 +tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/setup.py new/oslo.middleware-2.8.0/setup.py --- old/oslo.middleware-2.4.0/setup.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/setup.py 2015-08-27 18:26:00.000000000 +0200 @@ -25,5 +25,5 @@ pass setuptools.setup( - setup_requires=['pbr'], + setup_requires=['pbr>=1.3'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/test-requirements.txt new/oslo.middleware-2.8.0/test-requirements.txt --- old/oslo.middleware-2.4.0/test-requirements.txt 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/test-requirements.txt 2015-08-27 18:26:00.000000000 +0200 @@ -4,10 +4,9 @@ fixtures>=1.3.1 hacking<0.11,>=0.10.0 -mock>=1.1;python_version!='2.6' -mock==1.0.1;python_version=='2.6' +mock>=1.2 oslosphinx>=2.5.0 # Apache-2.0 -oslotest>=1.5.1 # Apache-2.0 +oslotest>=1.10.0 # Apache-2.0 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 testtools>=1.4.0 coverage>=3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/oslo.middleware-2.4.0/tests/test_sizelimit.py new/oslo.middleware-2.8.0/tests/test_sizelimit.py --- old/oslo.middleware-2.4.0/tests/test_sizelimit.py 2015-07-13 20:34:39.000000000 +0200 +++ new/oslo.middleware-2.8.0/tests/test_sizelimit.py 2015-08-27 18:26:00.000000000 +0200 @@ -78,15 +78,15 @@ def setUp(self): super(TestRequestBodySizeLimiter, self).setUp() - fixture = self.useFixture(config.Config(sizelimit.CONF)) - self.MAX_REQUEST_BODY_SIZE = \ - fixture.conf.oslo_middleware.max_request_body_size + self.useFixture(config.Config()) @webob.dec.wsgify() def fake_app(req): return webob.Response(req.body) self.middleware = sizelimit.RequestBodySizeLimiter(fake_app) + self.MAX_REQUEST_BODY_SIZE = ( + self.middleware.oslo_conf.oslo_middleware.max_request_body_size) self.request = webob.Request.blank('/', method='POST') def test_content_length_acceptable(self):