Skip to content

Multiple enhancements and breaking changes#3

Open
Patrick Falk Nielsen (patrickfnielsen) wants to merge 39 commits intoBESTSELLER:masterfrom
patrickfnielsen:filter-pythonic-refactor
Open

Multiple enhancements and breaking changes#3
Patrick Falk Nielsen (patrickfnielsen) wants to merge 39 commits intoBESTSELLER:masterfrom
patrickfnielsen:filter-pythonic-refactor

Conversation

@patrickfnielsen

New Features

  • Support dynamic filters endpoints using the new .filter endpoint
    • Example: fmg.fortigates.filter(F(sn="fgt40f12345678"))
  • Added support for
    • CLITemplates
    • NormalizedInterfaces
    • DynamicPortPolicy
    • Tasks
  • FortiGateProxy - New functions:
    • query_logs
    • get_matched_devices
    • sdwan_interface_log
    • sdwan_sla_log
    • vpn_ipsec
    • device_query
    • reboot
  • FortiSwitchProxy - New functions:
    • bounce_port
  • FortiGate - New functions:
    • replace
    • add_cluster
    • meta_variables
  • FortiSwitch - New functions:
    • replace

Breaking Changes

  • Now returns a FMGResponse for all calls with the following fields data, status, success, message
    • This also allows for typed pydantic responses out of the box with the help of generics
  • Classes renamed to follow best practices (underscores removed from class names)
  • Base class changed to FortiManager from pyfortimanager.api
  • Possibly others I forgot about

Note: This is a pretty big change in how the library works, and it contains possible unnecessary edits (like renaming classes). so not accepting this might make sense.

@patrickfnielsen Patrick Falk Nielsen (patrickfnielsen) marked this pull request as ready for review July 8, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant