synapse 2.224.0__py311-none-any.whl → 2.226.0__py311-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of synapse might be problematic. Click here for more details.

Files changed (136) hide show
  1. synapse/axon.py +10 -5
  2. synapse/cortex.py +6 -8
  3. synapse/lib/agenda.py +28 -15
  4. synapse/lib/ast.py +4 -8
  5. synapse/lib/cell.py +1 -1
  6. synapse/lib/const.py +4 -0
  7. synapse/lib/multislabseqn.py +36 -1
  8. synapse/lib/nexus.py +67 -8
  9. synapse/lib/platforms/linux.py +2 -0
  10. synapse/lib/queue.py +4 -1
  11. synapse/lib/rstorm.py +2 -2
  12. synapse/lib/schemas.py +11 -1
  13. synapse/lib/slabseqn.py +28 -0
  14. synapse/lib/storm.py +16 -4
  15. synapse/lib/stormhttp.py +7 -1
  16. synapse/lib/stormlib/aha.py +3 -3
  17. synapse/lib/stormtypes.py +10 -3
  18. synapse/lib/types.py +20 -0
  19. synapse/lib/version.py +2 -2
  20. synapse/models/base.py +3 -0
  21. synapse/models/inet.py +62 -5
  22. synapse/models/infotech.py +18 -0
  23. synapse/models/media.py +4 -0
  24. synapse/models/risk.py +3 -0
  25. synapse/tests/test_cortex.py +115 -2
  26. synapse/tests/test_lib_agenda.py +141 -28
  27. synapse/tests/test_lib_cell.py +1 -1
  28. synapse/tests/test_lib_certdir.py +1 -1
  29. synapse/tests/test_lib_httpapi.py +1 -1
  30. synapse/tests/test_lib_layer.py +1 -1
  31. synapse/tests/test_lib_lmdbslab.py +2 -0
  32. synapse/tests/test_lib_multislabseqn.py +22 -0
  33. synapse/tests/test_lib_nexus.py +42 -1
  34. synapse/tests/test_lib_platforms_linux.py +4 -0
  35. synapse/tests/test_lib_slabseqn.py +30 -1
  36. synapse/tests/test_lib_storm.py +65 -1
  37. synapse/tests/test_lib_stormhttp.py +16 -0
  38. synapse/tests/test_lib_stormlib_aha.py +6 -2
  39. synapse/tests/test_lib_stormlib_oauth.py +1 -1
  40. synapse/tests/test_lib_stormsvc.py +1 -1
  41. synapse/tests/test_lib_trigger.py +1 -1
  42. synapse/tests/test_model_inet.py +37 -0
  43. synapse/tests/test_model_infotech.py +15 -1
  44. synapse/tests/test_model_media.py +4 -1
  45. synapse/tests/test_model_risk.py +2 -0
  46. synapse/tests/test_tools_aha.py +2 -2
  47. synapse/tests/{test_tools_axon2axon.py → test_tools_axon_copy.py} +4 -4
  48. synapse/tests/{test_tools_pullfile.py → test_tools_axon_get.py} +4 -4
  49. synapse/tests/{test_tools_pushfile.py → test_tools_axon_put.py} +7 -7
  50. synapse/tests/{test_tools_csvtool.py → test_tools_cortex_csv.py} +12 -3
  51. synapse/tests/{test_tools_feed.py → test_tools_cortex_feed.py} +2 -2
  52. synapse/tests/{test_tools_apikey.py → test_tools_service_apikey.py} +1 -4
  53. synapse/tests/{test_tools_backup.py → test_tools_service_backup.py} +5 -5
  54. synapse/tests/{test_tools_demote.py → test_tools_service_demote.py} +1 -1
  55. synapse/tests/{test_tools_healthcheck.py → test_tools_service_healthcheck.py} +1 -1
  56. synapse/tests/{test_tools_livebackup.py → test_tools_service_livebackup.py} +1 -1
  57. synapse/tests/{test_tools_modrole.py → test_tools_service_modrole.py} +1 -1
  58. synapse/tests/{test_tools_moduser.py → test_tools_service_moduser.py} +1 -1
  59. synapse/tests/{test_tools_promote.py → test_tools_service_promote.py} +1 -1
  60. synapse/tests/{test_tools_reload.py → test_tools_service_reload.py} +1 -1
  61. synapse/tests/{test_tools_shutdown.py → test_tools_service_shutdown.py} +1 -1
  62. synapse/tests/{test_tools_snapshot.py → test_tools_service_snapshot.py} +1 -1
  63. synapse/tests/{test_tools_storm.py → test_tools_storm_cli.py} +1 -1
  64. synapse/tests/{test_tools_pkgs_gendocs.py → test_tools_storm_pkg_doc.py} +12 -3
  65. synapse/tests/{test_tools_genpkg.py → test_tools_storm_pkg_gen.py} +1 -1
  66. synapse/tests/{test_tools_autodoc.py → test_tools_utils_autodoc.py} +1 -1
  67. synapse/tests/test_tools_utils_changelog.py +454 -0
  68. synapse/tests/{test_tools_easycert.py → test_tools_utils_easycert.py} +48 -46
  69. synapse/tests/{test_tools_guid.py → test_tools_utils_guid.py} +3 -3
  70. synapse/tests/{test_tools_json2mpk.py → test_tools_utils_json2mpk.py} +3 -3
  71. synapse/tests/{test_tools_rstorm.py → test_tools_utils_rstorm.py} +6 -1
  72. synapse/tests/utils.py +15 -1
  73. synapse/tools/aha/mirror.py +1 -1
  74. synapse/tools/apikey.py +4 -83
  75. synapse/tools/autodoc.py +3 -1031
  76. synapse/tools/axon/copy.py +44 -0
  77. synapse/tools/axon/get.py +64 -0
  78. synapse/tools/axon/put.py +122 -0
  79. synapse/tools/axon2axon.py +3 -36
  80. synapse/tools/backup.py +6 -176
  81. synapse/tools/changelog.py +3 -1098
  82. synapse/tools/cortex/csv.py +236 -0
  83. synapse/tools/cortex/feed.py +151 -0
  84. synapse/tools/csvtool.py +3 -227
  85. synapse/tools/demote.py +4 -40
  86. synapse/tools/docker/validate.py +3 -3
  87. synapse/tools/easycert.py +4 -129
  88. synapse/tools/feed.py +3 -140
  89. synapse/tools/genpkg.py +3 -307
  90. synapse/tools/guid.py +7 -6
  91. synapse/tools/healthcheck.py +3 -101
  92. synapse/tools/json2mpk.py +6 -38
  93. synapse/tools/livebackup.py +4 -27
  94. synapse/tools/modrole.py +3 -108
  95. synapse/tools/moduser.py +3 -179
  96. synapse/tools/pkgs/gendocs.py +3 -164
  97. synapse/tools/promote.py +4 -41
  98. synapse/tools/pullfile.py +3 -56
  99. synapse/tools/pushfile.py +3 -114
  100. synapse/tools/reload.py +4 -61
  101. synapse/tools/rstorm.py +3 -26
  102. synapse/tools/service/__init__.py +0 -0
  103. synapse/tools/service/apikey.py +90 -0
  104. synapse/tools/service/backup.py +181 -0
  105. synapse/tools/service/demote.py +47 -0
  106. synapse/tools/service/healthcheck.py +109 -0
  107. synapse/tools/service/livebackup.py +34 -0
  108. synapse/tools/service/modrole.py +116 -0
  109. synapse/tools/service/moduser.py +184 -0
  110. synapse/tools/service/promote.py +48 -0
  111. synapse/tools/service/reload.py +68 -0
  112. synapse/tools/service/shutdown.py +51 -0
  113. synapse/tools/service/snapshot.py +64 -0
  114. synapse/tools/shutdown.py +5 -45
  115. synapse/tools/snapshot.py +4 -57
  116. synapse/tools/storm/__init__.py +0 -0
  117. synapse/tools/storm/__main__.py +5 -0
  118. synapse/tools/{storm.py → storm/_cli.py} +0 -3
  119. synapse/tools/storm/pkg/__init__.py +0 -0
  120. synapse/tools/{pkgs/pandoc_filter.py → storm/pkg/_pandoc_filter.py} +1 -1
  121. synapse/tools/storm/pkg/doc.py +176 -0
  122. synapse/tools/storm/pkg/gen.py +315 -0
  123. synapse/tools/utils/__init__.py +0 -0
  124. synapse/tools/utils/autodoc.py +1040 -0
  125. synapse/tools/utils/changelog.py +1124 -0
  126. synapse/tools/utils/easycert.py +136 -0
  127. synapse/tools/utils/guid.py +11 -0
  128. synapse/tools/utils/json2mpk.py +46 -0
  129. synapse/tools/utils/rstorm.py +35 -0
  130. {synapse-2.224.0.dist-info → synapse-2.226.0.dist-info}/METADATA +1 -1
  131. {synapse-2.224.0.dist-info → synapse-2.226.0.dist-info}/RECORD +135 -106
  132. synapse/tests/test_tools_changelog.py +0 -196
  133. /synapse/tests/{test_tools_axon.py → test_tools_axon_dump_load.py} +0 -0
  134. {synapse-2.224.0.dist-info → synapse-2.226.0.dist-info}/WHEEL +0 -0
  135. {synapse-2.224.0.dist-info → synapse-2.226.0.dist-info}/licenses/LICENSE +0 -0
  136. {synapse-2.224.0.dist-info → synapse-2.226.0.dist-info}/top_level.txt +0 -0
@@ -1,196 +0,0 @@
1
- import synapse.tests.utils as s_test_utils
2
-
3
- import synapse.tools.changelog as s_t_changelog
4
-
5
- class ChangelogToolTest(s_test_utils.SynTest):
6
-
7
- async def test_model_diff(self):
8
- outp = self.getTestOutp()
9
- old_fp = self.getTestFilePath('changelog', 'model_2.176.0_16ee721a6b7221344eaf946c3ab4602dda546b1a.yaml.gz')
10
- new_fp = self.getTestFilePath('changelog', 'model_2.176.0_2a25c58bbd344716cd7cbc3f4304d8925b0f4ef2.yaml.gz')
11
- oldmodel = s_t_changelog._getModelFile(old_fp)
12
- newmodel = s_t_changelog._getModelFile(new_fp)
13
-
14
- differ = s_t_changelog.ModelDiffer(newmodel.get('model'), oldmodel.get('model'))
15
-
16
- self.eq(differ.cur_type2iface['it:host'], ['inet:service:object', 'inet:service:base'])
17
- self.eq(differ.cur_type2iface['mat:type'], ['meta:taxonomy'])
18
- self.eq(differ.cur_iface_to_allifaces['it:host:activity'], ['it:host:activity'])
19
- self.eq(differ.cur_iface_to_allifaces['file:mime:msoffice'], ['file:mime:msoffice', 'file:mime:meta'])
20
- changes = differ.diffModl(outp)
21
-
22
- self.len(4, changes.get('edges').get('new_edges'))
23
-
24
- form_chng = changes.get('forms')
25
- self.isin('it:beeper:thingy', form_chng.get('new_forms'))
26
- self.notin('it:beeper:name', form_chng.get('new_forms'))
27
- updt_frms = form_chng.get('updated_forms')
28
- self.isin('new_properties', updt_frms.get('file:mime:pe:resource'))
29
- self.isin('new_properties_no_interfaces', updt_frms.get('file:mime:pe:resource'))
30
- self.isin('new_properties', updt_frms.get('inet:http:request'))
31
- self.notin('new_properties_no_interfaces', updt_frms.get('inet:http:request'))
32
- self.isin('updated_properties', updt_frms.get('file:mime:macho:section'))
33
- self.isin('deprecated_properties', updt_frms.get('file:mime:lnk'))
34
- self.isin('deprecated_properties_no_interfaces', updt_frms.get('file:mime:lnk'))
35
- self.isin('deprecated_properties', updt_frms.get('inet:http:request'))
36
- self.notin('deprecated_properties_no_interfaces', updt_frms.get('inet:http:request'))
37
- self.isin('new_properties', updt_frms.get('file:mime:lnk'))
38
- self.isin('new_properties_no_interfaces', updt_frms.get('file:mime:lnk'))
39
- self.isin('updated_properties', updt_frms.get('file:mime:lnk'))
40
- self.isin('updated_properties_no_interfaces', updt_frms.get('file:mime:lnk'))
41
- self.isin('updated_properties', updt_frms.get('inet:service:access'))
42
- self.notin('updated_properties_no_interfaces', updt_frms.get('inet:service:access'))
43
-
44
- self.isin('it:host:beeper', changes.get('interfaces').get('new_interfaces'))
45
- updt_iface = changes.get('interfaces').get('updated_interfaces')
46
- self.isin('deprecated_properties', updt_iface.get('it:host:activity'))
47
- self.isin('new_properties', updt_iface.get('it:host:activity'))
48
- self.isin('updated_properties', updt_iface.get('inet:service:base'))
49
-
50
- self.eq(changes.get('tagprops'), {})
51
-
52
- self.isin('it:reveng:function', changes.get('types').get('deprecated_types'))
53
- self.isin('inet:port', changes.get('types').get('deprecated_types'))
54
- self.isin('it:beeper:thingy', changes.get('types').get('new_types'))
55
- self.isin('it:beeper:name', changes.get('types').get('new_types'))
56
- uptd_types = changes.get('types').get('updated_types')
57
- self.isin('updated_opts', uptd_types.get('it:query'))
58
- self.isin('updated_interfaces', uptd_types.get('it:reveng:impfunc'))
59
-
60
- rst = s_t_changelog._gen_model_rst('v2.177.0', 'userguide_model_v2_177_0',
61
- changes, newmodel.get('model'), outp)
62
- text = rst.getRstText()
63
- self.isin('v2.177.0 Model Updates', text)
64
- self.isin('''**************
65
- New Interfaces
66
- **************
67
-
68
- ``it:host:beeper``
69
- Properties common to instances of beepers.''', text)
70
- self.isin('''*********
71
- New Types
72
- *********
73
-
74
- ``it:beeper:name``
75
- The friendly name of a beeper.
76
- ''', text)
77
- self.isin('''*********
78
- New Forms
79
- *********
80
-
81
- ``it:beeper:thingy``
82
- A beeper thingy.
83
- ''', text)
84
- self.isin('''**************
85
- New Properties
86
- **************
87
-
88
- ``file:mime:lnk``
89
- The form had the following properties added to it:
90
-
91
-
92
- ``driveserial``
93
- The drive serial number of the volume the link target is stored on.
94
-
95
-
96
- ``iconindex``
97
- A resource index for an icon within an icon location.
98
- ''', text)
99
- self.isin('''``inet:http:request``
100
- The form had the following property added to it:
101
-
102
- ``beep``
103
- The time that the host went beep.
104
- ''', text)
105
- # Some updates will require manual intervention to rewrite.
106
- self.isin('''******************
107
- Updated Interfaces
108
- ******************
109
-
110
- ``inet:service:base``
111
- The property ``id`` has been modified from ['str', {'strip': True}] to ['str',
112
- {'lower': True, 'strip': True}].
113
-
114
-
115
- ``it:host:activity``
116
- The interface property ``time`` has been deprecated.
117
-
118
-
119
- The property ``beep`` has been added to the interface.
120
- ''', text)
121
- self.isin('''*************
122
- Updated Types
123
- *************
124
-
125
- ``it:query``
126
- The type has been modified from {'enums': None, 'globsuffix': False, 'lower':
127
- False, 'onespace': False, 'regex': None, 'replace': [], 'strip': True} to
128
- {'enums': None, 'globsuffix': False, 'lower': True, 'onespace': False,
129
- 'regex': None, 'replace': [], 'strip': True}.
130
-
131
-
132
- ``it:reveng:impfunc``
133
- The type interface has been modified from None to ['it:host:beeper'].
134
- ''', text)
135
- self.isin('''******************
136
- Updated Properties
137
- ******************
138
-
139
- ``file:mime:lnk``
140
- The form had the following property updated:
141
-
142
-
143
- The property ``entry:icon`` has been modified from ['file:path', {}] to
144
- ['time', {}].
145
- ''', text)
146
- self.isin('''***********
147
- Light Edges
148
- ***********
149
-
150
- ``jenkies``
151
- When used with a ``it:prod:soft`` node, the edge indicates The software uses
152
- the jenkies technique.
153
-
154
-
155
- ``loves``
156
- The source node loves the target node.
157
-
158
-
159
- ``sneaky``
160
- When used with a ``ou:technique`` target node, the edge indicates The
161
- technique referred to is sneakily used.
162
-
163
-
164
- ``zoinks``
165
- When used with a ``it:prod:soft`` and an ``ou:technique`` node, the edge
166
- indicates The software uses the zoinks technique.
167
- ''', text)
168
- self.isin('''****************
169
- Deprecated Types
170
- ****************
171
-
172
- The following types have been marked as deprecated:
173
-
174
-
175
- * ``inet:port``
176
-
177
- ''', text)
178
- self.isin('''****************
179
- Deprecated Types
180
- ****************
181
-
182
- The following forms have been marked as deprecated:
183
-
184
-
185
- * ``it:reveng:function``
186
- ''', text)
187
- self.isin('''*********************
188
- Deprecated Properties
189
- *********************
190
-
191
- ``file:mime:lnk``
192
- The form had the following property deprecated:
193
-
194
- ``target:attrs``
195
- The attributes of the target file according to the LNK header.
196
- ''', text)