From a6559b68571ec56ac7b949f515434da2e0bce9ef Mon Sep 17 00:00:00 2001 From: jichenjc Date: Tue, 6 Oct 2015 09:34:11 +0800 Subject: [PATCH] devref:Don't suggest decorate private method per https://review.openstack.org/#/c/164229 suggested on the spec, we should not suggest private method decoration on microversion, so this update the doc to sync it Change-Id: Ie937173a4d1542eb1c551795ca371ebce69c7078 --- doc/source/api_microversion_dev.rst | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/doc/source/api_microversion_dev.rst b/doc/source/api_microversion_dev.rst index 528495a4fc07..54ad7791ba42 100644 --- a/doc/source/api_microversion_dev.rst +++ b/doc/source/api_microversion_dev.rst @@ -234,25 +234,6 @@ them will need ``# noqa`` to avoid failing flake8's ``F811`` rule. The two methods may be different in any kind of semantics (schema validation, return values, response codes, etc) -A method with only small changes between versions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A method may have only small changes between microversions, in which -case you can decorate a private method:: - - @api_version("2.1", "2.4") - def _version_specific_func(self, req, arg1): - pass - - @api_version(min_version="2.5") # noqa - def _version_specific_func(self, req, arg1): - pass - - def show(self, req, id): - .... common stuff .... - self._version_specific_func(req, "foo") - .... common stuff .... - A change in schema only ~~~~~~~~~~~~~~~~~~~~~~~