Revision f4a66897
b/snf-cyclades-app/synnefo/api/networks.py | ||
---|---|---|
172 | 172 |
if typ == 'PUBLIC_ROUTED': |
173 | 173 |
raise Unauthorized('Can not create a public network.') |
174 | 174 |
|
175 |
user_networks = len(Network.objects.filter(userid=request.user_uniq)) |
|
176 |
if user_networks > settings.MAX_NETWORKS_PER_USER: |
|
177 |
raise OverLimit('Network count limit exceeded for your account.') |
|
178 |
|
|
175 | 179 |
cidr_block = int(subnet.split('/')[1]) |
176 | 180 |
if cidr_block <= MAX_CIDR_BLOCK: |
177 | 181 |
raise OverLimit("Network size is to big. Please specify a network" |
Also available in: Unified diff