Skip to content

Commit

Permalink
Allow to skip the security scan
Browse files Browse the repository at this point in the history
This patch allows users to skip the initial security scan when
registering an IP address with the firewall.
  • Loading branch information
lkiesow committed Nov 29, 2023
1 parent 08bf15c commit 1ef2106
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deterrersapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 1ef2106

Please sign in to comment.