Watcher base action abstract methods should be renamed for consistency

Bug #1606634 reported by Joe Cropper on 2016-07-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Low
Joe Cropper

Bug Description

This is a nit, but we should be consistent. The watcher.applier.actions.base code has:

    @abc.abstractmethod
    def precondition(self):
        """Hook: called before the execution of an action

        This method can be used to perform some initializations or to make
        some more advanced validation on its input parameters. So if you wish
        to block its execution based on this factor, `raise` the related
        exception.
        """
        raise NotImplementedError()

    @abc.abstractmethod
    def postcondition(self):
        """Hook: called after the execution of an action

        This function is called regardless of whether an action succeded or
        not. So you can use it to perform cleanup operations.
        """
        raise NotImplementedError()

And in other areas of similar patterns, we use pre_condition and post_condition. We should clean this up and use consistent formatting of the method names (read: rename these to use the '_' delimiter).

Joe Cropper (jwcroppe) on 2016-07-26
Changed in watcher:
importance: Undecided → Low
Joe Cropper (jwcroppe) on 2016-08-06
Changed in watcher:
assignee: nobody → Joe Cropper (jwcroppe)

Fix proposed to branch: master
Review: https://review.openstack.org/352046

Changed in watcher:
status: New → In Progress
Joe Cropper (jwcroppe) on 2016-08-07
Changed in watcher:
milestone: none → newton-3

Reviewed: https://review.openstack.org/352046
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=ea0103126897ff3c077443a279f2c912175f6e9b
Submitter: Jenkins
Branch: master

commit ea0103126897ff3c077443a279f2c912175f6e9b
Author: Joe Cropper <email address hidden>
Date: Sat Aug 6 16:21:30 2016 -0500

    Rename (pre/post)condition to (pre/post)_condition

    This patch updates the applier's abstract methods to be consistent
    with other abstract methods of similar nature.

    Also included are a few other miscellaneous changes.

    Change-Id: Ia1527c00332011412aba2ab326ec986f1e773001
    Closes-bug: 1606634

Changed in watcher:
status: In Progress → Fix Released

This issue was fixed in the openstack/watcher 0.29.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers