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

39 statements  

« prev     ^ index     » next       coverage.py v7.10.1, created at 2025-07-28 07:25 +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, 2024 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_UserPasswords_added( 

113 self, 

114 objkey: Any, 

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

116 newobj: DataObject, 

117 ): 

118 pass 

119 

120 def on_UserPasswords_modified( 

121 self, 

122 objkey: Any, 

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

124 newobj: DataObject, 

125 cachedobj: DataObject, 

126 ): 

127 pass 

128 

129 def on_UserPasswords_removed( 

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

131 ): 

132 pass