Revision d368ec0c snf-cyclades-app/synnefo/api/networks.py
b/snf-cyclades-app/synnefo/api/networks.py | ||
---|---|---|
186 | 186 |
if flavor not in settings.API_ENABLED_NETWORK_FLAVORS: |
187 | 187 |
raise Forbidden("Can not create %s network" % flavor) |
188 | 188 |
|
189 |
cidr_block = int(subnet.split('/')[1]) |
|
190 |
if not util.validate_network_size(cidr_block): |
|
191 |
raise OverLimit("Unsupported network size.") |
|
189 |
# Check that user provided a valid subnet |
|
190 |
util.validate_network_subnet(subnet) |
|
192 | 191 |
|
193 | 192 |
user_id = request.user_uniq |
194 | 193 |
serial = quotas.issue_network_commission(user_id) |
Also available in: Unified diff