From 6a323ed54f9142fa841338a03ecebdc5bcfb44a5 Mon Sep 17 00:00:00 2001 From: Hidekazu Nakamura Date: Wed, 7 Dec 2016 15:50:51 +0900 Subject: [PATCH] Fix method name in doc/source/dev/plugin/action-plugin.rst precondition -> pre_condition postcondition -> post_condition Change-Id: Ia8edc9b428c14ea35225cbbe1a54b67a33151a64 --- doc/source/dev/plugin/action-plugin.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/dev/plugin/action-plugin.rst b/doc/source/dev/plugin/action-plugin.rst index 3e07639bd..29e9bcc3f 100644 --- a/doc/source/dev/plugin/action-plugin.rst +++ b/doc/source/dev/plugin/action-plugin.rst @@ -30,12 +30,12 @@ implement: implement. This is the first function to be called by the :ref:`applier ` before any further processing and its role is to validate the input parameters that were provided to it. - - The :py:meth:`~.BaseAction.precondition` is called before the execution of + - The :py:meth:`~.BaseAction.pre_condition` is called before the execution of an action. This method is a hook that can be used to perform some initializations or to make some more advanced validation on its input parameters. If you wish to block the execution based on this factor, you simply have to ``raise`` an exception. - - The :py:meth:`~.BaseAction.postcondition` is called after the execution of + - The :py:meth:`~.BaseAction.post_condition` is called after the execution of an action. As this function is called regardless of whether an action succeeded or not, this can prove itself useful to perform cleanup operations. @@ -71,11 +71,11 @@ Here is an example showing how you can write a plugin called ``DummyAction``: # Does nothing pass - def precondition(self): + def pre_condition(self): # No pre-checks are done here pass - def postcondition(self): + def post_condition(self): # Nothing done here pass