Add network management and commit methods#10
Merged
mrqwer88 merged 2 commits intoJun 26, 2026
Conversation
added 2 commits
June 26, 2026 11:29
This allows a user to set the `enable_ban_incoming`, `enable_ban_outgoing` as well as the `calculation_method` on hostgroups or alike.
Extend the client with first-class methods for managing the global networks_list and committing configuration changes: - AddNetwork(cidr): PUT /main/networks_list/<encoded_cidr> - RemoveNetwork(cidr): DELETE /main/networks_list/<encoded_cidr> - Commit(): PUT /commit These complement the existing GetNetworks() method to provide full CRUD lifecycle for the networks_list without requiring callers to construct raw HTTP requests.
mrqwer88
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds first-class methods for managing the global
networks_listand committing configuration changes via the FastNetMon web API.New Methods
AddNetwork(cidr)/main/networks_list/<cidr>RemoveNetwork(cidr)/main/networks_list/<cidr>Commit()/commitMotivation
The existing client exposes
GetNetworks()to read the networks list but provides no way to mutate it or commit changes. Callers currently have to construct raw HTTP requests using the client's internalPrefixandRofields directly, which breaks encapsulation.These three methods complete the networks lifecycle and allow callers to manage networks entirely through the client's public API, consistent with how host groups, flow spec rules, and remote blackhole entries are already handled.