Add validate() base method

Now that all backends implement a validate that
can be called to check if the backend is still
useable we can add a base method to the base class
that defines exactly what this new method does.

Change-Id: Ica4571970bad2de16ce2071a645abf24c25c110b
This commit is contained in:
Joshua Harlow
2014-02-05 20:12:44 -08:00
parent 24b8e5064b
commit 29e44f39b8

View File

@@ -68,6 +68,14 @@ class Connection(object):
"""Clear all entries from this backend."""
pass
@abc.abstractmethod
def validate(self):
"""Validates that a backend is still ok to be used (the semantics
of this vary depending on the backend). On failure a backend specific
exception is raised that will indicate why the failure occurred.
"""
pass
@abc.abstractmethod
def update_task_details(self, task_detail):
"""Updates a given task details and returns the updated version.