Skip to content

Commit

Permalink
Make sure that at least 1 addr pool is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Sep 3, 2024
1 parent 793ef17 commit 629a0b5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

def validate_address_pools(system_ips: list[dict], user_specified_networks: list[dict]):
verrors = ValidationErrors()
if not user_specified_networks:
verrors.add('docker_update.address_pools', 'At least one address pool must be specified')
verrors.check()

network_cidrs = set([
ipaddress.ip_network(f'{ip["address"]}/{ip["netmask"]}', False)
for ip in system_ips
Expand Down

0 comments on commit 629a0b5

Please sign in to comment.