Watcher base action abstract methods should be renamed for consistency

Bug #1606634 reported by Joe Cropper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
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)
Changed in watcher:
importance: Undecided → Low
Joe Cropper (jwcroppe)
Changed in watcher:
assignee: nobody → Joe Cropper (jwcroppe)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

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

Changed in watcher:
status: New → In Progress
Joe Cropper (jwcroppe)
Changed in watcher:
milestone: none → newton-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

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
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/watcher 0.29.0

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.