From 962c3294813856cdc9e79190ac4f224ae43d0792 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Wed, 29 Nov 2023 23:37:19 +0100 Subject: [PATCH] Allow to skip the security scan This patch allows users to skip the initial security scan when registering an IP address with the firewall. --- deterrersapi/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deterrersapi/__init__.py b/deterrersapi/__init__.py index d7a4167..35f08ab 100644 --- a/deterrersapi/__init__.py +++ b/deterrersapi/__init__.py @@ -180,14 +180,17 @@ def update(self, ipv4: str, data['admin_ids'] = admins return self.__patch('host/', data) - def action(self, ipv4: str, action: str) -> None: + def action(self, ipv4: str, action: str, skip_scan: bool = False) -> None: '''Activate firewall profile or block IP address in perimeter firewall. :param ipv4: IPv4 address to update :type ipv4: str :param action: Action to take. Can be 'register' or 'block' :type action: str + :param skip_scan: Whether to skip the initial security scan + :type skip_scan: bool ''' data = {'ipv4_addrs': [ipv4], - 'action': action} + 'action': action, + 'skip_scan': skip_scan} return self.__post('action/', data)