FireMon-API
This project is for wrapper for the Firemon APIs (Security Manager, etc).
The User Guide available on Read the Docs
Current Design
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.
Application Requests
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.
>>> fm.sm.request(key="device", use_domain=True).get()
[{'id': 27, 'domainId': 1, 'name': 'PA-VM 11.0.1', 'managementIp': <snip...>]
Dynamic API
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:
ex: (get_1, get_2, get_3, ...)
Probably best to avoid this unless you are a sadist.
Usage
Import module. Disable unverfied https certificate warnings. Switch https verification off.
>>> import firemon_api as fmapi
>>> fmapi.disable_warnings()
>>> fm = fmapi.api('saffron', verify=False).auth('firemon', 'firemon')
>>> fm
<Firemon(url='https://saffron', version='10.0.0')>
>>> for dev in fm.sm.devices.all():
... print(dev.name)
...
asa-2961.lab.firemon.com
ASA5505-8-3-2
ciscoASA8dot2
CSM-2
vSRX-3
Create a new Device. Newer versions of Firemon require we specify which Collector Group and ID to use. Grab the first Collector Group.
Use all the default information from the device pack for our device.
Add in some required information and other settings to our dictionary.
Create the device.
>>> cg = fm.sm.collectorgroups.all()[0]
>>> config = fm.sm.dp.get('juniper_srx').template()
>>> config['name'] = 'Conan'
>>> config['description'] = 'A test of the API'
>>> config['managementIp'] = '10.2.2.2'
>>> config['collectorGroupId'] = cg.id
>>> config['collectorGroupName'] = cg.name
>>> config['extendedSettingsJson']['password'] = 'abc12345'
>>> dev = fm.sm.devices.create(config)
>>> dev
<Device(Conan)>
Metadata
Release files for firemon-api 0.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| firemon_api-0.3.13.tar.gz | 90.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| firemon_api-0.3.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 169.9 kB
Release files / firemon_api-0.3.13.tar.gz
| Download URL | firemon_api-0.3.13.tar.gz |
|---|---|
| Size | 90.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1efa752ca2f3690aa7fdce72d89f4ab71e9ddf9f464e0cb4b4351b5e0ccc91eb
|
|
BLAKE2b-256 checksum How to use checksums |
fde16ec9de9bee97738d788a17af48f4173a42a18713642c319abe070c6a0617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / firemon_api-0.3.13-py3-none-any.whl
| Download URL | firemon_api-0.3.13-py3-none-any.whl |
|---|---|
| Size | 79.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06e53fe71dd0c0aada1b6959195f665b5840ecab80e5ed8d125856940d2db753
|
|
BLAKE2b-256 checksum How to use checksums |
8cfbf37009b55215b1bc0987dcb268eac3da40c821f898d9b79ace4ec5417f2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for firemon-api 0.3.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.