firemon-api 0.3.4__tar.gz → 0.3.13__tar.gz

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.
Files changed (146) hide show
  1. firemon_api-0.3.13/.gitlab-ci.yml +205 -0
  2. {firemon-api-0.3.4 → firemon_api-0.3.13}/.pre-commit-config.yaml +1 -1
  3. firemon_api-0.3.13/.readthedocs.yaml +18 -0
  4. firemon_api-0.3.13/PKG-INFO +89 -0
  5. {firemon-api-0.3.4 → firemon_api-0.3.13}/README.md +11 -6
  6. firemon_api-0.3.13/docs/_static/logo_firemon.png +0 -0
  7. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/_templates/sidebarintro.html +2 -0
  8. firemon_api-0.3.13/docs/api/api.rst +18 -0
  9. firemon_api-0.3.13/docs/api/apps/controlpanel/certauth.rst +7 -0
  10. firemon_api-0.3.13/docs/api/apps/controlpanel/cleanup.rst +7 -0
  11. firemon_api-0.3.13/docs/api/apps/controlpanel/config.rst +7 -0
  12. firemon_api-0.3.13/docs/api/apps/controlpanel/database.rst +7 -0
  13. firemon_api-0.3.13/docs/api/apps/controlpanel/diagpkg.rst +7 -0
  14. firemon_api-0.3.13/docs/api/apps/controlpanel.rst +13 -0
  15. firemon_api-0.3.13/docs/api/apps/orchestration/changes.rst +7 -0
  16. firemon_api-0.3.13/docs/api/apps/orchestration.rst +9 -0
  17. firemon_api-0.3.13/docs/api/apps/policyplanner/packets.rst +7 -0
  18. firemon_api-0.3.13/docs/api/apps/policyplanner/policyplan.rst +7 -0
  19. firemon_api-0.3.13/docs/api/apps/policyplanner/siql.rst +7 -0
  20. firemon_api-0.3.13/docs/api/apps/policyplanner/tasks.rst +7 -0
  21. firemon_api-0.3.13/docs/api/apps/policyplanner/workflows.rst +7 -0
  22. firemon_api-0.3.13/docs/api/apps/policyplanner.rst +13 -0
  23. firemon_api-0.3.13/docs/api/apps/securitymanager/access_path.rst +7 -0
  24. firemon_api-0.3.13/docs/api/apps/securitymanager/centralsyslogconfigs.rst +7 -0
  25. firemon_api-0.3.13/docs/api/apps/securitymanager/centralsyslogs.rst +7 -0
  26. firemon_api-0.3.13/docs/api/apps/securitymanager/collectionconfigs.rst +7 -0
  27. firemon_api-0.3.13/docs/api/apps/securitymanager/collectors.rst +7 -0
  28. firemon_api-0.3.13/docs/api/apps/securitymanager/deviceclusters.rst +7 -0
  29. firemon_api-0.3.13/docs/api/apps/securitymanager/devicegroups.rst +7 -0
  30. firemon_api-0.3.13/docs/api/apps/securitymanager/devicepacks.rst +7 -0
  31. firemon_api-0.3.13/docs/api/apps/securitymanager/devices.rst +7 -0
  32. firemon_api-0.3.13/docs/api/apps/securitymanager/elasticsearch.rst +7 -0
  33. firemon_api-0.3.13/docs/api/apps/securitymanager/license.rst +7 -0
  34. firemon_api-0.3.13/docs/api/apps/securitymanager/logging.rst +7 -0
  35. firemon_api-0.3.13/docs/api/apps/securitymanager/maps.rst +7 -0
  36. firemon_api-0.3.13/docs/api/apps/securitymanager/revisions.rst +7 -0
  37. firemon_api-0.3.13/docs/api/apps/securitymanager/routes.rst +7 -0
  38. firemon_api-0.3.13/docs/api/apps/securitymanager/rulerec.rst +7 -0
  39. firemon_api-0.3.13/docs/api/apps/securitymanager/siql.rst +7 -0
  40. firemon_api-0.3.13/docs/api/apps/securitymanager/users.rst +7 -0
  41. firemon_api-0.3.13/docs/api/apps/securitymanager/zones.rst +7 -0
  42. firemon_api-0.3.13/docs/api/apps/securitymanager.rst +30 -0
  43. firemon_api-0.3.13/docs/api/apps/structures.rst +9 -0
  44. firemon_api-0.3.13/docs/api/apps.rst +30 -0
  45. firemon_api-0.3.13/docs/api/core/app.rst +7 -0
  46. firemon_api-0.3.13/docs/api/core/endpoint.rst +7 -0
  47. firemon_api-0.3.13/docs/api/core/errors.rst +7 -0
  48. firemon_api-0.3.13/docs/api/core/query.rst +7 -0
  49. firemon_api-0.3.13/docs/api/core/response.rst +7 -0
  50. firemon_api-0.3.13/docs/api/core.rst +13 -0
  51. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/conf.py +23 -8
  52. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/index.rst +12 -1
  53. firemon_api-0.3.13/docs/requirements.txt +22 -0
  54. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/user/quickstart.rst +10 -10
  55. firemon_api-0.3.13/pyproject.toml +53 -0
  56. firemon_api-0.3.13/requirements.txt +14 -0
  57. firemon_api-0.3.13/setup.cfg +4 -0
  58. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/__init__.py +25 -16
  59. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/__init__.py +47 -40
  60. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/__init__.py +0 -2
  61. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/certauth.py +3 -9
  62. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/cleanup.py +2 -8
  63. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/config.py +4 -10
  64. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/database.py +4 -10
  65. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/controlpanel/diagpkg.py +5 -11
  66. firemon_api-0.3.13/src/firemon_api/apps/orchestration/__init__.py +7 -0
  67. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/orchestration/changes.py +10 -14
  68. firemon_api-0.3.13/src/firemon_api/apps/policyoptimizer/__init__.py +1 -0
  69. firemon_api-0.3.13/src/firemon_api/apps/policyplanner/__init__.py +23 -0
  70. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/policyplanner/packets.py +19 -25
  71. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/policyplanner/policyplan.py +15 -19
  72. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/policyplanner/siql.py +2 -11
  73. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/policyplanner/tasks.py +5 -15
  74. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/policyplanner/workflows.py +4 -14
  75. firemon_api-0.3.13/src/firemon_api/apps/securitymanager/__init__.py +91 -0
  76. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/access_path.py +97 -11
  77. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/centralsyslogconfigs.py +11 -12
  78. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/centralsyslogs.py +16 -19
  79. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/collectionconfigs.py +32 -18
  80. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/collectors.py +32 -49
  81. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/deviceclusters.py +10 -13
  82. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/devicegroups.py +134 -18
  83. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/devicepacks.py +27 -23
  84. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/devices.py +187 -142
  85. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/elasticsearch.py +6 -11
  86. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/license.py +14 -11
  87. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/logging.py +53 -37
  88. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/maps.py +30 -18
  89. firemon_api-0.3.13/src/firemon_api/apps/securitymanager/networksegments.py +204 -0
  90. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/revisions.py +42 -29
  91. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/routes.py +16 -26
  92. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/rulerec.py +0 -9
  93. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/siql.py +23 -27
  94. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/users.py +46 -25
  95. firemon_api-0.3.13/src/firemon_api/apps/securitymanager/usertags.py +319 -0
  96. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/securitymanager/zones.py +24 -27
  97. firemon_api-0.3.13/src/firemon_api/apps/structure/__init__.py +26 -0
  98. firemon_api-0.3.13/src/firemon_api/apps/structure/collector.py +24 -0
  99. firemon_api-0.3.13/src/firemon_api/apps/structure/device.py +33 -0
  100. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/api.py +54 -40
  101. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/app.py +10 -11
  102. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/endpoint.py +8 -15
  103. firemon_api-0.3.13/src/firemon_api/core/errors.py +22 -0
  104. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/query.py +51 -79
  105. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/response.py +40 -41
  106. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/utils.py +3 -12
  107. firemon_api-0.3.13/src/firemon_api.egg-info/PKG-INFO +89 -0
  108. firemon_api-0.3.13/src/firemon_api.egg-info/SOURCES.txt +126 -0
  109. firemon_api-0.3.13/src/firemon_api.egg-info/requires.txt +2 -0
  110. firemon_api-0.3.13/uv.lock +173 -0
  111. firemon-api-0.3.4/Makefile +0 -2
  112. firemon-api-0.3.4/PKG-INFO +0 -109
  113. firemon-api-0.3.4/README.rst +0 -85
  114. firemon-api-0.3.4/docs/_static/logo_firemon.png +0 -0
  115. firemon-api-0.3.4/firemon_api/apps/controlpanel/errors.py +0 -2
  116. firemon-api-0.3.4/firemon_api/apps/orchestration/__init__.py +0 -15
  117. firemon-api-0.3.4/firemon_api/apps/policyoptimizer/__init__.py +0 -11
  118. firemon-api-0.3.4/firemon_api/apps/policyplanner/__init__.py +0 -19
  119. firemon-api-0.3.4/firemon_api/apps/securitymanager/__init__.py +0 -68
  120. firemon-api-0.3.4/firemon_api/apps/structure/__init__.py +0 -12
  121. firemon-api-0.3.4/firemon_api.egg-info/PKG-INFO +0 -109
  122. firemon-api-0.3.4/firemon_api.egg-info/SOURCES.txt +0 -80
  123. firemon-api-0.3.4/firemon_api.egg-info/not-zip-safe +0 -1
  124. firemon-api-0.3.4/firemon_api.egg-info/requires.txt +0 -2
  125. firemon-api-0.3.4/pyproject.toml +0 -11
  126. firemon-api-0.3.4/requirements.txt +0 -3
  127. firemon-api-0.3.4/setup.cfg +0 -44
  128. firemon-api-0.3.4/setup.py +0 -5
  129. {firemon-api-0.3.4 → firemon_api-0.3.13}/.gitignore +0 -0
  130. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/Makefile +0 -0
  131. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/_templates/sidebarlogo.html +0 -0
  132. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/make.bat +0 -0
  133. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/policyplanner/tickets.rst +0 -0
  134. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/policyplanner/workflows.rst +0 -0
  135. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/securitymanager/devicepacks.rst +0 -0
  136. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/securitymanager/devices.rst +0 -0
  137. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/securitymanager/siql.rst +0 -0
  138. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/securitymanager/users.rst +0 -0
  139. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/user/advanced.rst +0 -0
  140. {firemon-api-0.3.4 → firemon_api-0.3.13}/docs/user/install.rst +0 -0
  141. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/structure/apa.py +0 -0
  142. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/structure/policyplan.py +0 -0
  143. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/apps/structure/rulerec.py +0 -0
  144. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api/core/__init__.py +0 -0
  145. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api.egg-info/dependency_links.txt +0 -0
  146. {firemon-api-0.3.4 → firemon_api-0.3.13/src}/firemon_api.egg-info/top_level.txt +0 -0
@@ -0,0 +1,205 @@
1
+ spec:
2
+ inputs:
3
+ build_operation:
4
+ type: string
5
+ description: |
6
+ Pipeline operation mode
7
+ - default - build and publish Nexus production.
8
+ - test - build and publish to Nexus test.
9
+ - docs - build documentation.
10
+ default: "default"
11
+ options:
12
+ - default
13
+ - test
14
+ - docs
15
+
16
+ ---
17
+
18
+ variables:
19
+ BUILD_OPERATION: $[[ inputs.build_operation ]]
20
+ PYTHON_IMAGE_NAME: python:3.13
21
+ PIP_DISABLE_PIP_VERSION_CHECK: "1"
22
+ PIP_NO_CACHE_DIR: "off"
23
+ #PIP_INDEX_URL: "${NEXUS_MIRROR_URL}/repository/pypi-all/simple"
24
+ #PIP_INDEX_URL: "${NEXUS_URL}/repository/pypi-all/simple"
25
+ UV_INDEX_URL: "${NEXUS_URL}/repository/pypi-all/simple"
26
+ UV_PUBLISH_URL: "${NEXUS_URL}/repository/pypi-internal/"
27
+ TEST_PUBLISH_URL: "$NEXUS_URL/repository/pypi-internal-test/"
28
+ UV_PUBLISH_USERNAME: "${NEXUS_USER}"
29
+ UV_PUBLISH_PASSWORD: "${NEXUS_PASSWORD}"
30
+ PRODUCT: "firemon-api"
31
+
32
+ stages:
33
+ - verify
34
+ - build
35
+ - deploy
36
+ - notify
37
+
38
+ default:
39
+ image: $PYTHON_IMAGE_NAME
40
+ before_script:
41
+ - curl -LsSf https://astral.sh/uv/install.sh | sh
42
+ - source $HOME/.local/bin/env
43
+ #- pip install --upgrade pip
44
+ #- uv pip install --system build twine wheel setuptools setuptools_scm Sphinx
45
+ - uv pip install --system --break-system-packages setuptools setuptools_scm
46
+ - VERSION=$(python -m setuptools_scm)
47
+ - 'echo "Detected version: ${PRODUCT} ${VERSION}"'
48
+ tags:
49
+ - sip
50
+
51
+ workflow:
52
+ rules:
53
+ # Allow manual runs
54
+ - if: '$CI_PIPELINE_SOURCE == "web"'
55
+ when: always
56
+ # Run if a new tag is added.
57
+ - if: $CI_COMMIT_TAG
58
+ when: always
59
+ # All others: skip
60
+ - when: never
61
+
62
+ verify-lock:
63
+ stage: verify
64
+ script:
65
+ - test -f uv.lock || (echo "uv.lock missing" && exit 1)
66
+ - uv sync --dry-run
67
+ rules:
68
+ # Always run if the following files change.
69
+ - changes:
70
+ - pyproject.toml
71
+ - requirements.txt
72
+ - uv.lock
73
+
74
+ build-package:
75
+ stage: build
76
+ script:
77
+ - uv sync
78
+ - uv build
79
+ artifacts:
80
+ paths:
81
+ - dist/
82
+ rules:
83
+ - if: '$BUILD_OPERATION =~ /^(default|test)$/'
84
+ when: always
85
+ - when: never
86
+
87
+ publish-test:
88
+ stage: deploy
89
+ script:
90
+ - uv publish --publish-url "$TEST_PUBLISH_URL"
91
+ dependencies:
92
+ - build-package
93
+ rules:
94
+ - if: '$BUILD_OPERATION =~ /^(test)$/'
95
+ when: always
96
+ - when: never
97
+
98
+ publish-prod:
99
+ stage: deploy
100
+ script:
101
+ - uv publish
102
+ dependencies:
103
+ - build-package
104
+ allow_failure: false
105
+ rules:
106
+ - if: '$BUILD_OPERATION =~ /^(default)$/'
107
+ when: always
108
+ - when: never
109
+
110
+ .notify_slack_success:
111
+ stage: notify
112
+ image: alpine:latest
113
+ before_script:
114
+ - apk add --no-cache curl
115
+ script:
116
+ - |
117
+ echo "Sending Slack success message..."
118
+ curl -X POST -H 'Content-type: application/json' \
119
+ --data "{
120
+ \"attachments\": [
121
+ {
122
+ \"color\": \"#36a64f\",
123
+ \"blocks\": [
124
+ {
125
+ \"type\": \"header\",
126
+ \"text\": {
127
+ \"type\": \"plain_text\",
128
+ \"text\": \"🚀 ${PRODUCT} ${VERSION} Released to Production\",
129
+ \"emoji\": true
130
+ }
131
+ },
132
+ {
133
+ \"type\": \"section\",
134
+ \"fields\": [
135
+ { \"type\": \"mrkdwn\", \"text\": \"*Version:*\n${VERSION}\" },
136
+ { \"type\": \"mrkdwn\", \"text\": \"*Released By:*\n${GITLAB_USER_NAME}\" },
137
+ { \"type\": \"mrkdwn\", \"text\": \"*Project:*\n<${CI_PROJECT_URL}|${CI_PROJECT_NAME}>\" },
138
+ { \"type\": \"mrkdwn\", \"text\": \"*Pipeline:*\n<${CI_PIPELINE_URL}|View Pipeline>\" }
139
+ ]
140
+ },
141
+ {
142
+ \"type\": \"context\",
143
+ \"elements\": [
144
+ { \"type\": \"mrkdwn\", \"text\": \"🕒 Released on ${CI_PIPELINE_CREATED_AT}\" }
145
+ ]
146
+ }
147
+ ]
148
+ }
149
+ ]
150
+ }" \
151
+ $SLACK_WEBHOOK_URL
152
+ needs:
153
+ - job: publish_prod
154
+ artifacts: false
155
+ rules:
156
+ - if: $CI_COMMIT_TAG
157
+ when: on_success
158
+
159
+ .notify_slack_failure:
160
+ stage: notify
161
+ image: alpine:latest
162
+ before_script:
163
+ - apk add --no-cache curl
164
+ script:
165
+ - |
166
+ echo "Sending Slack failure message..."
167
+ curl -X POST -H 'Content-type: application/json' \
168
+ --data "{
169
+ \"attachments\": [
170
+ {
171
+ \"color\": \"#e01e5a\",
172
+ \"blocks\": [
173
+ {
174
+ \"type\": \"header\",
175
+ \"text\": {
176
+ \"type\": \"plain_text\",
177
+ \"text\": \"❌ ${PRODUCT} Release Pipeline Failed\",
178
+ \"emoji\": true
179
+ }
180
+ },
181
+ {
182
+ \"type\": \"section\",
183
+ \"fields\": [
184
+ { \"type\": \"mrkdwn\", \"text\": \"*Version:*\n${VERSION}\" },
185
+ { \"type\": \"mrkdwn\", \"text\": \"*Triggered By:*\n${GITLAB_USER_NAME}\" },
186
+ { \"type\": \"mrkdwn\", \"text\": \"*Project:*\n<${CI_PROJECT_URL}|${CI_PROJECT_NAME}>\" },
187
+ { \"type\": \"mrkdwn\", \"text\": \"*Failed Job:*\n<${CI_JOB_URL}|${CI_JOB_NAME}>\" },
188
+ { \"type\": \"mrkdwn\", \"text\": \"*Pipeline:*\n<${CI_PIPELINE_URL}|View Pipeline>\" }
189
+ ]
190
+ },
191
+ {
192
+ \"type\": \"context\",
193
+ \"elements\": [
194
+ { \"type\": \"mrkdwn\", \"text\": \"⚠️ Check logs and fix issues before re-deploying.\" }
195
+ ]
196
+ }
197
+ ]
198
+ }
199
+ ]
200
+ }" \
201
+ $SLACK_WEBHOOK_URL
202
+ rules:
203
+ - if: $CI_COMMIT_TAG
204
+ when: on_failure
205
+
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/ambv/black
3
- rev: 20.8b1
3
+ rev: 24.10.0
4
4
  hooks:
5
5
  - id: black
6
6
  #- repo: https://github.com/pre-commit/mirrors-mypy
@@ -0,0 +1,18 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ build:
8
+ os: ubuntu-22.04
9
+ tools:
10
+ python: "3.10"
11
+
12
+ sphinx:
13
+ configuration: docs/conf.py
14
+
15
+ # Explicitly set the version of Python and its requirements
16
+ python:
17
+ install:
18
+ - requirements: docs/requirements.txt
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: firemon-api
3
+ Version: 0.3.13
4
+ Summary: Python Wrapper for Firemon APIs
5
+ Author-email: Luke Johannsen <luke.johannsen@firemon.com>
6
+ License-Expression: MIT AND (Apache-2.0 OR BSD-2-Clause)
7
+ Project-URL: Documentation, https://firemon-api.readthedocs.io/en/latest/
8
+ Project-URL: Repository, https://github.com/lukejohannsen/firemon-api
9
+ Keywords: firemon,api,development
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Topic :: Software Development
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: requests>=2.33.0
20
+ Requires-Dist: tenacity>=9.1
21
+
22
+ # FireMon-API
23
+
24
+ This project is for wrapper for the Firemon APIs (Security Manager, etc).
25
+
26
+ The User Guide available on [Read the Docs](https://firemon-api.readthedocs.io)
27
+
28
+ # Current Design
29
+
30
+ Everything is basically being coded by hand to a fit a schema that makes sense to me. Endpoints are made and return objects which may have their own functions. For example search and manipulation of devices and their data. This is an attempt to make the API a bit more user friendly without requiring more interaction by the user.
31
+
32
+ ## Application Requests
33
+
34
+ The user may use the `/api-doc` from your FireMon server to extrapolate the need keys and methods to make and use the `request()` function for the specific FireMon application. This method is handy to test out what will be returned. This is handy for testing out functions and seeing results before coding up code that tries and fit the rhyme scheme for this module or get results that may yet not be coded.
35
+
36
+ ```
37
+ >>> fm.sm.request(key="device", use_domain=True).get()
38
+ [{'id': 27, 'domainId': 1, 'name': 'PA-VM 11.0.1', 'managementIp': <snip...>]
39
+ ```
40
+
41
+ ## Dynamic API
42
+
43
+ I have attempted to create a dynamic interface for all API calls if there is something needed that does not currently fit within the re-imagining of the API schema for user friendliness. Each application should automatically create these. Unfortunately many of the `operationId` for the API are not helpful in what they actually do:
44
+
45
+ ex: (`get_1`, `get_2`, `get_3`, ...)
46
+
47
+ Probably best to avoid this unless you are a sadist.
48
+
49
+ # Usage
50
+
51
+ Import module. Disable unverfied https certificate warnings. Switch https verification off.
52
+
53
+ ```
54
+ >>> import firemon_api as fmapi
55
+ >>> fmapi.disable_warnings()
56
+ >>> fm = fmapi.api('saffron', verify=False).auth('firemon', 'firemon')
57
+ >>> fm
58
+ <Firemon(url='https://saffron', version='10.0.0')>
59
+ >>> for dev in fm.sm.devices.all():
60
+ ... print(dev.name)
61
+ ...
62
+ asa-2961.lab.firemon.com
63
+ ASA5505-8-3-2
64
+ ciscoASA8dot2
65
+ CSM-2
66
+ vSRX-3
67
+ ```
68
+
69
+ Create a new Device. Newer versions of Firemon require we specify which Collector Group and ID to use. Grab the first Collector Group.
70
+
71
+ Use all the default information from the device pack for our device.
72
+
73
+ Add in some required information and other settings to our dictionary.
74
+
75
+ Create the device.
76
+
77
+ ```
78
+ >>> cg = fm.sm.collectorgroups.all()[0]
79
+ >>> config = fm.sm.dp.get('juniper_srx').template()
80
+ >>> config['name'] = 'Conan'
81
+ >>> config['description'] = 'A test of the API'
82
+ >>> config['managementIp'] = '10.2.2.2'
83
+ >>> config['collectorGroupId'] = cg.id
84
+ >>> config['collectorGroupName'] = cg.name
85
+ >>> config['extendedSettingsJson']['password'] = 'abc12345'
86
+ >>> dev = fm.sm.devices.create(config)
87
+ >>> dev
88
+ <Device(Conan)>
89
+ ```
@@ -6,20 +6,25 @@ The User Guide available on [Read the Docs](https://firemon-api.readthedocs.io)
6
6
 
7
7
  # Current Design
8
8
 
9
- Everything is basically being coded by hand to attempt to fit a schema that makes sense to me. Endpoints are made and return objects which may have their own functions. For example search and manipulation of devices and their data. This is attempt to make the API a bit more user friendly without requiring more interaction by the user.
9
+ Everything is basically being coded by hand to a fit a schema that makes sense to me. Endpoints are made and return objects which may have their own functions. For example search and manipulation of devices and their data. This is an attempt to make the API a bit more user friendly without requiring more interaction by the user.
10
10
 
11
- I have attempted to create a dynamic interface for all API calls if there is something needed that does not currently fit within the re-imagining of the API schema for user friendliness. Each application should automatically create these. Unfortunately many of the `operationId` for the API are not helpful in what they actually do:
12
-
13
- ex: (`get_1`, `get_2`, `get_3`, ...)
11
+ ## Application Requests
14
12
 
15
- Or use the `/api-doc` from your FireMon server to extrapolate the need keys and methods to make and use the `request()`
16
- function for the specific FireMon application.
13
+ The user may use the `/api-doc` from your FireMon server to extrapolate the need keys and methods to make and use the `request()` function for the specific FireMon application. This method is handy to test out what will be returned. This is handy for testing out functions and seeing results before coding up code that tries and fit the rhyme scheme for this module or get results that may yet not be coded.
17
14
 
18
15
  ```
19
16
  >>> fm.sm.request(key="device", use_domain=True).get()
20
17
  [{'id': 27, 'domainId': 1, 'name': 'PA-VM 11.0.1', 'managementIp': <snip...>]
21
18
  ```
22
19
 
20
+ ## Dynamic API
21
+
22
+ I have attempted to create a dynamic interface for all API calls if there is something needed that does not currently fit within the re-imagining of the API schema for user friendliness. Each application should automatically create these. Unfortunately many of the `operationId` for the API are not helpful in what they actually do:
23
+
24
+ ex: (`get_1`, `get_2`, `get_3`, ...)
25
+
26
+ Probably best to avoid this unless you are a sadist.
27
+
23
28
  # Usage
24
29
 
25
30
  Import module. Disable unverfied https certificate warnings. Switch https verification off.
@@ -1,8 +1,10 @@
1
+ <!--
1
2
  <p class="logo">
2
3
  <a href="{{ pathto(master_doc) }}">
3
4
  <img class="logo" src="{{ pathto('_static/logo_firemon.png', 1) }}" alt="Firemon logo" />
4
5
  </a>
5
6
  </p>
7
+ -->
6
8
 
7
9
  <p>
8
10
  FireMon-API is a Python web wrapper for the FireMon SIP (Security Mangager, etc...)
@@ -0,0 +1,18 @@
1
+ FireMon API
2
+ ===========
3
+
4
+ .. automodule:: firemon_api
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
8
+
9
+ .. autoclass:: firemon_api.api
10
+ :members:
11
+ :undoc-members:
12
+ :show-inheritance:
13
+
14
+
15
+ .. autoclass:: firemon_api.core.api.FiremonAPI
16
+ :members:
17
+ :undoc-members:
18
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.controlpanel.certauth
2
+ ======================================
3
+
4
+ .. automodule:: firemon_api.apps.controlpanel.certauth
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.controlpanel.cleanup
2
+ ======================================
3
+
4
+ .. automodule:: firemon_api.apps.controlpanel.cleanup
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.controlpanel.config
2
+ ====================================
3
+
4
+ .. automodule:: firemon_api.apps.controlpanel.config
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.controlpanel.database
2
+ ======================================
3
+
4
+ .. automodule:: firemon_api.apps.controlpanel.database
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.controlpanel.diagpkg
2
+ =====================================
3
+
4
+ .. automodule:: firemon_api.apps.controlpanel.diagpkg
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,13 @@
1
+ Control Panel
2
+ =============
3
+
4
+ The Control Panel application is used to view and manage the FMOS settings and health
5
+
6
+ .. toctree::
7
+ :maxdepth: 1
8
+
9
+ controlpanel/certauth
10
+ controlpanel/cleanup
11
+ controlpanel/config
12
+ controlpanel/database
13
+ controlpanel/diagpkg
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.orchestration.changes
2
+ ======================================
3
+
4
+ .. automodule:: firemon_api.apps.orchestration.changes
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,9 @@
1
+ Orchestration
2
+ =============
3
+
4
+ The Orchestration application is used to directly execute automation without having to make Policy Planner tickets.
5
+
6
+ .. toctree::
7
+ :maxdepth: 1
8
+
9
+ orchestration/changes
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.policyplanner.packets
2
+ ======================================
3
+
4
+ .. automodule:: firemon_api.apps.policyplanner.packets
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.policyplanner.policyplan
2
+ =========================================
3
+
4
+ .. automodule:: firemon_api.apps.policyplanner.policyplan
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.policyplanner.siql
2
+ ===================================
3
+
4
+ .. automodule:: firemon_api.apps.policyplanner.siql
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.policyplanner.tasks
2
+ ====================================
3
+
4
+ .. automodule:: firemon_api.apps.policyplanner.tasks
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.policyplanner.workflows
2
+ ========================================
3
+
4
+ .. automodule:: firemon_api.apps.policyplanner.workflows
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,13 @@
1
+ Policy Planner
2
+ ==============
3
+
4
+ The Policy Planner application is a ticketing system to plan and automate change requests.
5
+
6
+ .. toctree::
7
+ :maxdepth: 1
8
+
9
+ policyplanner/packets
10
+ policyplanner/policyplan
11
+ policyplanner/siql
12
+ policyplanner/tasks
13
+ policyplanner/workflows
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.access_path
2
+ ============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.access_path
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.centralsyslogconfigs
2
+ =====================================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.centralsyslogconfigs
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.centralsyslogs
2
+ ===============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.centralsyslogs
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.collectionconfigs
2
+ ==================================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.collectionconfigs
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.collectors
2
+ ===========================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.collectors
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.deviceclusters
2
+ ===============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.deviceclusters
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.devicegroups
2
+ =============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.devicegroups
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.devicepacks
2
+ ============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.devicepacks
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.devices
2
+ ========================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.devices
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.elasticsearch
2
+ ==============================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.elasticsearch
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.license
2
+ ========================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.license
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.logging
2
+ ========================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.logging
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.maps
2
+ =====================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.maps
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.revisions
2
+ ==========================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.revisions
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ firemon_api.apps.securitymanager.routes
2
+ =======================================
3
+
4
+ .. automodule:: firemon_api.apps.securitymanager.routes
5
+ :members:
6
+ :undoc-members:
7
+ :show-inheritance: