Coverage for plugins / clients / usersgroups_null / usersgroups_null.py: 59%

49 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-16 15:16 +0000

1#!/usr/bin/env python3 

2# -*- coding: utf-8 -*- 

3 

4# Hermes : Change Data Capture (CDC) tool from any source(s) to any target 

5# Copyright (C) 2023 INSA Strasbourg 

6# 

7# This file is part of Hermes. 

8# 

9# Hermes is free software: you can redistribute it and/or modify 

10# it under the terms of the GNU General Public License as published by 

11# the Free Software Foundation, either version 3 of the License, or 

12# (at your option) any later version. 

13# 

14# Hermes is distributed in the hope that it will be useful, 

15# but WITHOUT ANY WARRANTY; without even the implied warranty of 

16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

17# GNU General Public License for more details. 

18# 

19# You should have received a copy of the GNU General Public License 

20# along with Hermes. If not, see <https://www.gnu.org/licenses/>. 

21 

22 

23from clients import GenericClient 

24from lib.datamodel.dataobject import DataObject 

25 

26from typing import Any 

27 

28HERMES_PLUGIN_CLASSNAME = "NullClient" 

29 

30 

31class NullClient(GenericClient): 

32 """Hermes-client class that does nothing but logging""" 

33 

34 def on_Users_added( 

35 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

36 ): 

37 pass 

38 

39 def on_Users_recycled( 

40 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

41 ): 

42 pass 

43 

44 def on_Users_modified( 

45 self, 

46 objkey: Any, 

47 eventattrs: "dict[str, Any]", 

48 newobj: DataObject, 

49 cachedobj: DataObject, 

50 ): 

51 pass 

52 

53 def on_Users_trashed( 

54 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

55 ): 

56 pass 

57 

58 def on_Users_removed( 

59 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

60 ): 

61 pass 

62 

63 def on_Groups_added( 

64 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

65 ): 

66 pass 

67 

68 def on_Groups_recycled( 

69 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

70 ): 

71 pass 

72 

73 def on_Groups_modified( 

74 self, 

75 objkey: Any, 

76 eventattrs: "dict[str, Any]", 

77 newobj: DataObject, 

78 cachedobj: DataObject, 

79 ): 

80 pass 

81 

82 def on_Groups_trashed( 

83 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

84 ): 

85 pass 

86 

87 def on_Groups_removed( 

88 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

89 ): 

90 pass 

91 

92 def on_GroupsMembers_added( 

93 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

94 ): 

95 pass 

96 

97 def on_GroupsMembers_recycled( 

98 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

99 ): 

100 pass 

101 

102 def on_GroupsMembers_trashed( 

103 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

104 ): 

105 pass 

106 

107 def on_GroupsMembers_removed( 

108 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

109 ): 

110 pass 

111 

112 def on_MembersOfGroups_added( 

113 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

114 ): 

115 pass 

116 

117 def on_MembersOfGroups_recycled( 

118 self, objkey: Any, eventattrs: "dict[str, Any]", newobj: DataObject 

119 ): 

120 pass 

121 

122 def on_MembersOfGroups_modified( 

123 self, 

124 objkey: Any, 

125 eventattrs: "dict[str, Any]", 

126 newobj: DataObject, 

127 cachedobj: DataObject, 

128 ): 

129 pass 

130 

131 def on_MembersOfGroups_trashed( 

132 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

133 ): 

134 pass 

135 

136 def on_MembersOfGroups_removed( 

137 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

138 ): 

139 pass 

140 

141 def on_UserPasswords_added( 

142 self, 

143 objkey: Any, 

144 eventattrs: "dict[str, Any]", 

145 newobj: DataObject, 

146 ): 

147 pass 

148 

149 def on_UserPasswords_modified( 

150 self, 

151 objkey: Any, 

152 eventattrs: "dict[str, Any]", 

153 newobj: DataObject, 

154 cachedobj: DataObject, 

155 ): 

156 pass 

157 

158 def on_UserPasswords_removed( 

159 self, objkey: Any, eventattrs: "dict[str, Any]", cachedobj: DataObject 

160 ): 

161 pass