1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
Description: Displays message when not implemented
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2025-12-26
Index: python-tooz/tooz/coordination.py
===================================================================
--- python-tooz.orig/tooz/coordination.py
+++ python-tooz/tooz/coordination.py
@@ -298,12 +298,12 @@ class CoordinationDriver:
This may also activate :py:meth:`.run_elect_coordinator` (depending
on driver implementation).
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement run_watchers.")
@staticmethod
def run_elect_coordinator():
"""Try to leader elect this coordinator & activate hooks on success."""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement run_elect_coordinator.")
def watch_join_group(self, group_id, callback):
"""Call a function when group_id sees a new member joined.
@@ -406,7 +406,7 @@ class CoordinationDriver:
:param group_id: The group where we don't want to be a leader anymore
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement stand_down_group_leader.")
@property
def is_started(self):
@@ -471,7 +471,7 @@ class CoordinationDriver:
:returns: None
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement create_group.")
@staticmethod
def get_groups():
@@ -480,7 +480,7 @@ class CoordinationDriver:
:returns: the list of all created group ids
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_groups.")
@staticmethod
def join_group(group_id, capabilities=b""):
@@ -493,7 +493,7 @@ class CoordinationDriver:
:returns: None
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement join_group.")
@_retry.retry()
def join_group_create(self, group_id, capabilities=b""):
@@ -531,7 +531,7 @@ class CoordinationDriver:
:returns: None
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement leave_group.")
@staticmethod
def delete_group(group_id):
@@ -542,7 +542,7 @@ class CoordinationDriver:
:returns: Result
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement delete_group.")
@staticmethod
def get_members(group_id):
@@ -551,7 +551,7 @@ class CoordinationDriver:
:returns: set of all member ids in the specified group
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_members.")
@staticmethod
def get_member_capabilities(group_id, member_id):
@@ -564,7 +564,7 @@ class CoordinationDriver:
:returns: capabilities of a member
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_member_capabilities.")
@staticmethod
def get_member_info(group_id, member_id):
@@ -577,7 +577,7 @@ class CoordinationDriver:
:returns: capabilities and statistics of a member
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_member_info.")
@staticmethod
def update_capabilities(group_id, capabilities):
@@ -590,7 +590,7 @@ class CoordinationDriver:
:returns: None
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement update_capabilities.")
@staticmethod
def get_leader(group_id):
@@ -600,7 +600,7 @@ class CoordinationDriver:
:returns: the leader
:rtype: CoordAsyncResult
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_leader.")
@staticmethod
def get_lock(name):
@@ -613,7 +613,7 @@ class CoordinationDriver:
nodes.
"""
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("This coordination driver does not implement get_lock.")
@staticmethod
def heartbeat():
Index: python-tooz/tooz/drivers/ipc.py
===================================================================
--- python-tooz.orig/tooz/drivers/ipc.py
+++ python-tooz/tooz/drivers/ipc.py
@@ -71,7 +71,8 @@ class IPCLock(locking.Lock):
def acquire(self, blocking=True, shared=False, timeout=None):
if shared:
- raise tooz.NotImplemented
+ raise tooz.NotImplemented("IPC driver does not support shared "
+ "locks.")
if (blocking is not True and
sysv_ipc.SEMAPHORE_TIMEOUT_SUPPORTED is False):
|